blob: 5007333c3d40372bf308c4a5ee029b69d8a202d3 [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">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040096 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
98<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Deletes an access config from an instance's network interface.</p>
101<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400102 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Detaches a disk from an instance.</p>
104<p class="toc_element">
105 <code><a href="#get">get(project, zone, instance)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns the specified Instance resource. Gets a list of available instances by making a list() request.</p>
107<p class="toc_element">
108 <code><a href="#getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</a></code></p>
109<p class="firstline">Returns effective firewalls applied to an interface of the instance.</p>
110<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Returns the specified guest attributes entry.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#getScreenshot">getScreenshot(project, zone, instance)</a></code></p>
118<p class="firstline">Returns the screenshot from the specified instance.</p>
119<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700120 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
124<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
125<p class="toc_element">
126 <code><a href="#getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</a></code></p>
127<p class="firstline">Returns the Shielded VM Identity of an instance</p>
128<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 <code><a href="#insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None, sourceMachineImage=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700130<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
131<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700133<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
134<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700135 <code><a href="#listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136<p class="firstline">Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400137<p class="toc_element">
138 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
139<p class="firstline">Retrieves the next page of results.</p>
140<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700141 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
142<p class="firstline">Retrieves the next page of results.</p>
143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145<p class="firstline">Removes resource policies from an instance.</p>
146<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400147 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148<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>
149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#resume">resume(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151<p class="firstline">Resumes an instance that was suspended using the instances().suspend method.</p>
152<p class="toc_element">
153 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
154<p class="firstline">Sets deletion protection on the instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700155<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400156 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#setLabels">setLabels(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700164<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400166<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
167<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 <code><a href="#setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700169<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
170<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code><a href="#setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700172<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
173<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175<p class="firstline">Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.</p>
176<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 <code><a href="#setName">setName(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178<p class="firstline">Sets name of an instance.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400179<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 <code><a href="#setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700181<p class="firstline">Sets an instance's scheduling options.</p>
182<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400184<p class="firstline">Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700185<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187<p class="firstline">Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
188<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 <code><a href="#setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700190<p class="firstline">Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
191<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 <code><a href="#setTags">setTags(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193<p class="firstline">Sets network tags for the specified instance to the data included in the request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700194<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400195 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
196<p class="firstline">Simulates a maintenance event on the instance.</p>
197<p class="toc_element">
198 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199<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 -0700200<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700203<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400204 <code><a href="#stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205<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 -0700206<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400207 <code><a href="#suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700208<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>
209<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700210 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700211<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
212<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700213 <code><a href="#update">update(project, zone, instance, body=None, minimalAction=None, mostDisruptiveAllowedAction=None, requestId=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700214<p class="firstline">Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.</p>
215<p class="toc_element">
216 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217<p class="firstline">Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
218<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220<p class="firstline">Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400221<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700222 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400223<p class="firstline">Updates an instance's network interface. This method follows PATCH semantics.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226<p class="firstline">Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
227<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 <code><a href="#updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229<p class="firstline">Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700230<h3>Method Details</h3>
231<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700233 <pre>Adds an access config to an instance&#x27;s network interface.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234
235Args:
236 project: string, Project ID for this request. (required)
237 zone: string, The name of the zone for this request. (required)
238 instance: string, The instance name for this request. (required)
239 networkInterface: string, The name of the network interface to add to this instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700241 The object takes the form of:
242
Bu Sun Kim65020912020-05-20 12:08:20 -0700243{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
244 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
245 &quot;name&quot;: &quot;A String&quot;, # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
246 &quot;natIP&quot;: &quot;A String&quot;, # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
247 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 #
249 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
250 #
251 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
253 &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.
254 &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.
255 &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.
256 &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 -0700257}
258
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 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.
260
261For 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.
262
263The 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 -0700264
265Returns:
266 An object of the form:
267
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 { # Represents an Operation resource.
269 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700270 # Google Compute Engine has three Operation resources:
271 #
272 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
273 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700274 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
275 #
276 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 # - For global operations, use the `globalOperations` resource.
278 # - For regional operations, use the `regionOperations` resource.
279 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700281 # 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 -0700282 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
283 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
284 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
285 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
286 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
287 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
290 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
291 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 },
293 ],
294 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &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`.
296 &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.
297 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
298 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
299 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
300 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
301 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
302 &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.
303 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
304 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
305 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
306 &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.
307 &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`.
308 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
309 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
310 &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.
311 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
312 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
313 {
314 &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.
315 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
316 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
317 {
318 &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).
319 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
320 },
321 ],
322 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
323 },
324 ],
325 &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 -0700326 }</pre>
327</div>
328
329<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700330 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700331 <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.
332
333Args:
334 project: string, Project ID for this request. (required)
335 zone: string, The name of the zone for this request. (required)
336 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700337 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700338 The object takes the form of:
339
340{
Bu Sun Kim65020912020-05-20 12:08:20 -0700341 &quot;resourcePolicies&quot;: [ # Resource policies to be added to this instance.
342 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 ],
344 }
345
346 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.
347
348For 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.
349
350The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
351
352Returns:
353 An object of the form:
354
355 { # Represents an Operation resource.
356 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700357 # Google Compute Engine has three Operation resources:
358 #
359 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
360 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700361 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
362 #
363 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700364 # - For global operations, use the `globalOperations` resource.
365 # - For regional operations, use the `regionOperations` resource.
366 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700368 # 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 -0700369 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
370 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
371 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
372 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
373 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
374 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700375 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
377 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
378 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700379 },
380 ],
381 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 &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`.
383 &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.
384 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
385 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
386 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
387 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
388 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
389 &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.
390 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
391 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
392 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
393 &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.
394 &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`.
395 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
396 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
397 &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.
398 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
399 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
400 {
401 &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.
402 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
403 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
404 {
405 &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).
406 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
407 },
408 ],
409 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
410 },
411 ],
412 &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 -0700413 }</pre>
414</div>
415
416<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 <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 -0700418 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700419
420Args:
421 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700422 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 -0700423
Dan O'Mearadd494642020-05-01 07:42:23 -0700424For 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 -0700425
Dan O'Mearadd494642020-05-01 07:42:23 -0700426You 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 -0700427
Bu Sun Kim65020912020-05-20 12:08:20 -0700428To 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 -0700429 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 -0700430 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`)
431 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
432
433You 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.
434
435Currently, only sorting by `name` or `creationTimestamp desc` is supported.
436 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.
437 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 -0700438
439Returns:
440 An object of the form:
441
442 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700443 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
444 &quot;items&quot;: { # An object that contains a list of instances scoped by zone.
445 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of instances.
446 &quot;instances&quot;: [ # [Output Only] A list of instances contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 { # Represents an Instance resource.
448 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700449 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700450 &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.
451 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
452 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700453 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
455 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
456 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
457 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
458 &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 -0700459 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 &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).
461 &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.
462 &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.
463 #
464 # 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.
465 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700466 #
467 # 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.
468 #
469 # 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.
470 #
471 # 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.
472 #
473 # 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 -0700474 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
475 &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.
476 &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.
477 &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 -0700478 #
479 # The key must meet the following requirements before you can provide it to Compute Engine:
480 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 # - 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 -0700482 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &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 -0700484 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700485 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
486 &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.
487 { # Guest OS features.
488 &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.
489 },
490 ],
491 &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.
492 &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 -0700493 #
494 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
495 #
496 # 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 -0700497 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
498 &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.
499 &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.
500 &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 -0700501 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
502 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700503 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700504 # 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:
505 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
506 # - projects/project/zones/zone/diskTypes/diskType
507 # - 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 -0700508 &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 -0700509 #
510 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
511 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 &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 -0700513 },
514 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &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.
516 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700518 &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.
519 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
520 &quot;A String&quot;,
521 ],
522 &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.
523 &quot;A String&quot;,
524 ],
525 &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 -0700526 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700527 # 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:
528 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700529 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700530 #
531 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700533 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700534 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700535 # To create a disk with a custom image that you created, specify the image name in the following format:
536 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700537 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700538 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 # 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:
540 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700541 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800542 #
543 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
545 #
546 # 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.
547 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
548 &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.
549 &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.
550 &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.
551 #
552 # The key must meet the following requirements before you can provide it to Compute Engine:
553 # - The key is wrapped using a RSA public key certificate provided by Google.
554 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
555 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
556 &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.
557 },
558 &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.
559 #
560 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
561 # global/snapshots/my-backup
562 #
563 #
564 # If the source snapshot is deleted later, this field will not be set.
565 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
566 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
567 &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.
568 &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.
569 &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.
570 #
571 # The key must meet the following requirements before you can provide it to Compute Engine:
572 # - The key is wrapped using a RSA public key certificate provided by Google.
573 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
574 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
575 &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 -0700576 },
577 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700578 &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.
579 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
580 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
581 &quot;A String&quot;,
582 ],
583 &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.
584 &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.
585 &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
586 &quot;dbs&quot;: [ # The Key Database (db).
587 {
588 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
589 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
590 },
591 ],
592 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
593 {
594 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
595 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
596 },
597 ],
598 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
599 {
600 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
601 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
602 },
603 ],
604 &quot;pk&quot;: { # The Platform Key (PK).
605 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
606 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700608 },
609 &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 -0800610 #
611 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
612 #
613 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700614 &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 -0700615 },
616 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700617 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
618 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -0700619 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700620 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
621 &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.
622 #
623 # To see the latest fingerprint, make get() request to the instance.
624 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
625 { # A specification of the type and number of accelerator cards attached to the instance.
626 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
627 &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.
628 },
629 ],
630 &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.
631 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
632 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
633 #
634 # 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.
635 #
636 # 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.
637 #
638 # 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.
639 #
640 # 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.
641 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
642 &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.
643 &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.
644 &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.
645 #
646 # The key must meet the following requirements before you can provide it to Compute Engine:
647 # - The key is wrapped using a RSA public key certificate provided by Google.
648 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
649 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
650 &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.
651 },
652 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
653 &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.
654 #
655 # To see the latest fingerprint, make get() request to the instance.
656 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
657 &quot;a_key&quot;: &quot;A String&quot;,
658 },
659 &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:
660 # zones/us-central1-f/machineTypes/n1-standard-1
661 #
662 #
663 # 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):
664 # zones/zone/machineTypes/custom-CPUS-MEMORY
665 #
666 #
667 # For example: zones/us-central1-f/machineTypes/custom-4-5120
668 #
669 # For a full list of restrictions, read the Specifications for custom machine types.
670 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
671 &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.
672 #
673 # To see the latest fingerprint, make a get() request to retrieve the resource.
674 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
675 {
676 &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.
677 &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).
678 },
679 ],
680 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
681 },
682 &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;.
683 &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.
684 &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.
685 { # A network interface resource attached to an instance.
686 &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.
687 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
688 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
689 &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.
690 &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.
691 &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.
692 #
693 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
694 #
695 # 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.
696 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
697 &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.
698 &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.
699 &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.
700 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
701 },
702 ],
703 &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.
704 { # An alias IP range attached to an instance&#x27;s network interface.
705 &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).
706 &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.
707 },
708 ],
709 &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.
710 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
711 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
712 &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.
713 &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.
714 #
715 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
716 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
717 # - projects/project/global/networks/network
718 # - global/networks/default
719 &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.
720 &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:
721 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
722 # - regions/region/subnetworks/subnetwork
723 },
724 ],
725 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
726 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
727 &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.
728 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
729 &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.
730 &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.
731 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
732 &quot;A String&quot;,
733 ],
734 },
735 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
736 &quot;A String&quot;,
737 ],
738 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
739 &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.
740 #
741 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
742 &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.
743 &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.
744 &quot;longTermRelease&quot;: True or False, # DEPRECATED, please use maintenance_freeze_duration_hours. TODO(b/154158138): Remove this field. Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
745 #
746 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
747 #
748 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
749 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
750 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
751 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
752 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
753 &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.
754 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
755 &quot;A String&quot;,
756 ],
757 },
758 ],
759 &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.
760 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
761 },
762 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
763 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
764 &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.
765 #
766 # 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.
767 { # A service account.
768 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
769 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
770 &quot;A String&quot;,
771 ],
772 },
773 ],
774 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
775 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
776 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
777 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
778 },
779 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
780 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
781 },
782 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
783 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
784 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
785 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
786 },
787 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
788 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
789 },
790 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
791 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
792 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
793 &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.
794 &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.
795 &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.
796 #
797 # The key must meet the following requirements before you can provide it to Compute Engine:
798 # - The key is wrapped using a RSA public key certificate provided by Google.
799 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
800 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
801 &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.
802 },
803 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
804 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
805 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
806 &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.
807 &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.
808 #
809 # To see the latest fingerprint, make get() request to the instance.
810 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
811 &quot;A String&quot;,
812 ],
813 },
814 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
815 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
816 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
817 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
818 },
819 &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 -0700820 },
821 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700822 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
823 &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.
824 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
825 # &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 -0700826 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700827 &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).
828 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700829 },
830 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700831 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700832 },
833 },
834 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700835 &quot;kind&quot;: &quot;compute#instanceAggregatedList&quot;, # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
836 &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.
837 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
838 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
839 &quot;A String&quot;,
840 ],
841 &quot;warning&quot;: { # [Output Only] Informational warning message.
842 &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.
843 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
844 # &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 -0700845 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700846 &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).
847 &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 -0700848 },
849 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700850 &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 -0700851 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700852 }</pre>
853</div>
854
855<div class="method">
856 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
857 <pre>Retrieves the next page of results.
858
859Args:
860 previous_request: The request for the previous page. (required)
861 previous_response: The response from the request for the previous page. (required)
862
863Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700865 page. Returns None if there are no more items in the collection.
866 </pre>
867</div>
868
869<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700870 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400871 <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 -0700872
873Args:
874 project: string, Project ID for this request. (required)
875 zone: string, The name of the zone for this request. (required)
876 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700877 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700878 The object takes the form of:
879
880{ # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 &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).
882 &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.
883 &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.
884 #
885 # 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.
886 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700887 #
888 # 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.
889 #
890 # 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.
891 #
892 # 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.
893 #
894 # 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 -0700895 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
896 &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.
897 &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.
898 &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 -0700899 #
900 # The key must meet the following requirements before you can provide it to Compute Engine:
901 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 # - 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 -0700903 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700904 &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 -0700905 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
907 &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.
908 { # Guest OS features.
909 &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.
910 },
911 ],
912 &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.
913 &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 -0700914 #
915 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
916 #
917 # 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 -0700918 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
919 &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.
920 &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.
921 &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 -0700922 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
923 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700924 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700925 # 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:
926 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
927 # - projects/project/zones/zone/diskTypes/diskType
928 # - 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 -0700929 &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 -0700930 #
931 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
932 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700933 &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 -0700934 },
935 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700936 &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.
937 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700938 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 &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.
940 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
941 &quot;A String&quot;,
942 ],
943 &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.
944 &quot;A String&quot;,
945 ],
946 &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 -0700947 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700948 # 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:
949 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700950 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700951 #
952 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700953 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700954 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700955 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700956 # To create a disk with a custom image that you created, specify the image name in the following format:
957 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700958 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700959 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700960 # 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:
961 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700962 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800963 #
964 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700965 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
966 #
967 # 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.
968 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
969 &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.
970 &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.
971 &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.
972 #
973 # The key must meet the following requirements before you can provide it to Compute Engine:
974 # - The key is wrapped using a RSA public key certificate provided by Google.
975 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
976 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
977 &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.
978 },
979 &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.
980 #
981 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
982 # global/snapshots/my-backup
983 #
984 #
985 # If the source snapshot is deleted later, this field will not be set.
986 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
987 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
988 &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.
989 &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.
990 &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.
991 #
992 # The key must meet the following requirements before you can provide it to Compute Engine:
993 # - The key is wrapped using a RSA public key certificate provided by Google.
994 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
995 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
996 &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 -0700997 },
998 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700999 &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.
1000 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1001 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1002 &quot;A String&quot;,
1003 ],
1004 &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.
1005 &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.
1006 &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
1007 &quot;dbs&quot;: [ # The Key Database (db).
1008 {
1009 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1010 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1011 },
1012 ],
1013 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1014 {
1015 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1016 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1017 },
1018 ],
1019 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1020 {
1021 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1022 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1023 },
1024 ],
1025 &quot;pk&quot;: { # The Platform Key (PK).
1026 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1027 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001028 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001029 },
1030 &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 -08001031 #
1032 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1033 #
1034 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001035 &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 -07001036}
1037
Bu Sun Kim65020912020-05-20 12:08:20 -07001038 forceAttach: boolean, Whether to force attach the disk even if it&#x27;s currently attached to another instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001039 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.
1040
1041For 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.
1042
1043The 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 -07001044
1045Returns:
1046 An object of the form:
1047
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001048 { # Represents an Operation resource.
1049 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001050 # Google Compute Engine has three Operation resources:
1051 #
1052 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1053 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1055 #
1056 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001057 # - For global operations, use the `globalOperations` resource.
1058 # - For regional operations, use the `regionOperations` resource.
1059 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001060 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001061 # 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 -07001062 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1063 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1064 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1065 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1066 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1067 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001068 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1070 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1071 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07001072 },
1073 ],
1074 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001075 &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`.
1076 &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.
1077 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1078 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1079 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1080 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1081 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1082 &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.
1083 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1084 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1085 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1086 &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.
1087 &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`.
1088 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1089 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1090 &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.
1091 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1092 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1093 {
1094 &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.
1095 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1096 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1097 {
1098 &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).
1099 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1100 },
1101 ],
1102 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1103 },
1104 ],
1105 &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 -07001106 }</pre>
1107</div>
1108
1109<div class="method">
1110 <code class="details" id="bulkInsert">bulkInsert(project, zone, body=None, requestId=None)</code>
1111 <pre>Creates multiple instances. Count specifies the number of instances to create.
1112
1113Args:
1114 project: string, Project ID for this request. (required)
1115 zone: string, The name of the zone for this request. (required)
1116 body: object, The request body.
1117 The object takes the form of:
1118
1119{
Bu Sun Kim65020912020-05-20 12:08:20 -07001120 &quot;count&quot;: &quot;A String&quot;, # The maximum number of instances to create.
1121 &quot;excludedZones&quot;: [ # List of zones to exclude for regional requests.
1122 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001123 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001124 &quot;instance&quot;: { # Represents an Instance resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001125 #
1126 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001127 &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.
1128 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
1129 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001130 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001131 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1132 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1133 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1134 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1135 &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 -07001136 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001137 &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).
1138 &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.
1139 &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.
1140 #
1141 # 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.
1142 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Dan O'Mearadd494642020-05-01 07:42:23 -07001143 #
1144 # 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.
1145 #
1146 # 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.
1147 #
1148 # 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.
1149 #
1150 # 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 -07001151 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1152 &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.
1153 &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.
1154 &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 -07001155 #
1156 # The key must meet the following requirements before you can provide it to Compute Engine:
1157 # - The key is wrapped using a RSA public key certificate provided by Google.
1158 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1159 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07001160 &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 -07001161 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001162 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1163 &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.
1164 { # Guest OS features.
1165 &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.
1166 },
1167 ],
1168 &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.
1169 &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 -07001170 #
1171 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1172 #
1173 # 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 -07001174 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1175 &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.
1176 &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.
1177 &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 -07001178 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1179 #
1180 #
1181 # 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:
1182 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1183 # - projects/project/zones/zone/diskTypes/diskType
1184 # - 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 -07001185 &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 -07001186 #
1187 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1188 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001189 &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 -07001190 },
1191 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 &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.
1193 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001194 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001195 &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.
1196 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1197 &quot;A String&quot;,
1198 ],
1199 &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.
1200 &quot;A String&quot;,
1201 ],
1202 &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 -07001203 #
1204 # 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:
1205 # projects/debian-cloud/global/images/family/debian-9
1206 #
1207 #
1208 # Alternatively, use a specific version of a public operating system image:
1209 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1210 #
1211 #
1212 # To create a disk with a custom image that you created, specify the image name in the following format:
1213 # global/images/my-custom-image
1214 #
1215 #
1216 # 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:
1217 # global/images/family/my-image-family
1218 #
1219 #
1220 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1222 #
1223 # 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.
1224 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1225 &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.
1226 &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.
1227 &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.
1228 #
1229 # The key must meet the following requirements before you can provide it to Compute Engine:
1230 # - The key is wrapped using a RSA public key certificate provided by Google.
1231 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1232 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1233 &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.
1234 },
1235 &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.
1236 #
1237 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1238 # global/snapshots/my-backup
1239 #
1240 #
1241 # If the source snapshot is deleted later, this field will not be set.
1242 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1243 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1244 &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.
1245 &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.
1246 &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.
1247 #
1248 # The key must meet the following requirements before you can provide it to Compute Engine:
1249 # - The key is wrapped using a RSA public key certificate provided by Google.
1250 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1251 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1252 &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 -07001253 },
1254 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001255 &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.
1256 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1257 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1258 &quot;A String&quot;,
1259 ],
1260 &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.
1261 &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.
1262 &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
1263 &quot;dbs&quot;: [ # The Key Database (db).
1264 {
1265 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1266 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1267 },
1268 ],
1269 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1270 {
1271 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1272 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1273 },
1274 ],
1275 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1276 {
1277 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1278 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1279 },
1280 ],
1281 &quot;pk&quot;: { # The Platform Key (PK).
1282 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1283 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001284 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001285 },
1286 &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 -07001287 #
1288 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1289 #
1290 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001291 &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 -07001292 },
1293 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001294 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1295 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001296 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
1298 &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.
1299 #
1300 # To see the latest fingerprint, make get() request to the instance.
1301 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1302 { # A specification of the type and number of accelerator cards attached to the instance.
1303 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1304 &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.
1305 },
1306 ],
1307 &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.
1308 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1309 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
1310 #
1311 # 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.
1312 #
1313 # 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.
1314 #
1315 # 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.
1316 #
1317 # 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.
1318 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1319 &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.
1320 &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.
1321 &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.
1322 #
1323 # The key must meet the following requirements before you can provide it to Compute Engine:
1324 # - The key is wrapped using a RSA public key certificate provided by Google.
1325 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1326 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1327 &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.
1328 },
1329 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1330 &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.
1331 #
1332 # To see the latest fingerprint, make get() request to the instance.
1333 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1334 &quot;a_key&quot;: &quot;A String&quot;,
1335 },
1336 &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:
1337 # zones/us-central1-f/machineTypes/n1-standard-1
1338 #
1339 #
1340 # 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):
1341 # zones/zone/machineTypes/custom-CPUS-MEMORY
1342 #
1343 #
1344 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1345 #
1346 # For a full list of restrictions, read the Specifications for custom machine types.
1347 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1348 &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.
1349 #
1350 # To see the latest fingerprint, make a get() request to retrieve the resource.
1351 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1352 {
1353 &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.
1354 &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).
1355 },
1356 ],
1357 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1358 },
1359 &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;.
1360 &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.
1361 &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.
1362 { # A network interface resource attached to an instance.
1363 &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.
1364 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1365 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1366 &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.
1367 &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.
1368 &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.
1369 #
1370 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1371 #
1372 # 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.
1373 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
1374 &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.
1375 &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.
1376 &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.
1377 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1378 },
1379 ],
1380 &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.
1381 { # An alias IP range attached to an instance&#x27;s network interface.
1382 &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).
1383 &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.
1384 },
1385 ],
1386 &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.
1387 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
1388 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1389 &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.
1390 &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.
1391 #
1392 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1393 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1394 # - projects/project/global/networks/network
1395 # - global/networks/default
1396 &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.
1397 &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:
1398 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1399 # - regions/region/subnetworks/subnetwork
1400 },
1401 ],
1402 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
1403 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
1404 &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.
1405 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1406 &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.
1407 &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.
1408 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1409 &quot;A String&quot;,
1410 ],
1411 },
1412 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
1413 &quot;A String&quot;,
1414 ],
1415 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
1416 &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.
1417 #
1418 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1419 &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.
1420 &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.
1421 &quot;longTermRelease&quot;: True or False, # DEPRECATED, please use maintenance_freeze_duration_hours. TODO(b/154158138): Remove this field. Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
1422 #
1423 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
1424 #
1425 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
1426 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1427 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1428 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1429 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1430 &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.
1431 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1432 &quot;A String&quot;,
1433 ],
1434 },
1435 ],
1436 &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.
1437 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
1438 },
1439 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1440 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1441 &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.
1442 #
1443 # 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.
1444 { # A service account.
1445 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1446 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1447 &quot;A String&quot;,
1448 ],
1449 },
1450 ],
1451 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1452 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1453 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1454 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1455 },
1456 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
1457 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1458 },
1459 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
1460 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
1461 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
1462 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
1463 },
1464 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
1465 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1466 },
1467 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
1468 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
1469 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1470 &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.
1471 &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.
1472 &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.
1473 #
1474 # The key must meet the following requirements before you can provide it to Compute Engine:
1475 # - The key is wrapped using a RSA public key certificate provided by Google.
1476 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1477 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1478 &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.
1479 },
1480 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
1481 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
1482 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
1483 &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.
1484 &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.
1485 #
1486 # To see the latest fingerprint, make get() request to the instance.
1487 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1488 &quot;A String&quot;,
1489 ],
1490 },
1491 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
1492 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
1493 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
1494 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
1495 },
1496 &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 -07001497 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001498 &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.
1499 &quot;predefinedNames&quot;: [ # List of predefined names. The number of names provided must be equal to count.
1500 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001501 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001502 &quot;sourceInstanceTemplate&quot;: &quot;A String&quot;, # Specifies the instance template from which to create the instance. This field is optional. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
1503 # - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
1504 # - projects/project/global/instanceTemplates/instanceTemplate
1505 # - global/instanceTemplates/instanceTemplate
Dan O'Mearadd494642020-05-01 07:42:23 -07001506 }
1507
1508 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.
1509
1510For 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.
1511
1512The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1513
1514Returns:
1515 An object of the form:
1516
1517 { # Represents an Operation resource.
1518 #
1519 # Google Compute Engine has three Operation resources:
1520 #
1521 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1522 #
1523 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1524 #
1525 # Operations can be global, regional or zonal.
1526 # - For global operations, use the `globalOperations` resource.
1527 # - For regional operations, use the `regionOperations` resource.
1528 # - For zonal operations, use the `zonalOperations` resource.
1529 #
1530 # 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 -07001531 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1532 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1533 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1534 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1535 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1536 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001537 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001538 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1539 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1540 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001541 },
1542 ],
1543 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 &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`.
1545 &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.
1546 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1547 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1548 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1549 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1550 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1551 &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.
1552 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1553 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1554 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1555 &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.
1556 &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`.
1557 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1558 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1559 &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.
1560 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1561 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1562 {
1563 &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.
1564 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1565 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1566 {
1567 &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).
1568 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1569 },
1570 ],
1571 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1572 },
1573 ],
1574 &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 -07001575 }</pre>
1576</div>
1577
1578<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001579 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001580 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
1581
1582Args:
1583 project: string, Project ID for this request. (required)
1584 zone: string, The name of the zone for this request. (required)
1585 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001586 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.
1587
1588For 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.
1589
1590The 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 -07001591
1592Returns:
1593 An object of the form:
1594
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001595 { # Represents an Operation resource.
1596 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001597 # Google Compute Engine has three Operation resources:
1598 #
1599 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1600 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001601 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1602 #
1603 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001604 # - For global operations, use the `globalOperations` resource.
1605 # - For regional operations, use the `regionOperations` resource.
1606 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001607 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001608 # 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 -07001609 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1610 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1611 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1612 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1613 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1614 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001615 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001616 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1617 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1618 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001619 },
1620 ],
1621 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001622 &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`.
1623 &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.
1624 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1625 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1626 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1627 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1628 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1629 &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.
1630 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1631 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1632 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1633 &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.
1634 &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`.
1635 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1636 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1637 &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.
1638 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1639 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1640 {
1641 &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.
1642 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1643 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1644 {
1645 &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).
1646 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1647 },
1648 ],
1649 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1650 },
1651 ],
1652 &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 -07001653 }</pre>
1654</div>
1655
1656<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001657 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001658 <pre>Deletes an access config from an instance&#x27;s network interface.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001659
1660Args:
1661 project: string, Project ID for this request. (required)
1662 zone: string, The name of the zone for this request. (required)
1663 instance: string, The instance name for this request. (required)
1664 accessConfig: string, The name of the access config to delete. (required)
1665 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001666 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.
1667
1668For 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.
1669
1670The 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 -07001671
1672Returns:
1673 An object of the form:
1674
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001675 { # Represents an Operation resource.
1676 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001677 # Google Compute Engine has three Operation resources:
1678 #
1679 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1680 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001681 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1682 #
1683 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001684 # - For global operations, use the `globalOperations` resource.
1685 # - For regional operations, use the `regionOperations` resource.
1686 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001687 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001688 # 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 -07001689 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1690 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1691 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1692 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1693 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1694 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001695 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001696 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1697 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1698 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001699 },
1700 ],
1701 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001702 &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`.
1703 &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.
1704 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1705 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1706 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1707 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1708 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1709 &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.
1710 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1711 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1712 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1713 &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.
1714 &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`.
1715 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1716 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1717 &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.
1718 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1719 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1720 {
1721 &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.
1722 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1723 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1724 {
1725 &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).
1726 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1727 },
1728 ],
1729 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1730 },
1731 ],
1732 &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 -07001733 }</pre>
1734</div>
1735
1736<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001737 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001738 <pre>Detaches a disk from an instance.
1739
1740Args:
1741 project: string, Project ID for this request. (required)
1742 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001743 instance: string, Instance name for this request. (required)
1744 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)
1745 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.
1746
1747For 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.
1748
1749The 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 -07001750
1751Returns:
1752 An object of the form:
1753
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001754 { # Represents an Operation resource.
1755 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001756 # Google Compute Engine has three Operation resources:
1757 #
1758 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1759 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001760 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1761 #
1762 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001763 # - For global operations, use the `globalOperations` resource.
1764 # - For regional operations, use the `regionOperations` resource.
1765 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001766 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001767 # 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 -07001768 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1769 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1770 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1771 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1772 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1773 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001774 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001775 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1776 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1777 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001778 },
1779 ],
1780 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001781 &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`.
1782 &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.
1783 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1784 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1785 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1786 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1787 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1788 &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.
1789 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1790 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1791 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1792 &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.
1793 &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`.
1794 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1795 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1796 &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.
1797 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1798 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1799 {
1800 &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.
1801 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1802 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1803 {
1804 &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).
1805 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1806 },
1807 ],
1808 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1809 },
1810 ],
1811 &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 -07001812 }</pre>
1813</div>
1814
1815<div class="method">
1816 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001817 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001818
1819Args:
1820 project: string, Project ID for this request. (required)
1821 zone: string, The name of the zone for this request. (required)
1822 instance: string, Name of the instance resource to return. (required)
1823
1824Returns:
1825 An object of the form:
1826
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001827 { # Represents an Instance resource.
1828 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001829 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001830 &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.
1831 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
1832 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001833 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001834 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1835 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1836 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1837 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1838 &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 -07001839 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001840 &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).
1841 &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.
1842 &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.
1843 #
1844 # 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.
1845 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001846 #
1847 # 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.
1848 #
1849 # 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.
1850 #
1851 # 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.
1852 #
1853 # 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 -07001854 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1855 &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.
1856 &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.
1857 &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 -07001858 #
1859 # The key must meet the following requirements before you can provide it to Compute Engine:
1860 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001861 # - 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 -07001862 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07001863 &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 -07001864 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1866 &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.
1867 { # Guest OS features.
1868 &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.
1869 },
1870 ],
1871 &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.
1872 &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 -07001873 #
1874 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1875 #
1876 # 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 -07001877 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1878 &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.
1879 &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.
1880 &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 -07001881 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1882 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001883 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001884 # 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:
1885 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1886 # - projects/project/zones/zone/diskTypes/diskType
1887 # - 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 -07001888 &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 -07001889 #
1890 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1891 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001892 &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 -07001893 },
1894 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001895 &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.
1896 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001897 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001898 &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.
1899 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1900 &quot;A String&quot;,
1901 ],
1902 &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.
1903 &quot;A String&quot;,
1904 ],
1905 &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 -07001906 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001907 # 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:
1908 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001909 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001910 #
1911 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001912 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001913 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001914 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001915 # To create a disk with a custom image that you created, specify the image name in the following format:
1916 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001917 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001918 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001919 # 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:
1920 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001921 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001922 #
1923 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001924 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1925 #
1926 # 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.
1927 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1928 &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.
1929 &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.
1930 &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.
1931 #
1932 # The key must meet the following requirements before you can provide it to Compute Engine:
1933 # - The key is wrapped using a RSA public key certificate provided by Google.
1934 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1935 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1936 &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.
1937 },
1938 &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.
1939 #
1940 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1941 # global/snapshots/my-backup
1942 #
1943 #
1944 # If the source snapshot is deleted later, this field will not be set.
1945 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1946 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1947 &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.
1948 &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.
1949 &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.
1950 #
1951 # The key must meet the following requirements before you can provide it to Compute Engine:
1952 # - The key is wrapped using a RSA public key certificate provided by Google.
1953 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1954 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1955 &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 -07001956 },
1957 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001958 &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.
1959 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1960 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1961 &quot;A String&quot;,
1962 ],
1963 &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.
1964 &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.
1965 &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
1966 &quot;dbs&quot;: [ # The Key Database (db).
1967 {
1968 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1969 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1970 },
1971 ],
1972 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1973 {
1974 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1975 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1976 },
1977 ],
1978 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1979 {
1980 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1981 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1982 },
1983 ],
1984 &quot;pk&quot;: { # The Platform Key (PK).
1985 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1986 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001987 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001988 },
1989 &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 -08001990 #
1991 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1992 #
1993 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001994 &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 -07001995 },
1996 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001997 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1998 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001999 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002000 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2001 &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.
2002 #
2003 # To see the latest fingerprint, make get() request to the instance.
2004 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2005 { # A specification of the type and number of accelerator cards attached to the instance.
2006 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2007 &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.
2008 },
2009 ],
2010 &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.
2011 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2012 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
2013 #
2014 # 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.
2015 #
2016 # 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.
2017 #
2018 # 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.
2019 #
2020 # 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.
2021 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2022 &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.
2023 &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.
2024 &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.
2025 #
2026 # The key must meet the following requirements before you can provide it to Compute Engine:
2027 # - The key is wrapped using a RSA public key certificate provided by Google.
2028 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2029 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2030 &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.
2031 },
2032 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2033 &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.
2034 #
2035 # To see the latest fingerprint, make get() request to the instance.
2036 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2037 &quot;a_key&quot;: &quot;A String&quot;,
2038 },
2039 &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:
2040 # zones/us-central1-f/machineTypes/n1-standard-1
2041 #
2042 #
2043 # 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):
2044 # zones/zone/machineTypes/custom-CPUS-MEMORY
2045 #
2046 #
2047 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2048 #
2049 # For a full list of restrictions, read the Specifications for custom machine types.
2050 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2051 &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.
2052 #
2053 # To see the latest fingerprint, make a get() request to retrieve the resource.
2054 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2055 {
2056 &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.
2057 &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).
2058 },
2059 ],
2060 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2061 },
2062 &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;.
2063 &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.
2064 &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.
2065 { # A network interface resource attached to an instance.
2066 &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.
2067 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2068 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2069 &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.
2070 &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.
2071 &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.
2072 #
2073 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2074 #
2075 # 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.
2076 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
2077 &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.
2078 &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.
2079 &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.
2080 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2081 },
2082 ],
2083 &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.
2084 { # An alias IP range attached to an instance&#x27;s network interface.
2085 &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).
2086 &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.
2087 },
2088 ],
2089 &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.
2090 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
2091 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2092 &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.
2093 &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.
2094 #
2095 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2096 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2097 # - projects/project/global/networks/network
2098 # - global/networks/default
2099 &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.
2100 &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:
2101 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2102 # - regions/region/subnetworks/subnetwork
2103 },
2104 ],
2105 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
2106 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
2107 &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.
2108 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2109 &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.
2110 &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.
2111 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2112 &quot;A String&quot;,
2113 ],
2114 },
2115 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2116 &quot;A String&quot;,
2117 ],
2118 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
2119 &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.
2120 #
2121 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
2122 &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.
2123 &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.
2124 &quot;longTermRelease&quot;: True or False, # DEPRECATED, please use maintenance_freeze_duration_hours. TODO(b/154158138): Remove this field. Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
2125 #
2126 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
2127 #
2128 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
2129 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
2130 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2131 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2132 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2133 &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.
2134 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2135 &quot;A String&quot;,
2136 ],
2137 },
2138 ],
2139 &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.
2140 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
2141 },
2142 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2143 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2144 &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.
2145 #
2146 # 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.
2147 { # A service account.
2148 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2149 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2150 &quot;A String&quot;,
2151 ],
2152 },
2153 ],
2154 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2155 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2156 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2157 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2158 },
2159 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2160 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2161 },
2162 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
2163 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
2164 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
2165 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
2166 },
2167 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
2168 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2169 },
2170 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
2171 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
2172 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2173 &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.
2174 &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.
2175 &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.
2176 #
2177 # The key must meet the following requirements before you can provide it to Compute Engine:
2178 # - The key is wrapped using a RSA public key certificate provided by Google.
2179 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2180 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2181 &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.
2182 },
2183 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
2184 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
2185 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2186 &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.
2187 &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.
2188 #
2189 # To see the latest fingerprint, make get() request to the instance.
2190 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2191 &quot;A String&quot;,
2192 ],
2193 },
2194 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
2195 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
2196 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
2197 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
2198 },
2199 &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 -07002200 }</pre>
2201</div>
2202
2203<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002204 <code class="details" id="getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</code>
2205 <pre>Returns effective firewalls applied to an interface of the instance.
2206
2207Args:
2208 project: string, Project ID for this request. (required)
2209 zone: string, The name of the zone for this request. (required)
2210 instance: string, Name of the instance scoping this request. (required)
2211 networkInterface: string, The name of the network interface to get the effective firewalls. (required)
2212
2213Returns:
2214 An object of the form:
2215
2216 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002217 &quot;firewalls&quot;: [ # Effective firewalls on the instance.
2218 { # Represents a Firewall Rule resource.
2219 #
2220 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
2221 &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.
2222 {
2223 &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.
2224 &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.
2225 #
2226 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2227 &quot;A String&quot;,
2228 ],
2229 },
2230 ],
2231 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2232 &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.
2233 {
2234 &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.
2235 &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.
2236 #
2237 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2238 &quot;A String&quot;,
2239 ],
2240 },
2241 ],
2242 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
2243 &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.
2244 &quot;A String&quot;,
2245 ],
2246 &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.
2247 &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.
2248 &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 to Stackdriver.
2249 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2250 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
2251 &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 Stackdriver.
2252 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
2253 &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.
2254 },
2255 &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.
2256 &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:
2257 # global/networks/default
2258 # 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:
2259 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
2260 # - projects/myproject/global/networks/my-network
2261 # - global/networks/default
2262 &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`.
2263 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2264 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2265 &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.
2266 &quot;A String&quot;,
2267 ],
2268 &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.
2269 &quot;A String&quot;,
2270 ],
2271 &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.
2272 &quot;A String&quot;,
2273 ],
2274 &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.
2275 &quot;A String&quot;,
2276 ],
2277 &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.
2278 &quot;A String&quot;,
2279 ],
2280 },
2281 ],
2282 &quot;organizationFirewalls&quot;: [ # Effective firewalls from organization policies.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002283 { # A pruned SecurityPolicy containing ID and any applicable firewall rules.
Bu Sun Kim65020912020-05-20 12:08:20 -07002284 &quot;id&quot;: &quot;A String&quot;, # The unique identifier for the security policy. This identifier is defined by the server.
2285 &quot;rules&quot;: [ # The rules that apply to the network.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002286 { # 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 -07002287 &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.
2288 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2289 &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.
2290 &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 -07002291 #
2292 # This field may only be specified when the versioned_expr is set to FIREWALL.
Bu Sun Kim65020912020-05-20 12:08:20 -07002293 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
2294 &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.
2295 &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.
2296 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2297 #
2298 # This field may only be specified when versioned_expr is set to FIREWALL.
2299 &quot;A String&quot;,
2300 ],
2301 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2302 #
2303 # This field may only be specified when versioned_expr is set to FIREWALL.
2304 {
2305 &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.
2306 &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.
2307 #
2308 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2309 #
2310 # This field may only be specified when versioned_expr is set to FIREWALL.
2311 &quot;A String&quot;,
2312 ],
2313 },
2314 ],
2315 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2316 #
2317 # This field may only be specified when versioned_expr is set to FIREWALL.
2318 {
2319 &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.
2320 &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.
2321 #
2322 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2323 #
2324 # This field may only be specified when versioned_expr is set to FIREWALL.
2325 &quot;A String&quot;,
2326 ],
2327 },
2328 ],
2329 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2330 &quot;A String&quot;,
2331 ],
2332 },
2333 &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 -07002334 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002335 # Example (Comparison):
2336 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002337 # 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 -07002338 #
2339 # Example (Equality):
2340 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002341 # 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 -07002342 #
2343 # Example (Logic):
2344 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002345 # 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 -07002346 #
2347 # Example (Data Manipulation):
2348 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002349 # 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 -07002350 #
2351 # 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 -07002352 &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.
2353 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2354 &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.
2355 &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 -07002356 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002357 &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 -07002358 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002359 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2360 &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.
2361 &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.
2362 &quot;blockDuration&quot;: 42, # Can only be specifed if the action for the rule is &quot;rate_based_blacklist&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.
2363 &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;.
2364 &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.
2365 &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.
2366 &quot;thresholdRps&quot;: 42, # Rate in requests per second at which to begin ratelimiting.
2367 },
2368 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
2369 &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.
2370 #
2371 # This field may only be specified when versioned_expr is set to FIREWALL.
2372 &quot;A String&quot;,
2373 ],
2374 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
2375 &quot;A String&quot;,
2376 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002377 },
2378 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002379 },
2380 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002381 }</pre>
2382</div>
2383
2384<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002385 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002386 <pre>Returns the specified guest attributes entry.
2387
2388Args:
2389 project: string, Project ID for this request. (required)
2390 zone: string, The name of the zone for this request. (required)
2391 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002392 queryPath: string, Specifies the guest attributes path to be queried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002393 variableKey: string, Specifies the key for the guest attributes entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002394
2395Returns:
2396 An object of the form:
2397
2398 { # A guest attributes entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002399 &quot;kind&quot;: &quot;compute#guestAttributes&quot;, # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
2400 &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;)
2401 &quot;queryValue&quot;: { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
2402 &quot;items&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002403 { # A guest attributes namespace/key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002404 &quot;key&quot;: &quot;A String&quot;, # Key for the guest attribute entry.
2405 &quot;namespace&quot;: &quot;A String&quot;, # Namespace for the guest attribute entry.
2406 &quot;value&quot;: &quot;A String&quot;, # Value for the guest attribute entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002407 },
2408 ],
2409 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002410 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2411 &quot;variableKey&quot;: &quot;A String&quot;, # The key to search for.
2412 &quot;variableValue&quot;: &quot;A String&quot;, # [Output Only] The value found for the requested key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002413 }</pre>
2414</div>
2415
2416<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002417 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002418 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
2419
2420Args:
2421 project: string, Project ID for this request. (required)
2422 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002423 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002424 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002425
2426Returns:
2427 An object of the form:
2428
Dan O'Mearadd494642020-05-01 07:42:23 -07002429 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002430 #
2431 #
2432 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002433 # 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 -07002434 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002435 # 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 -07002436 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002437 # **JSON example:**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002438 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002439 # { &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 -07002440 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002441 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002442 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002443 # 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 -07002444 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002445 # 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 -07002446 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002447 { # 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 -04002448 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002449 # 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 -04002450 #
2451 # Example Policy with multiple AuditConfigs:
2452 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002453 # { &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 -04002454 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002455 # 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 -07002456 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002457 { # Provides the configuration for logging a type of permissions. Example:
2458 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002459 # { &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 -04002460 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002461 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
2462 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2463 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002464 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002465 &quot;ignoreChildExemptions&quot;: True or False,
2466 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002467 },
2468 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002469 &quot;exemptedMembers&quot;: [
2470 &quot;A String&quot;,
2471 ],
2472 &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 -07002473 },
2474 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002475 &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 -07002476 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002477 &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.
2478 #
2479 # If the condition evaluates to `true`, then this binding applies to the current request.
2480 #
2481 # 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.
2482 #
2483 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2484 #
2485 # Example (Comparison):
2486 #
2487 # 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;
2488 #
2489 # Example (Equality):
2490 #
2491 # 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;
2492 #
2493 # Example (Logic):
2494 #
2495 # 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;
2496 #
2497 # Example (Data Manipulation):
2498 #
2499 # 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;
2500 #
2501 # 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.
2502 &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.
2503 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2504 &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.
2505 &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.
2506 },
2507 &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 -07002508 #
2509 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2510 #
2511 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2512 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002513 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002514 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002515 #
2516 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002517 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2518 #
2519 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2520 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002521 # * `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.
2522 #
2523 # * `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.
2524 #
2525 # * `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.
2526 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002527 #
2528 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002529 # * `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 -07002530 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002531 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002532 &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 -07002533 },
2534 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002535 &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.
2536 #
2537 # **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.
2538 &quot;iamOwned&quot;: True or False,
2539 &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.
2540 { # A rule to be applied in a Policy.
2541 &quot;action&quot;: &quot;A String&quot;, # Required
2542 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2543 { # A condition to be met.
2544 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
2545 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
2546 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
2547 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2548 &quot;values&quot;: [ # The objects of the condition.
2549 &quot;A String&quot;,
2550 ],
2551 },
2552 ],
2553 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
2554 &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.
2555 &quot;A String&quot;,
2556 ],
2557 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2558 { # Specifies what kind of log the caller must write
2559 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
2560 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2561 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
2562 },
2563 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
2564 },
2565 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
2566 #
2567 # 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.
2568 #
2569 # Field names correspond to IAM request parameters and field values are their respective values.
2570 #
2571 # 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.
2572 #
2573 # 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]}
2574 &quot;customFields&quot;: [ # Custom fields.
2575 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2576 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
2577 &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.
2578 },
2579 ],
2580 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
2581 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
2582 },
2583 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
2584 &quot;logMode&quot;: &quot;A String&quot;,
2585 },
2586 },
2587 ],
2588 &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.
2589 &quot;A String&quot;,
2590 ],
2591 &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.
2592 &quot;A String&quot;,
2593 ],
2594 },
2595 ],
2596 &quot;version&quot;: 42, # Specifies the format of the policy.
2597 #
2598 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2599 #
2600 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2601 #
2602 # * 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
2603 #
2604 # **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.
2605 #
2606 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2607 #
2608 # 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 -07002609 }</pre>
2610</div>
2611
2612<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002613 <code class="details" id="getScreenshot">getScreenshot(project, zone, instance)</code>
2614 <pre>Returns the screenshot from the specified instance.
2615
2616Args:
2617 project: string, Project ID for this request. (required)
2618 zone: string, The name of the zone for this request. (required)
2619 instance: string, Name of the instance scoping this request. (required)
2620
2621Returns:
2622 An object of the form:
2623
Bu Sun Kim65020912020-05-20 12:08:20 -07002624 { # An instance&#x27;s screenshot.
2625 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The Base64-encoded screenshot data.
2626 &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 -07002627 }</pre>
2628</div>
2629
2630<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002631 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002632 <pre>Returns the last 1 MB of serial port output from the specified instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002633
2634Args:
2635 project: string, Project ID for this request. (required)
2636 zone: string, The name of the zone for this request. (required)
2637 instance: string, Name of the instance scoping this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002638 port: integer, Specifies which COM or serial port to retrieve data from.
Bu Sun Kim65020912020-05-20 12:08:20 -07002639 start: string, Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002640
2641Returns:
2642 An object of the form:
2643
Bu Sun Kim65020912020-05-20 12:08:20 -07002644 { # An instance&#x27;s serial console output.
2645 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The contents of the console output.
2646 &quot;kind&quot;: &quot;compute#serialPortOutput&quot;, # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
2647 &quot;next&quot;: &quot;A String&quot;, # [Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter.
2648 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2649 &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, older output will be overwritten by newer content and the start values will be mismatched.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002650 }</pre>
2651</div>
2652
2653<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002654 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
2655 <pre>Returns the Shielded Instance Identity of an instance
2656
2657Args:
2658 project: string, Project ID for this request. (required)
2659 zone: string, The name of the zone for this request. (required)
2660 instance: string, Name or id of the instance scoping this request. (required)
2661
2662Returns:
2663 An object of the form:
2664
2665 { # A shielded Instance identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002666 &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.
2667 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2668 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002669 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002670 &quot;kind&quot;: &quot;compute#shieldedInstanceIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
2671 &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.
2672 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2673 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002674 },
2675 }</pre>
2676</div>
2677
2678<div class="method">
2679 <code class="details" id="getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</code>
2680 <pre>Returns the Shielded VM Identity of an instance
2681
2682Args:
2683 project: string, Project ID for this request. (required)
2684 zone: string, The name of the zone for this request. (required)
2685 instance: string, Name of the instance scoping this request. (required)
2686
2687Returns:
2688 An object of the form:
2689
2690 { # A shielded VM identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002691 &quot;encryptionKey&quot;: { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded VM&#x27;s vTPM.
2692 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2693 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002694 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002695 &quot;kind&quot;: &quot;compute#shieldedVmIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.
2696 &quot;signingKey&quot;: { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded VM&#x27;s vTPM.
2697 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2698 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002699 },
2700 }</pre>
2701</div>
2702
2703<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002704 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None, sourceMachineImage=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002705 <pre>Creates an instance resource in the specified project using the data included in the request.
2706
2707Args:
2708 project: string, Project ID for this request. (required)
2709 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002710 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002711 The object takes the form of:
2712
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002713{ # Represents an Instance resource.
2714 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002715 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002716 &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.
2717 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
2718 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002719 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002720 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
2721 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2722 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
2723 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2724 &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 -07002725 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002726 &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).
2727 &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.
2728 &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.
2729 #
2730 # 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.
2731 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002732 #
2733 # 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.
2734 #
2735 # 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.
2736 #
2737 # 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.
2738 #
2739 # 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 -07002740 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2741 &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.
2742 &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.
2743 &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 -07002744 #
2745 # The key must meet the following requirements before you can provide it to Compute Engine:
2746 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002747 # - 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 -07002748 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07002749 &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 -07002750 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002751 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
2752 &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.
2753 { # Guest OS features.
2754 &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.
2755 },
2756 ],
2757 &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.
2758 &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 -07002759 #
2760 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2761 #
2762 # 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 -07002763 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
2764 &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.
2765 &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.
2766 &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 -07002767 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2768 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002769 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002770 # 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:
2771 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2772 # - projects/project/zones/zone/diskTypes/diskType
2773 # - 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 -07002774 &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 -07002775 #
2776 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2777 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07002778 &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 -07002779 },
2780 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002781 &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.
2782 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002783 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002784 &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.
2785 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
2786 &quot;A String&quot;,
2787 ],
2788 &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.
2789 &quot;A String&quot;,
2790 ],
2791 &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 -07002792 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002793 # 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:
2794 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002795 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002796 #
2797 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002798 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002799 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002800 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002801 # To create a disk with a custom image that you created, specify the image name in the following format:
2802 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002803 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002804 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002805 # 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:
2806 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002807 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002808 #
2809 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07002810 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
2811 #
2812 # 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.
2813 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2814 &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.
2815 &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.
2816 &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.
2817 #
2818 # The key must meet the following requirements before you can provide it to Compute Engine:
2819 # - The key is wrapped using a RSA public key certificate provided by Google.
2820 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2821 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2822 &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.
2823 },
2824 &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.
2825 #
2826 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2827 # global/snapshots/my-backup
2828 #
2829 #
2830 # If the source snapshot is deleted later, this field will not be set.
2831 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2832 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2833 &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.
2834 &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.
2835 &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.
2836 #
2837 # The key must meet the following requirements before you can provide it to Compute Engine:
2838 # - The key is wrapped using a RSA public key certificate provided by Google.
2839 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2840 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2841 &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 -07002842 },
2843 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002844 &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.
2845 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2846 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
2847 &quot;A String&quot;,
2848 ],
2849 &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.
2850 &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.
2851 &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
2852 &quot;dbs&quot;: [ # The Key Database (db).
2853 {
2854 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2855 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
2856 },
2857 ],
2858 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
2859 {
2860 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2861 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
2862 },
2863 ],
2864 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
2865 {
2866 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2867 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
2868 },
2869 ],
2870 &quot;pk&quot;: { # The Platform Key (PK).
2871 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2872 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002873 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002874 },
2875 &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 -08002876 #
2877 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2878 #
2879 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002880 &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 -07002881 },
2882 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002883 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2884 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07002885 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002886 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2887 &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.
2888 #
2889 # To see the latest fingerprint, make get() request to the instance.
2890 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2891 { # A specification of the type and number of accelerator cards attached to the instance.
2892 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2893 &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.
2894 },
2895 ],
2896 &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.
2897 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2898 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
2899 #
2900 # 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.
2901 #
2902 # 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.
2903 #
2904 # 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.
2905 #
2906 # 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.
2907 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2908 &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.
2909 &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.
2910 &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.
2911 #
2912 # The key must meet the following requirements before you can provide it to Compute Engine:
2913 # - The key is wrapped using a RSA public key certificate provided by Google.
2914 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2915 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2916 &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.
2917 },
2918 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2919 &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.
2920 #
2921 # To see the latest fingerprint, make get() request to the instance.
2922 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2923 &quot;a_key&quot;: &quot;A String&quot;,
2924 },
2925 &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:
2926 # zones/us-central1-f/machineTypes/n1-standard-1
2927 #
2928 #
2929 # 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):
2930 # zones/zone/machineTypes/custom-CPUS-MEMORY
2931 #
2932 #
2933 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2934 #
2935 # For a full list of restrictions, read the Specifications for custom machine types.
2936 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2937 &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.
2938 #
2939 # To see the latest fingerprint, make a get() request to retrieve the resource.
2940 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2941 {
2942 &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.
2943 &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).
2944 },
2945 ],
2946 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2947 },
2948 &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;.
2949 &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.
2950 &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.
2951 { # A network interface resource attached to an instance.
2952 &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.
2953 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2954 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2955 &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.
2956 &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.
2957 &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.
2958 #
2959 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2960 #
2961 # 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.
2962 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
2963 &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.
2964 &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.
2965 &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.
2966 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2967 },
2968 ],
2969 &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.
2970 { # An alias IP range attached to an instance&#x27;s network interface.
2971 &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).
2972 &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.
2973 },
2974 ],
2975 &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.
2976 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
2977 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2978 &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.
2979 &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.
2980 #
2981 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2982 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2983 # - projects/project/global/networks/network
2984 # - global/networks/default
2985 &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.
2986 &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:
2987 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2988 # - regions/region/subnetworks/subnetwork
2989 },
2990 ],
2991 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
2992 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
2993 &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.
2994 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2995 &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.
2996 &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.
2997 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2998 &quot;A String&quot;,
2999 ],
3000 },
3001 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
3002 &quot;A String&quot;,
3003 ],
3004 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
3005 &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.
3006 #
3007 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
3008 &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.
3009 &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.
3010 &quot;longTermRelease&quot;: True or False, # DEPRECATED, please use maintenance_freeze_duration_hours. TODO(b/154158138): Remove this field. Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
3011 #
3012 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
3013 #
3014 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
3015 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
3016 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
3017 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
3018 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3019 &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.
3020 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
3021 &quot;A String&quot;,
3022 ],
3023 },
3024 ],
3025 &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.
3026 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
3027 },
3028 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3029 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3030 &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.
3031 #
3032 # 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.
3033 { # A service account.
3034 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
3035 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
3036 &quot;A String&quot;,
3037 ],
3038 },
3039 ],
3040 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
3041 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
3042 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
3043 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
3044 },
3045 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
3046 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3047 },
3048 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
3049 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
3050 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
3051 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
3052 },
3053 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
3054 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3055 },
3056 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
3057 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
3058 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3059 &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.
3060 &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.
3061 &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.
3062 #
3063 # The key must meet the following requirements before you can provide it to Compute Engine:
3064 # - The key is wrapped using a RSA public key certificate provided by Google.
3065 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3066 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3067 &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.
3068 },
3069 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
3070 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
3071 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
3072 &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.
3073 &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.
3074 #
3075 # To see the latest fingerprint, make get() request to the instance.
3076 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
3077 &quot;A String&quot;,
3078 ],
3079 },
3080 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
3081 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
3082 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
3083 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
3084 },
3085 &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 -07003086}
3087
Bu Sun Kim65020912020-05-20 12:08:20 -07003088 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.
3089
3090For 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.
3091
3092The 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 -07003093 sourceInstanceTemplate: string, Specifies instance template to create the instance.
3094
3095This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
3096- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
3097- projects/project/global/instanceTemplates/instanceTemplate
3098- global/instanceTemplates/instanceTemplate
3099 sourceMachineImage: string, Specifies instance machine to create the instance.
3100
3101This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
3102- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
3103- projects/project/global/global/machineImages/machineImage
3104- global/machineImages/machineImage
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003105
3106Returns:
3107 An object of the form:
3108
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003109 { # Represents an Operation resource.
3110 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003111 # Google Compute Engine has three Operation resources:
3112 #
3113 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3114 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003115 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3116 #
3117 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003118 # - For global operations, use the `globalOperations` resource.
3119 # - For regional operations, use the `regionOperations` resource.
3120 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003121 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003122 # 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 -07003123 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3124 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3125 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3126 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3127 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3128 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003129 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003130 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3131 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3132 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003133 },
3134 ],
3135 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003136 &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`.
3137 &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.
3138 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3139 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3140 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3141 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3142 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3143 &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.
3144 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3145 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3146 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3147 &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.
3148 &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`.
3149 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3150 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3151 &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.
3152 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3153 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3154 {
3155 &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.
3156 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3157 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3158 {
3159 &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).
3160 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3161 },
3162 ],
3163 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3164 },
3165 ],
3166 &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 -07003167 }</pre>
3168</div>
3169
3170<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003171 <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 -07003172 <pre>Retrieves the list of instances contained within the specified zone.
3173
3174Args:
3175 project: string, Project ID for this request. (required)
3176 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003177 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 -07003178
Dan O'Mearadd494642020-05-01 07:42:23 -07003179For 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 -07003180
Dan O'Mearadd494642020-05-01 07:42:23 -07003181You 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 -07003182
Bu Sun Kim65020912020-05-20 12:08:20 -07003183To 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) ```
3184 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`)
3185 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3186
3187You 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.
3188
3189Currently, only sorting by `name` or `creationTimestamp desc` is supported.
3190 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.
3191 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 -07003192
3193Returns:
3194 An object of the form:
3195
3196 { # Contains a list of instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07003197 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3198 &quot;items&quot;: [ # A list of Instance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003199 { # Represents an Instance resource.
3200 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003201 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003202 &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.
3203 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
3204 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003205 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003206 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
3207 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3208 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
3209 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3210 &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 -07003211 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003212 &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).
3213 &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.
3214 &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.
3215 #
3216 # 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.
3217 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003218 #
3219 # 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.
3220 #
3221 # 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.
3222 #
3223 # 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.
3224 #
3225 # 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 -07003226 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3227 &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.
3228 &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.
3229 &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 -07003230 #
3231 # The key must meet the following requirements before you can provide it to Compute Engine:
3232 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003233 # - 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 -07003234 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07003235 &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 -07003236 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003237 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
3238 &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.
3239 { # Guest OS features.
3240 &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.
3241 },
3242 ],
3243 &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.
3244 &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 -07003245 #
3246 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
3247 #
3248 # 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 -07003249 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
3250 &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.
3251 &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.
3252 &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 -07003253 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
3254 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003255 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003256 # 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:
3257 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
3258 # - projects/project/zones/zone/diskTypes/diskType
3259 # - 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 -07003260 &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 -07003261 #
3262 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
3263 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07003264 &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 -07003265 },
3266 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003267 &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.
3268 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003269 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003270 &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.
3271 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
3272 &quot;A String&quot;,
3273 ],
3274 &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.
3275 &quot;A String&quot;,
3276 ],
3277 &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 -07003278 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003279 # 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:
3280 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003281 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003282 #
3283 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003284 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003285 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003286 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003287 # To create a disk with a custom image that you created, specify the image name in the following format:
3288 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003289 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003290 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003291 # 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:
3292 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003293 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003294 #
3295 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07003296 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
3297 #
3298 # 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.
3299 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3300 &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.
3301 &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.
3302 &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.
3303 #
3304 # The key must meet the following requirements before you can provide it to Compute Engine:
3305 # - The key is wrapped using a RSA public key certificate provided by Google.
3306 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3307 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3308 &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.
3309 },
3310 &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.
3311 #
3312 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
3313 # global/snapshots/my-backup
3314 #
3315 #
3316 # If the source snapshot is deleted later, this field will not be set.
3317 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
3318 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3319 &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.
3320 &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.
3321 &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.
3322 #
3323 # The key must meet the following requirements before you can provide it to Compute Engine:
3324 # - The key is wrapped using a RSA public key certificate provided by Google.
3325 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3326 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3327 &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 -07003328 },
3329 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003330 &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.
3331 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
3332 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
3333 &quot;A String&quot;,
3334 ],
3335 &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.
3336 &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.
3337 &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
3338 &quot;dbs&quot;: [ # The Key Database (db).
3339 {
3340 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3341 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3342 },
3343 ],
3344 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
3345 {
3346 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3347 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3348 },
3349 ],
3350 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
3351 {
3352 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3353 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3354 },
3355 ],
3356 &quot;pk&quot;: { # The Platform Key (PK).
3357 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3358 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003359 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003360 },
3361 &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 -08003362 #
3363 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
3364 #
3365 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07003366 &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 -07003367 },
3368 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003369 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
3370 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07003371 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003372 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
3373 &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.
3374 #
3375 # To see the latest fingerprint, make get() request to the instance.
3376 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
3377 { # A specification of the type and number of accelerator cards attached to the instance.
3378 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
3379 &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.
3380 },
3381 ],
3382 &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.
3383 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3384 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
3385 #
3386 # 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.
3387 #
3388 # 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.
3389 #
3390 # 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.
3391 #
3392 # 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.
3393 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3394 &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.
3395 &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.
3396 &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.
3397 #
3398 # The key must meet the following requirements before you can provide it to Compute Engine:
3399 # - The key is wrapped using a RSA public key certificate provided by Google.
3400 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3401 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3402 &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.
3403 },
3404 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
3405 &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.
3406 #
3407 # To see the latest fingerprint, make get() request to the instance.
3408 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
3409 &quot;a_key&quot;: &quot;A String&quot;,
3410 },
3411 &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:
3412 # zones/us-central1-f/machineTypes/n1-standard-1
3413 #
3414 #
3415 # 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):
3416 # zones/zone/machineTypes/custom-CPUS-MEMORY
3417 #
3418 #
3419 # For example: zones/us-central1-f/machineTypes/custom-4-5120
3420 #
3421 # For a full list of restrictions, read the Specifications for custom machine types.
3422 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
3423 &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.
3424 #
3425 # To see the latest fingerprint, make a get() request to retrieve the resource.
3426 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3427 {
3428 &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.
3429 &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).
3430 },
3431 ],
3432 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
3433 },
3434 &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;.
3435 &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.
3436 &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.
3437 { # A network interface resource attached to an instance.
3438 &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.
3439 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
3440 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
3441 &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.
3442 &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.
3443 &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.
3444 #
3445 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
3446 #
3447 # 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.
3448 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
3449 &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.
3450 &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.
3451 &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.
3452 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
3453 },
3454 ],
3455 &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.
3456 { # An alias IP range attached to an instance&#x27;s network interface.
3457 &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).
3458 &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.
3459 },
3460 ],
3461 &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.
3462 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
3463 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
3464 &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.
3465 &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.
3466 #
3467 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
3468 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
3469 # - projects/project/global/networks/network
3470 # - global/networks/default
3471 &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.
3472 &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:
3473 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
3474 # - regions/region/subnetworks/subnetwork
3475 },
3476 ],
3477 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
3478 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
3479 &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.
3480 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
3481 &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.
3482 &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.
3483 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
3484 &quot;A String&quot;,
3485 ],
3486 },
3487 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
3488 &quot;A String&quot;,
3489 ],
3490 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
3491 &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.
3492 #
3493 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
3494 &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.
3495 &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.
3496 &quot;longTermRelease&quot;: True or False, # DEPRECATED, please use maintenance_freeze_duration_hours. TODO(b/154158138): Remove this field. Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
3497 #
3498 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
3499 #
3500 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
3501 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
3502 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
3503 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
3504 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3505 &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.
3506 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
3507 &quot;A String&quot;,
3508 ],
3509 },
3510 ],
3511 &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.
3512 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
3513 },
3514 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3515 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3516 &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.
3517 #
3518 # 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.
3519 { # A service account.
3520 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
3521 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
3522 &quot;A String&quot;,
3523 ],
3524 },
3525 ],
3526 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
3527 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
3528 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
3529 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
3530 },
3531 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
3532 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3533 },
3534 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
3535 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
3536 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
3537 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
3538 },
3539 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
3540 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3541 },
3542 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
3543 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
3544 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3545 &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.
3546 &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.
3547 &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.
3548 #
3549 # The key must meet the following requirements before you can provide it to Compute Engine:
3550 # - The key is wrapped using a RSA public key certificate provided by Google.
3551 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3552 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3553 &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.
3554 },
3555 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
3556 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
3557 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
3558 &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.
3559 &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.
3560 #
3561 # To see the latest fingerprint, make get() request to the instance.
3562 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
3563 &quot;A String&quot;,
3564 ],
3565 },
3566 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
3567 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
3568 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
3569 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
3570 },
3571 &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 -07003572 },
3573 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003574 &quot;kind&quot;: &quot;compute#instanceList&quot;, # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
3575 &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.
3576 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3577 &quot;warning&quot;: { # [Output Only] Informational warning message.
3578 &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.
3579 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3580 # &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 -07003581 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003582 &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).
3583 &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 -07003584 },
3585 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003586 &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 -07003587 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003588 }</pre>
3589</div>
3590
3591<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003592 <code class="details" id="listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003593 <pre>Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003594
3595Args:
3596 project: string, Project ID for this request. (required)
3597 zone: string, The name of the zone for this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07003598 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 -07003599 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 -04003600
Dan O'Mearadd494642020-05-01 07:42:23 -07003601For 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 -04003602
Dan O'Mearadd494642020-05-01 07:42:23 -07003603You 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 -04003604
Bu Sun Kim65020912020-05-20 12:08:20 -07003605To 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 -07003606 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 -07003607 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3608
3609You 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.
3610
3611Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003612 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 -07003613 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 -04003614
3615Returns:
3616 An object of the form:
3617
3618 { # Contains a list of instance referrers.
Bu Sun Kim65020912020-05-20 12:08:20 -07003619 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3620 &quot;items&quot;: [ # A list of Reference resources.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003621 { # Represents a reference to a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003622 &quot;kind&quot;: &quot;compute#reference&quot;, # [Output Only] Type of the resource. Always compute#reference for references.
3623 &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 -04003624 # - MEMBER_OF
Bu Sun Kim65020912020-05-20 12:08:20 -07003625 &quot;referrer&quot;: &quot;A String&quot;, # URL of the resource which refers to the target.
3626 &quot;target&quot;: &quot;A String&quot;, # URL of the resource to which this reference points.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003627 },
3628 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003629 &quot;kind&quot;: &quot;compute#instanceListReferrers&quot;, # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
3630 &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.
3631 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3632 &quot;warning&quot;: { # [Output Only] Informational warning message.
3633 &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.
3634 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3635 # &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 -07003636 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003637 &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).
3638 &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 -07003639 },
3640 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003641 &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 -07003642 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003643 }</pre>
3644</div>
3645
3646<div class="method">
3647 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
3648 <pre>Retrieves the next page of results.
3649
3650Args:
3651 previous_request: The request for the previous page. (required)
3652 previous_response: The response from the request for the previous page. (required)
3653
3654Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003655 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003656 page. Returns None if there are no more items in the collection.
3657 </pre>
3658</div>
3659
3660<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003661 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3662 <pre>Retrieves the next page of results.
3663
3664Args:
3665 previous_request: The request for the previous page. (required)
3666 previous_response: The response from the request for the previous page. (required)
3667
3668Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003669 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003670 page. Returns None if there are no more items in the collection.
3671 </pre>
3672</div>
3673
3674<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003675 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003676 <pre>Removes resource policies from an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003677
3678Args:
3679 project: string, Project ID for this request. (required)
3680 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003681 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003682 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003683 The object takes the form of:
3684
3685{
Bu Sun Kim65020912020-05-20 12:08:20 -07003686 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this instance.
3687 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003688 ],
3689 }
3690
3691 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.
3692
3693For 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.
3694
3695The 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 -07003696
3697Returns:
3698 An object of the form:
3699
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003700 { # Represents an Operation resource.
3701 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003702 # Google Compute Engine has three Operation resources:
3703 #
3704 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3705 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003706 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3707 #
3708 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003709 # - For global operations, use the `globalOperations` resource.
3710 # - For regional operations, use the `regionOperations` resource.
3711 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003712 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003713 # 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 -07003714 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3715 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3716 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3717 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3718 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3719 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003720 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003721 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3722 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3723 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003724 },
3725 ],
3726 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003727 &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`.
3728 &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.
3729 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3730 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3731 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3732 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3733 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3734 &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.
3735 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3736 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3737 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3738 &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.
3739 &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`.
3740 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3741 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3742 &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.
3743 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3744 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3745 {
3746 &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.
3747 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3748 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3749 {
3750 &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).
3751 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3752 },
3753 ],
3754 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3755 },
3756 ],
3757 &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 -07003758 }</pre>
3759</div>
3760
3761<div class="method">
3762 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
3763 <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.
3764
3765Args:
3766 project: string, Project ID for this request. (required)
3767 zone: string, The name of the zone for this request. (required)
3768 instance: string, Name of the instance scoping this request. (required)
3769 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.
3770
3771For 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.
3772
3773The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3774
3775Returns:
3776 An object of the form:
3777
3778 { # Represents an Operation resource.
3779 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003780 # Google Compute Engine has three Operation resources:
3781 #
3782 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3783 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003784 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3785 #
3786 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003787 # - For global operations, use the `globalOperations` resource.
3788 # - For regional operations, use the `regionOperations` resource.
3789 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003790 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003791 # 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 -07003792 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3793 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3794 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3795 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3796 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3797 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003798 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003799 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3800 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3801 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003802 },
3803 ],
3804 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003805 &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`.
3806 &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.
3807 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3808 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3809 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3810 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3811 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3812 &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.
3813 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3814 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3815 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3816 &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.
3817 &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`.
3818 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3819 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3820 &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.
3821 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3822 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3823 {
3824 &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.
3825 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3826 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3827 {
3828 &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).
3829 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3830 },
3831 ],
3832 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3833 },
3834 ],
3835 &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 -07003836 }</pre>
3837</div>
3838
3839<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003840 <code class="details" id="resume">resume(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003841 <pre>Resumes an instance that was suspended using the instances().suspend method.
3842
3843Args:
3844 project: string, Project ID for this request. (required)
3845 zone: string, The name of the zone for this request. (required)
3846 instance: string, Name of the instance resource to resume. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003847 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003848 The object takes the form of:
3849
3850{
Bu Sun Kim65020912020-05-20 12:08:20 -07003851 &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 -07003852 #
3853 # In order to resume the instance, the disk url and its corresponding key must be provided.
3854 #
3855 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
3856 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003857 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
3858 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3859 &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.
3860 &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.
3861 &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 -07003862 #
3863 # The key must meet the following requirements before you can provide it to Compute Engine:
3864 # - The key is wrapped using a RSA public key certificate provided by Google.
3865 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3866 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07003867 &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 -07003868 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003869 &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 -07003870 },
3871 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003872 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
3873 #
3874 # 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.
3875 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3876 &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.
3877 &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.
3878 &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.
3879 #
3880 # The key must meet the following requirements before you can provide it to Compute Engine:
3881 # - The key is wrapped using a RSA public key certificate provided by Google.
3882 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3883 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3884 &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.
3885 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003886 }
3887
3888 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.
3889
3890For 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.
3891
3892The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3893
3894Returns:
3895 An object of the form:
3896
3897 { # Represents an Operation resource.
3898 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003899 # Google Compute Engine has three Operation resources:
3900 #
3901 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3902 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003903 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3904 #
3905 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003906 # - For global operations, use the `globalOperations` resource.
3907 # - For regional operations, use the `regionOperations` resource.
3908 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003909 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003910 # 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 -07003911 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3912 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3913 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3914 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3915 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3916 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003917 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003918 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3919 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3920 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003921 },
3922 ],
3923 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003924 &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`.
3925 &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.
3926 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3927 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3928 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3929 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3930 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3931 &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.
3932 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3933 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3934 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3935 &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.
3936 &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`.
3937 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3938 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3939 &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.
3940 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3941 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3942 {
3943 &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.
3944 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3945 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3946 {
3947 &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).
3948 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3949 },
3950 ],
3951 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3952 },
3953 ],
3954 &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 -07003955 }</pre>
3956</div>
3957
3958<div class="method">
3959 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
3960 <pre>Sets deletion protection on the instance.
3961
3962Args:
3963 project: string, Project ID for this request. (required)
3964 zone: string, The name of the zone for this request. (required)
3965 resource: string, Name or id of the resource for this request. (required)
3966 deletionProtection: boolean, Whether the resource should be protected against deletion.
3967 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.
3968
3969For 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.
3970
3971The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3972
3973Returns:
3974 An object of the form:
3975
3976 { # Represents an Operation resource.
3977 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003978 # Google Compute Engine has three Operation resources:
3979 #
3980 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3981 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003982 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3983 #
3984 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003985 # - For global operations, use the `globalOperations` resource.
3986 # - For regional operations, use the `regionOperations` resource.
3987 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003988 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003989 # 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 -07003990 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3991 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3992 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3993 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3994 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3995 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003996 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003997 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3998 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3999 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004000 },
4001 ],
4002 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004003 &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`.
4004 &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.
4005 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4006 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4007 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4008 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4009 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4010 &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.
4011 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4012 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4013 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4014 &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.
4015 &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`.
4016 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4017 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4018 &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.
4019 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4020 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4021 {
4022 &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.
4023 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4024 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4025 {
4026 &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).
4027 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4028 },
4029 ],
4030 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4031 },
4032 ],
4033 &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 -07004034 }</pre>
4035</div>
4036
4037<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004038 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004039 <pre>Sets the auto-delete flag for a disk attached to an instance.
4040
4041Args:
4042 project: string, Project ID for this request. (required)
4043 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004044 instance: string, The instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004045 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004046 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)
4047 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.
4048
4049For 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.
4050
4051The 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 -07004052
4053Returns:
4054 An object of the form:
4055
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004056 { # Represents an Operation resource.
4057 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004058 # Google Compute Engine has three Operation resources:
4059 #
4060 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4061 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004062 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4063 #
4064 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004065 # - For global operations, use the `globalOperations` resource.
4066 # - For regional operations, use the `regionOperations` resource.
4067 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004068 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004069 # 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 -07004070 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4071 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4072 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4073 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4074 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4075 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004076 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004077 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4078 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4079 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004080 },
4081 ],
4082 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004083 &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`.
4084 &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.
4085 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4086 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4087 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4088 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4089 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4090 &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.
4091 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4092 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4093 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4094 &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.
4095 &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`.
4096 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4097 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4098 &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.
4099 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4100 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4101 {
4102 &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.
4103 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4104 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4105 {
4106 &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).
4107 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4108 },
4109 ],
4110 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4111 },
4112 ],
4113 &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 -07004114 }</pre>
4115</div>
4116
4117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004118 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004119 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
4120
4121Args:
4122 project: string, Project ID for this request. (required)
4123 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004124 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004125 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004126 The object takes the form of:
4127
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004128{
Bu Sun Kim65020912020-05-20 12:08:20 -07004129 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
4130 { # Associates `members` with a `role`.
4131 &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.
4132 #
4133 # If the condition evaluates to `true`, then this binding applies to the current request.
4134 #
4135 # 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.
4136 #
4137 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4138 #
4139 # Example (Comparison):
4140 #
4141 # 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;
4142 #
4143 # Example (Equality):
4144 #
4145 # 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;
4146 #
4147 # Example (Logic):
4148 #
4149 # 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;
4150 #
4151 # Example (Data Manipulation):
4152 #
4153 # 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;
4154 #
4155 # 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.
4156 &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.
4157 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4158 &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.
4159 &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.
4160 },
4161 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
4162 #
4163 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4164 #
4165 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4166 #
4167 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
4168 #
4169 #
4170 #
4171 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4172 #
4173 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4174 #
4175 # * `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.
4176 #
4177 # * `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.
4178 #
4179 # * `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.
4180 #
4181 #
4182 #
4183 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
4184 &quot;A String&quot;,
4185 ],
4186 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
4187 },
4188 ],
4189 &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.
4190 &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 -04004191 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004192 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004193 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004194 # 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 -04004195 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004196 # 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 -07004197 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004198 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004199 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004200 # { &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 -07004201 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004202 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004203 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004204 # 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 -07004205 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004206 # 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 -07004207 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004208 { # 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 -04004209 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004210 # 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 -04004211 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004212 # Example Policy with multiple AuditConfigs:
4213 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004214 # { &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 -07004215 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004216 # 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 -07004217 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004218 { # Provides the configuration for logging a type of permissions. Example:
4219 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004220 # { &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 -07004221 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004222 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
4223 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
4224 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004225 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004226 &quot;ignoreChildExemptions&quot;: True or False,
4227 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004228 },
4229 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004230 &quot;exemptedMembers&quot;: [
4231 &quot;A String&quot;,
4232 ],
4233 &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 -08004234 },
4235 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004236 &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 -07004237 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004238 &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.
4239 #
4240 # If the condition evaluates to `true`, then this binding applies to the current request.
4241 #
4242 # 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.
4243 #
4244 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4245 #
4246 # Example (Comparison):
4247 #
4248 # 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;
4249 #
4250 # Example (Equality):
4251 #
4252 # 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;
4253 #
4254 # Example (Logic):
4255 #
4256 # 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;
4257 #
4258 # Example (Data Manipulation):
4259 #
4260 # 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;
4261 #
4262 # 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.
4263 &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.
4264 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4265 &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.
4266 &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.
4267 },
4268 &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 -07004269 #
4270 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4271 #
4272 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4273 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004274 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004275 #
4276 #
4277 #
4278 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4279 #
4280 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4281 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004282 # * `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.
4283 #
4284 # * `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.
4285 #
4286 # * `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.
4287 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004288 #
4289 #
4290 # * `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 -07004291 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004292 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004293 &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 -07004294 },
4295 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004296 &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.
4297 #
4298 # **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.
4299 &quot;iamOwned&quot;: True or False,
4300 &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.
4301 { # A rule to be applied in a Policy.
4302 &quot;action&quot;: &quot;A String&quot;, # Required
4303 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
4304 { # A condition to be met.
4305 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
4306 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
4307 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
4308 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
4309 &quot;values&quot;: [ # The objects of the condition.
4310 &quot;A String&quot;,
4311 ],
4312 },
4313 ],
4314 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
4315 &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.
4316 &quot;A String&quot;,
4317 ],
4318 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4319 { # Specifies what kind of log the caller must write
4320 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
4321 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4322 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
4323 },
4324 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
4325 },
4326 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
4327 #
4328 # 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.
4329 #
4330 # Field names correspond to IAM request parameters and field values are their respective values.
4331 #
4332 # 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.
4333 #
4334 # 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]}
4335 &quot;customFields&quot;: [ # Custom fields.
4336 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4337 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
4338 &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.
4339 },
4340 ],
4341 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
4342 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
4343 },
4344 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
4345 &quot;logMode&quot;: &quot;A String&quot;,
4346 },
4347 },
4348 ],
4349 &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.
4350 &quot;A String&quot;,
4351 ],
4352 &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.
4353 &quot;A String&quot;,
4354 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004355 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004356 ],
4357 &quot;version&quot;: 42, # Specifies the format of the policy.
4358 #
4359 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4360 #
4361 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4362 #
4363 # * 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
4364 #
4365 # **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.
4366 #
4367 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
4368 #
4369 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4370 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004371 }
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004372
4373
4374Returns:
4375 An object of the form:
4376
Dan O'Mearadd494642020-05-01 07:42:23 -07004377 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004378 #
4379 #
4380 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004381 # 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 -07004382 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004383 # 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 -07004384 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004385 # **JSON example:**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004386 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004387 # { &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 -07004388 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004389 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004390 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004391 # 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 -07004392 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004393 # 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 -07004394 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004395 { # 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 -04004396 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004397 # 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 -04004398 #
4399 # Example Policy with multiple AuditConfigs:
4400 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004401 # { &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 -04004402 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004403 # 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 -07004404 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004405 { # Provides the configuration for logging a type of permissions. Example:
4406 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004407 # { &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 -04004408 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004409 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
4410 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
4411 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004412 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004413 &quot;ignoreChildExemptions&quot;: True or False,
4414 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004415 },
4416 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004417 &quot;exemptedMembers&quot;: [
4418 &quot;A String&quot;,
4419 ],
4420 &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 -07004421 },
4422 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004423 &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 -07004424 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004425 &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.
4426 #
4427 # If the condition evaluates to `true`, then this binding applies to the current request.
4428 #
4429 # 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.
4430 #
4431 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4432 #
4433 # Example (Comparison):
4434 #
4435 # 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;
4436 #
4437 # Example (Equality):
4438 #
4439 # 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;
4440 #
4441 # Example (Logic):
4442 #
4443 # 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;
4444 #
4445 # Example (Data Manipulation):
4446 #
4447 # 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;
4448 #
4449 # 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.
4450 &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.
4451 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4452 &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.
4453 &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.
4454 },
4455 &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 -07004456 #
4457 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4458 #
4459 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4460 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004461 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004462 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004463 #
4464 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004465 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4466 #
4467 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4468 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004469 # * `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.
4470 #
4471 # * `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.
4472 #
4473 # * `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.
4474 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004475 #
4476 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004477 # * `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 -07004478 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004479 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004480 &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 -07004481 },
4482 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004483 &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.
4484 #
4485 # **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.
4486 &quot;iamOwned&quot;: True or False,
4487 &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.
4488 { # A rule to be applied in a Policy.
4489 &quot;action&quot;: &quot;A String&quot;, # Required
4490 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
4491 { # A condition to be met.
4492 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
4493 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
4494 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
4495 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
4496 &quot;values&quot;: [ # The objects of the condition.
4497 &quot;A String&quot;,
4498 ],
4499 },
4500 ],
4501 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
4502 &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.
4503 &quot;A String&quot;,
4504 ],
4505 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4506 { # Specifies what kind of log the caller must write
4507 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
4508 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4509 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
4510 },
4511 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
4512 },
4513 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
4514 #
4515 # 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.
4516 #
4517 # Field names correspond to IAM request parameters and field values are their respective values.
4518 #
4519 # 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.
4520 #
4521 # 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]}
4522 &quot;customFields&quot;: [ # Custom fields.
4523 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4524 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
4525 &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.
4526 },
4527 ],
4528 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
4529 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
4530 },
4531 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
4532 &quot;logMode&quot;: &quot;A String&quot;,
4533 },
4534 },
4535 ],
4536 &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.
4537 &quot;A String&quot;,
4538 ],
4539 &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.
4540 &quot;A String&quot;,
4541 ],
4542 },
4543 ],
4544 &quot;version&quot;: 42, # Specifies the format of the policy.
4545 #
4546 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4547 #
4548 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4549 #
4550 # * 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
4551 #
4552 # **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.
4553 #
4554 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
4555 #
4556 # 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 -07004557 }</pre>
4558</div>
4559
4560<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004561 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004562 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004563
4564Args:
4565 project: string, Project ID for this request. (required)
4566 zone: string, The name of the zone for this request. (required)
4567 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004568 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004569 The object takes the form of:
4570
4571{
Bu Sun Kim65020912020-05-20 12:08:20 -07004572 &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.
4573 &quot;labels&quot;: {
4574 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004575 },
4576 }
4577
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004578 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.
4579
4580For 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.
4581
4582The 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 -07004583
4584Returns:
4585 An object of the form:
4586
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004587 { # Represents an Operation resource.
4588 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004589 # Google Compute Engine has three Operation resources:
4590 #
4591 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4592 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004593 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4594 #
4595 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004596 # - For global operations, use the `globalOperations` resource.
4597 # - For regional operations, use the `regionOperations` resource.
4598 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004599 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004600 # 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 -07004601 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4602 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4603 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4604 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4605 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4606 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004607 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004608 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4609 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4610 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004611 },
4612 ],
4613 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004614 &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`.
4615 &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.
4616 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4617 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4618 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4619 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4620 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4621 &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.
4622 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4623 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4624 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4625 &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.
4626 &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`.
4627 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4628 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4629 &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.
4630 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4631 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4632 {
4633 &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.
4634 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4635 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4636 {
4637 &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).
4638 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4639 },
4640 ],
4641 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4642 },
4643 ],
4644 &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 -07004645 }</pre>
4646</div>
4647
4648<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004649 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004650 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
4651
4652Args:
4653 project: string, Project ID for this request. (required)
4654 zone: string, The name of the zone for this request. (required)
4655 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004656 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004657 The object takes the form of:
4658
4659{
Bu Sun Kim65020912020-05-20 12:08:20 -07004660 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004661 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07004662 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
4663 &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 -04004664 },
4665 ],
4666 }
4667
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004668 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.
4669
4670For 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.
4671
4672The 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 -04004673
4674Returns:
4675 An object of the form:
4676
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004677 { # Represents an Operation resource.
4678 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004679 # Google Compute Engine has three Operation resources:
4680 #
4681 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4682 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004683 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4684 #
4685 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004686 # - For global operations, use the `globalOperations` resource.
4687 # - For regional operations, use the `regionOperations` resource.
4688 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004689 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004690 # 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 -07004691 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4692 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4693 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4694 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4695 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4696 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004697 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004698 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4699 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4700 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004701 },
4702 ],
4703 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004704 &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`.
4705 &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.
4706 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4707 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4708 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4709 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4710 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4711 &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.
4712 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4713 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4714 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4715 &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.
4716 &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`.
4717 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4718 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4719 &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.
4720 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4721 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4722 {
4723 &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.
4724 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4725 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4726 {
4727 &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).
4728 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4729 },
4730 ],
4731 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4732 },
4733 ],
4734 &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 -04004735 }</pre>
4736</div>
4737
4738<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004739 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004740 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
4741
4742Args:
4743 project: string, Project ID for this request. (required)
4744 zone: string, The name of the zone for this request. (required)
4745 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004746 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004747 The object takes the form of:
4748
4749{
Bu Sun Kim65020912020-05-20 12:08:20 -07004750 &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 -07004751 }
4752
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004753 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.
4754
4755For 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.
4756
4757The 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 -07004758
4759Returns:
4760 An object of the form:
4761
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004762 { # Represents an Operation resource.
4763 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004764 # Google Compute Engine has three Operation resources:
4765 #
4766 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4767 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004768 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4769 #
4770 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004771 # - For global operations, use the `globalOperations` resource.
4772 # - For regional operations, use the `regionOperations` resource.
4773 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004774 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004775 # 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 -07004776 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4777 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4778 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4779 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4780 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4781 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004782 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004783 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4784 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4785 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004786 },
4787 ],
4788 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004789 &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`.
4790 &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.
4791 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4792 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4793 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4794 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4795 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4796 &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.
4797 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4798 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4799 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4800 &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.
4801 &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`.
4802 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4803 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4804 &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.
4805 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4806 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4807 {
4808 &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.
4809 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4810 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4811 {
4812 &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).
4813 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4814 },
4815 ],
4816 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4817 },
4818 ],
4819 &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 -07004820 }</pre>
4821</div>
4822
4823<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004824 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004825 <pre>Sets metadata for the specified instance to the data included in the request.
4826
4827Args:
4828 project: string, Project ID for this request. (required)
4829 zone: string, The name of the zone for this request. (required)
4830 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004831 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004832 The object takes the form of:
4833
4834{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07004835 &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 -07004836 #
4837 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004838 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4839 {
4840 &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.
4841 &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).
4842 },
4843 ],
4844 &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 -07004845}
4846
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004847 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.
4848
4849For 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.
4850
4851The 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 -07004852
4853Returns:
4854 An object of the form:
4855
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004856 { # Represents an Operation resource.
4857 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004858 # Google Compute Engine has three Operation resources:
4859 #
4860 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4861 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004862 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4863 #
4864 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004865 # - For global operations, use the `globalOperations` resource.
4866 # - For regional operations, use the `regionOperations` resource.
4867 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004868 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004869 # 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 -07004870 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4871 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4872 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4873 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4874 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4875 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004876 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004877 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4878 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4879 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004880 },
4881 ],
4882 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004883 &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`.
4884 &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.
4885 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4886 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4887 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4888 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4889 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4890 &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.
4891 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4892 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4893 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4894 &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.
4895 &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`.
4896 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4897 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4898 &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.
4899 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4900 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4901 {
4902 &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.
4903 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4904 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4905 {
4906 &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).
4907 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4908 },
4909 ],
4910 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4911 },
4912 ],
4913 &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 -07004914 }</pre>
4915</div>
4916
4917<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004918 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004919 <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 -04004920
4921Args:
4922 project: string, Project ID for this request. (required)
4923 zone: string, The name of the zone for this request. (required)
4924 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004925 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004926 The object takes the form of:
4927
4928{
Bu Sun Kim65020912020-05-20 12:08:20 -07004929 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform this instance should be started at.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004930 }
4931
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004932 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.
4933
4934For 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.
4935
4936The 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 -04004937
4938Returns:
4939 An object of the form:
4940
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004941 { # Represents an Operation resource.
4942 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004943 # Google Compute Engine has three Operation resources:
4944 #
4945 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4946 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004947 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4948 #
4949 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004950 # - For global operations, use the `globalOperations` resource.
4951 # - For regional operations, use the `regionOperations` resource.
4952 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004953 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004954 # 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 -07004955 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4956 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4957 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4958 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4959 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4960 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004961 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004962 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4963 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4964 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004965 },
4966 ],
4967 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004968 &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`.
4969 &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.
4970 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4971 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4972 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4973 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4974 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4975 &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.
4976 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4977 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4978 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4979 &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.
4980 &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`.
4981 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4982 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4983 &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.
4984 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4985 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4986 {
4987 &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.
4988 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4989 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4990 {
4991 &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).
4992 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4993 },
4994 ],
4995 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4996 },
4997 ],
4998 &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 -07004999 }</pre>
5000</div>
5001
5002<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005003 <code class="details" id="setName">setName(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005004 <pre>Sets name of an instance.
5005
5006Args:
5007 project: string, Project ID for this request. (required)
5008 zone: string, The name of the zone for this request. (required)
5009 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005010 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005011 The object takes the form of:
5012
5013{
Bu Sun Kim65020912020-05-20 12:08:20 -07005014 &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.
5015 &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 -07005016 }
5017
5018 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.
5019
5020For 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.
5021
5022The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5023
5024Returns:
5025 An object of the form:
5026
5027 { # Represents an Operation resource.
5028 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005029 # Google Compute Engine has three Operation resources:
5030 #
5031 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5032 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005033 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5034 #
5035 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005036 # - For global operations, use the `globalOperations` resource.
5037 # - For regional operations, use the `regionOperations` resource.
5038 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005039 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005040 # 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 -07005041 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5042 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5043 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5044 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5045 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5046 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005047 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005048 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5049 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5050 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005051 },
5052 ],
5053 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005054 &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`.
5055 &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.
5056 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5057 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5058 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5059 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5060 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5061 &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.
5062 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5063 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5064 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5065 &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.
5066 &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`.
5067 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5068 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5069 &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.
5070 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5071 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5072 {
5073 &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.
5074 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5075 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5076 {
5077 &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).
5078 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5079 },
5080 ],
5081 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5082 },
5083 ],
5084 &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 -04005085 }</pre>
5086</div>
5087
5088<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005089 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07005090 <pre>Sets an instance&#x27;s scheduling options.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005091
5092Args:
5093 project: string, Project ID for this request. (required)
5094 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005095 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005096 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005097 The object takes the form of:
5098
Bu Sun Kim65020912020-05-20 12:08:20 -07005099{ # Sets the scheduling options for an Instance. NextID: 11
5100 &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.
5101 #
5102 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
5103 &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.
5104 &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.
5105 &quot;longTermRelease&quot;: True or False, # DEPRECATED, please use maintenance_freeze_duration_hours. TODO(b/154158138): Remove this field. Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
Dan O'Mearadd494642020-05-01 07:42:23 -07005106 #
5107 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
5108 #
5109 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -07005110 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
5111 &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 -07005112 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Bu Sun Kim65020912020-05-20 12:08:20 -07005113 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
5114 &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.
5115 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
5116 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005117 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005118 },
5119 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005120 &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.
5121 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005122}
5123
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005124 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.
5125
5126For 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.
5127
5128The 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 -07005129
5130Returns:
5131 An object of the form:
5132
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005133 { # Represents an Operation resource.
5134 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005135 # Google Compute Engine has three Operation resources:
5136 #
5137 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5138 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005139 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5140 #
5141 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005142 # - For global operations, use the `globalOperations` resource.
5143 # - For regional operations, use the `regionOperations` resource.
5144 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005145 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005146 # 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 -07005147 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5148 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5149 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5150 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5151 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5152 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005153 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005154 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5155 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5156 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005157 },
5158 ],
5159 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005160 &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`.
5161 &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.
5162 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5163 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5164 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5165 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5166 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5167 &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.
5168 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5169 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5170 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5171 &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.
5172 &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`.
5173 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5174 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5175 &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.
5176 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5177 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5178 {
5179 &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.
5180 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5181 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5182 {
5183 &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).
5184 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5185 },
5186 ],
5187 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5188 },
5189 ],
5190 &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 -07005191 }</pre>
5192</div>
5193
5194<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005195 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005196 <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 -07005197
5198Args:
5199 project: string, Project ID for this request. (required)
5200 zone: string, The name of the zone for this request. (required)
5201 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005202 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005203 The object takes the form of:
5204
5205{
Bu Sun Kim65020912020-05-20 12:08:20 -07005206 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
5207 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
5208 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005209 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005210 }
5211
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005212 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.
5213
5214For 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.
5215
5216The 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 -07005217
5218Returns:
5219 An object of the form:
5220
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005221 { # Represents an Operation resource.
5222 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005223 # Google Compute Engine has three Operation resources:
5224 #
5225 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5226 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005227 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5228 #
5229 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005230 # - For global operations, use the `globalOperations` resource.
5231 # - For regional operations, use the `regionOperations` resource.
5232 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005233 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005234 # 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 -07005235 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5236 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5237 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5238 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5239 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5240 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005241 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005242 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5243 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5244 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005245 },
5246 ],
5247 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005248 &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`.
5249 &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.
5250 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5251 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5252 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5253 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5254 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5255 &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.
5256 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5257 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5258 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5259 &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.
5260 &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`.
5261 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5262 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5263 &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.
5264 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5265 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5266 {
5267 &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.
5268 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5269 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5270 {
5271 &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).
5272 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5273 },
5274 ],
5275 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5276 },
5277 ],
5278 &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 -07005279 }</pre>
5280</div>
5281
5282<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005283 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005284 <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.
5285
5286Args:
5287 project: string, Project ID for this request. (required)
5288 zone: string, The name of the zone for this request. (required)
5289 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005290 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005291 The object takes the form of:
5292
5293{ # The policy describes the baseline against which Instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07005294 &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 -07005295}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005296
5297 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.
5298
5299For 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.
5300
5301The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5302
5303Returns:
5304 An object of the form:
5305
5306 { # Represents an Operation resource.
5307 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005308 # Google Compute Engine has three Operation resources:
5309 #
5310 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5311 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005312 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5313 #
5314 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005315 # - For global operations, use the `globalOperations` resource.
5316 # - For regional operations, use the `regionOperations` resource.
5317 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005318 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005319 # 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 -07005320 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5321 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5322 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5323 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5324 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5325 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005326 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005327 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5328 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5329 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005330 },
5331 ],
5332 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005333 &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`.
5334 &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.
5335 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5336 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5337 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5338 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5339 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5340 &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.
5341 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5342 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5343 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5344 &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.
5345 &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`.
5346 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5347 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5348 &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.
5349 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5350 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5351 {
5352 &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.
5353 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5354 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5355 {
5356 &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).
5357 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5358 },
5359 ],
5360 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5361 },
5362 ],
5363 &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 -07005364 }</pre>
5365</div>
5366
5367<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005368 <code class="details" id="setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005369 <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.
5370
5371Args:
5372 project: string, Project ID for this request. (required)
5373 zone: string, The name of the zone for this request. (required)
5374 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005375 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005376 The object takes the form of:
5377
5378{ # The policy describes the baseline against which VM instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07005379 &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 -07005380}
5381
5382 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.
5383
5384For 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.
5385
5386The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5387
5388Returns:
5389 An object of the form:
5390
5391 { # Represents an Operation resource.
5392 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005393 # Google Compute Engine has three Operation resources:
5394 #
5395 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5396 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005397 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5398 #
5399 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005400 # - For global operations, use the `globalOperations` resource.
5401 # - For regional operations, use the `regionOperations` resource.
5402 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005403 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005404 # 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 -07005405 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5406 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5407 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5408 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5409 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5410 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005411 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005412 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5413 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5414 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005415 },
5416 ],
5417 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005418 &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`.
5419 &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.
5420 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5421 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5422 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5423 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5424 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5425 &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.
5426 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5427 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5428 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5429 &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.
5430 &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`.
5431 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5432 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5433 &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.
5434 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5435 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5436 {
5437 &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.
5438 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5439 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5440 {
5441 &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).
5442 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5443 },
5444 ],
5445 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5446 },
5447 ],
5448 &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 -07005449 }</pre>
5450</div>
5451
5452<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005453 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005454 <pre>Sets network tags for the specified instance to the data included in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005455
5456Args:
5457 project: string, Project ID for this request. (required)
5458 zone: string, The name of the zone for this request. (required)
5459 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005460 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005461 The object takes the form of:
5462
5463{ # A set of instance tags.
Bu Sun Kim65020912020-05-20 12:08:20 -07005464 &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 -07005465 #
5466 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005467 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
5468 &quot;A String&quot;,
5469 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005470}
5471
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005472 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.
5473
5474For 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.
5475
5476The 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 -07005477
5478Returns:
5479 An object of the form:
5480
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005481 { # Represents an Operation resource.
5482 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005483 # Google Compute Engine has three Operation resources:
5484 #
5485 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5486 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005487 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5488 #
5489 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005490 # - For global operations, use the `globalOperations` resource.
5491 # - For regional operations, use the `regionOperations` resource.
5492 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005493 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005494 # 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 -07005495 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5496 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5497 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5498 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5499 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5500 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005501 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005502 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5503 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5504 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005505 },
5506 ],
5507 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005508 &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`.
5509 &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.
5510 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5511 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5512 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5513 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5514 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5515 &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.
5516 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5517 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5518 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5519 &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.
5520 &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`.
5521 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5522 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5523 &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.
5524 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5525 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5526 {
5527 &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.
5528 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5529 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5530 {
5531 &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).
5532 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5533 },
5534 ],
5535 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5536 },
5537 ],
5538 &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 -07005539 }</pre>
5540</div>
5541
5542<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005543 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
5544 <pre>Simulates a maintenance event on the instance.
5545
5546Args:
5547 project: string, Project ID for this request. (required)
5548 zone: string, The name of the zone for this request. (required)
5549 instance: string, Name of the instance scoping this request. (required)
5550
5551Returns:
5552 An object of the form:
5553
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005554 { # Represents an Operation resource.
5555 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005556 # Google Compute Engine has three Operation resources:
5557 #
5558 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5559 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005560 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5561 #
5562 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005563 # - For global operations, use the `globalOperations` resource.
5564 # - For regional operations, use the `regionOperations` resource.
5565 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005566 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005567 # 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 -07005568 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5569 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5570 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5571 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5572 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5573 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005574 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005575 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5576 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5577 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005578 },
5579 ],
5580 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005581 &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`.
5582 &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.
5583 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5584 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5585 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5586 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5587 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5588 &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.
5589 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5590 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5591 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5592 &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.
5593 &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`.
5594 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5595 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5596 &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.
5597 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5598 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5599 {
5600 &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.
5601 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5602 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5603 {
5604 &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).
5605 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5606 },
5607 ],
5608 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5609 },
5610 ],
5611 &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 -04005612 }</pre>
5613</div>
5614
5615<div class="method">
5616 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005617 <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 -07005618
5619Args:
5620 project: string, Project ID for this request. (required)
5621 zone: string, The name of the zone for this request. (required)
5622 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005623 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.
5624
5625For 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.
5626
5627The 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 -07005628
5629Returns:
5630 An object of the form:
5631
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005632 { # Represents an Operation resource.
5633 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005634 # Google Compute Engine has three Operation resources:
5635 #
5636 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5637 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005638 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5639 #
5640 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005641 # - For global operations, use the `globalOperations` resource.
5642 # - For regional operations, use the `regionOperations` resource.
5643 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005644 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005645 # 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 -07005646 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5647 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5648 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5649 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5650 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5651 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005652 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005653 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5654 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5655 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005656 },
5657 ],
5658 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005659 &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`.
5660 &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.
5661 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5662 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5663 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5664 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5665 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5666 &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.
5667 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5668 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5669 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5670 &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.
5671 &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`.
5672 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5673 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5674 &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.
5675 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5676 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5677 {
5678 &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.
5679 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5680 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5681 {
5682 &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).
5683 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5684 },
5685 ],
5686 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5687 },
5688 ],
5689 &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 -07005690 }</pre>
5691</div>
5692
5693<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005694 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005695 <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 -07005696
5697Args:
5698 project: string, Project ID for this request. (required)
5699 zone: string, The name of the zone for this request. (required)
5700 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005701 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005702 The object takes the form of:
5703
5704{
Bu Sun Kim65020912020-05-20 12:08:20 -07005705 &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 -07005706 #
5707 # In order to start the instance, the disk url and its corresponding key must be provided.
5708 #
5709 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
5710 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005711 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
5712 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5713 &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.
5714 &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.
5715 &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 -07005716 #
5717 # The key must meet the following requirements before you can provide it to Compute Engine:
5718 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005719 # - 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 -07005720 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07005721 &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 -07005722 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005723 &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 -07005724 },
5725 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005726 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
5727 #
5728 # 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.
5729 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5730 &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.
5731 &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.
5732 &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.
5733 #
5734 # The key must meet the following requirements before you can provide it to Compute Engine:
5735 # - The key is wrapped using a RSA public key certificate provided by Google.
5736 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5737 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5738 &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.
5739 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005740 }
5741
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005742 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.
5743
5744For 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.
5745
5746The 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 -07005747
5748Returns:
5749 An object of the form:
5750
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005751 { # Represents an Operation resource.
5752 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005753 # Google Compute Engine has three Operation resources:
5754 #
5755 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5756 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005757 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5758 #
5759 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005760 # - For global operations, use the `globalOperations` resource.
5761 # - For regional operations, use the `regionOperations` resource.
5762 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005763 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005764 # 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 -07005765 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5766 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5767 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5768 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5769 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5770 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005771 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005772 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5773 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5774 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005775 },
5776 ],
5777 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005778 &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`.
5779 &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.
5780 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5781 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5782 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5783 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5784 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5785 &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.
5786 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5787 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5788 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5789 &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.
5790 &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`.
5791 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5792 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5793 &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.
5794 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5795 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5796 {
5797 &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.
5798 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5799 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5800 {
5801 &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).
5802 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5803 },
5804 ],
5805 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5806 },
5807 ],
5808 &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 -07005809 }</pre>
5810</div>
5811
5812<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005813 <code class="details" id="stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005814 <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 -07005815
5816Args:
5817 project: string, Project ID for this request. (required)
5818 zone: string, The name of the zone for this request. (required)
5819 instance: string, Name of the instance resource to stop. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005820 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 -07005821 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.
5822
5823For 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.
5824
5825The 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 -07005826
5827Returns:
5828 An object of the form:
5829
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005830 { # Represents an Operation resource.
5831 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005832 # Google Compute Engine has three Operation resources:
5833 #
5834 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5835 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005836 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5837 #
5838 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005839 # - For global operations, use the `globalOperations` resource.
5840 # - For regional operations, use the `regionOperations` resource.
5841 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005842 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005843 # 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 -07005844 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5845 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5846 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5847 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5848 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5849 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005850 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005851 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5852 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5853 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005854 },
5855 ],
5856 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005857 &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`.
5858 &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.
5859 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5860 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5861 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5862 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5863 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5864 &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.
5865 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5866 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5867 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5868 &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.
5869 &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`.
5870 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5871 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5872 &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.
5873 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5874 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5875 {
5876 &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.
5877 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5878 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5879 {
5880 &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).
5881 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5882 },
5883 ],
5884 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5885 },
5886 ],
5887 &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 -07005888 }</pre>
5889</div>
5890
5891<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005892 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005893 <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.
5894
5895Args:
5896 project: string, Project ID for this request. (required)
5897 zone: string, The name of the zone for this request. (required)
5898 instance: string, Name of the instance resource to suspend. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005899 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 -07005900 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.
5901
5902For 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.
5903
5904The 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 -07005905
5906Returns:
5907 An object of the form:
5908
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005909 { # Represents an Operation resource.
5910 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005911 # Google Compute Engine has three Operation resources:
5912 #
5913 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5914 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005915 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5916 #
5917 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005918 # - For global operations, use the `globalOperations` resource.
5919 # - For regional operations, use the `regionOperations` resource.
5920 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005921 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005922 # 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 -07005923 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5924 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5925 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5926 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5927 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5928 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005929 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005930 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5931 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5932 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005933 },
5934 ],
5935 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005936 &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`.
5937 &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.
5938 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5939 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5940 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5941 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5942 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5943 &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.
5944 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5945 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5946 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5947 &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.
5948 &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`.
5949 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5950 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5951 &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.
5952 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5953 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5954 {
5955 &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.
5956 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5957 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5958 {
5959 &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).
5960 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5961 },
5962 ],
5963 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5964 },
5965 ],
5966 &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 -07005967 }</pre>
5968</div>
5969
5970<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005971 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005972 <pre>Returns permissions that a caller has on the specified resource.
5973
5974Args:
5975 project: string, Project ID for this request. (required)
5976 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005977 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005978 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005979 The object takes the form of:
5980
5981{
Bu Sun Kim65020912020-05-20 12:08:20 -07005982 &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.
5983 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005984 ],
5985 }
5986
5987
5988Returns:
5989 An object of the form:
5990
5991 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005992 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
5993 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005994 ],
5995 }</pre>
5996</div>
5997
5998<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07005999 <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 -07006000 <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.
6001
6002Args:
6003 project: string, Project ID for this request. (required)
6004 zone: string, The name of the zone for this request. (required)
6005 instance: string, Name of the instance resource to update. (required)
6006 body: object, The request body.
6007 The object takes the form of:
6008
6009{ # Represents an Instance resource.
6010 #
6011 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07006012 &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.
6013 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
6014 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07006015 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006016 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
6017 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
6018 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
6019 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
6020 &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 -07006021 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07006022 &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).
6023 &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.
6024 &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.
6025 #
6026 # 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.
6027 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Dan O'Mearadd494642020-05-01 07:42:23 -07006028 #
6029 # 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.
6030 #
6031 # 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.
6032 #
6033 # 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.
6034 #
6035 # 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 -07006036 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6037 &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.
6038 &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.
6039 &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 -07006040 #
6041 # The key must meet the following requirements before you can provide it to Compute Engine:
6042 # - The key is wrapped using a RSA public key certificate provided by Google.
6043 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6044 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07006045 &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 -07006046 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006047 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
6048 &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.
6049 { # Guest OS features.
6050 &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.
6051 },
6052 ],
6053 &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.
6054 &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 -07006055 #
6056 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
6057 #
6058 # 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 -07006059 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
6060 &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.
6061 &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.
6062 &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 -07006063 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
6064 #
6065 #
6066 # 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:
6067 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
6068 # - projects/project/zones/zone/diskTypes/diskType
6069 # - 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 -07006070 &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 -07006071 #
6072 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
6073 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07006074 &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 -07006075 },
6076 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006077 &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.
6078 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07006079 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006080 &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.
6081 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
6082 &quot;A String&quot;,
6083 ],
6084 &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.
6085 &quot;A String&quot;,
6086 ],
6087 &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 -07006088 #
6089 # 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:
6090 # projects/debian-cloud/global/images/family/debian-9
6091 #
6092 #
6093 # Alternatively, use a specific version of a public operating system image:
6094 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
6095 #
6096 #
6097 # To create a disk with a custom image that you created, specify the image name in the following format:
6098 # global/images/my-custom-image
6099 #
6100 #
6101 # 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:
6102 # global/images/family/my-image-family
6103 #
6104 #
6105 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07006106 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
6107 #
6108 # 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.
6109 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6110 &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.
6111 &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.
6112 &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.
6113 #
6114 # The key must meet the following requirements before you can provide it to Compute Engine:
6115 # - The key is wrapped using a RSA public key certificate provided by Google.
6116 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6117 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6118 &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.
6119 },
6120 &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.
6121 #
6122 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
6123 # global/snapshots/my-backup
6124 #
6125 #
6126 # If the source snapshot is deleted later, this field will not be set.
6127 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
6128 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6129 &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.
6130 &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.
6131 &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.
6132 #
6133 # The key must meet the following requirements before you can provide it to Compute Engine:
6134 # - The key is wrapped using a RSA public key certificate provided by Google.
6135 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6136 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6137 &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 -07006138 },
6139 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006140 &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.
6141 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
6142 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
6143 &quot;A String&quot;,
6144 ],
6145 &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.
6146 &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.
6147 &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
6148 &quot;dbs&quot;: [ # The Key Database (db).
6149 {
6150 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6151 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
6152 },
6153 ],
6154 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
6155 {
6156 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6157 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
6158 },
6159 ],
6160 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
6161 {
6162 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6163 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
6164 },
6165 ],
6166 &quot;pk&quot;: { # The Platform Key (PK).
6167 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6168 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07006169 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006170 },
6171 &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 -07006172 #
6173 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
6174 #
6175 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07006176 &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 -07006177 },
6178 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006179 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
6180 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07006181 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006182 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
6183 &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.
6184 #
6185 # To see the latest fingerprint, make get() request to the instance.
6186 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
6187 { # A specification of the type and number of accelerator cards attached to the instance.
6188 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
6189 &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.
6190 },
6191 ],
6192 &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.
6193 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
6194 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
6195 #
6196 # 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.
6197 #
6198 # 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.
6199 #
6200 # 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.
6201 #
6202 # 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.
6203 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6204 &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.
6205 &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.
6206 &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.
6207 #
6208 # The key must meet the following requirements before you can provide it to Compute Engine:
6209 # - The key is wrapped using a RSA public key certificate provided by Google.
6210 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6211 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6212 &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.
6213 },
6214 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
6215 &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.
6216 #
6217 # To see the latest fingerprint, make get() request to the instance.
6218 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
6219 &quot;a_key&quot;: &quot;A String&quot;,
6220 },
6221 &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:
6222 # zones/us-central1-f/machineTypes/n1-standard-1
6223 #
6224 #
6225 # 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):
6226 # zones/zone/machineTypes/custom-CPUS-MEMORY
6227 #
6228 #
6229 # For example: zones/us-central1-f/machineTypes/custom-4-5120
6230 #
6231 # For a full list of restrictions, read the Specifications for custom machine types.
6232 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
6233 &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.
6234 #
6235 # To see the latest fingerprint, make a get() request to retrieve the resource.
6236 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
6237 {
6238 &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.
6239 &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).
6240 },
6241 ],
6242 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
6243 },
6244 &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;.
6245 &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.
6246 &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.
6247 { # A network interface resource attached to an instance.
6248 &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.
6249 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6250 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6251 &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.
6252 &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.
6253 &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.
6254 #
6255 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6256 #
6257 # 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.
6258 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
6259 &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.
6260 &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.
6261 &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.
6262 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
6263 },
6264 ],
6265 &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.
6266 { # An alias IP range attached to an instance&#x27;s network interface.
6267 &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).
6268 &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.
6269 },
6270 ],
6271 &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.
6272 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
6273 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
6274 &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.
6275 &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.
6276 #
6277 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
6278 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
6279 # - projects/project/global/networks/network
6280 # - global/networks/default
6281 &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.
6282 &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:
6283 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
6284 # - regions/region/subnetworks/subnetwork
6285 },
6286 ],
6287 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
6288 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
6289 &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.
6290 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
6291 &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.
6292 &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.
6293 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
6294 &quot;A String&quot;,
6295 ],
6296 },
6297 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
6298 &quot;A String&quot;,
6299 ],
6300 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
6301 &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.
6302 #
6303 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
6304 &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.
6305 &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.
6306 &quot;longTermRelease&quot;: True or False, # DEPRECATED, please use maintenance_freeze_duration_hours. TODO(b/154158138): Remove this field. Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
6307 #
6308 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
6309 #
6310 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
6311 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
6312 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
6313 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
6314 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
6315 &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.
6316 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
6317 &quot;A String&quot;,
6318 ],
6319 },
6320 ],
6321 &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.
6322 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
6323 },
6324 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
6325 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6326 &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.
6327 #
6328 # 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.
6329 { # A service account.
6330 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
6331 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
6332 &quot;A String&quot;,
6333 ],
6334 },
6335 ],
6336 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
6337 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
6338 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
6339 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
6340 },
6341 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
6342 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
6343 },
6344 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
6345 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
6346 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
6347 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
6348 },
6349 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
6350 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
6351 },
6352 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
6353 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
6354 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6355 &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.
6356 &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.
6357 &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.
6358 #
6359 # The key must meet the following requirements before you can provide it to Compute Engine:
6360 # - The key is wrapped using a RSA public key certificate provided by Google.
6361 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6362 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6363 &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.
6364 },
6365 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
6366 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
6367 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
6368 &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.
6369 &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.
6370 #
6371 # To see the latest fingerprint, make get() request to the instance.
6372 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
6373 &quot;A String&quot;,
6374 ],
6375 },
6376 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
6377 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
6378 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
6379 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
6380 },
6381 &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 -07006382}
6383
6384 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.
6385 Allowed values
6386 INVALID -
6387 NO_EFFECT -
6388 REFRESH -
6389 RESTART -
Bu Sun Kim65020912020-05-20 12:08:20 -07006390 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.
6391 Allowed values
6392 INVALID -
6393 NO_EFFECT -
6394 REFRESH -
6395 RESTART -
Dan O'Mearadd494642020-05-01 07:42:23 -07006396 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.
6397
6398For 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.
6399
6400The 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 -07006401
6402Returns:
6403 An object of the form:
6404
6405 { # Represents an Operation resource.
6406 #
6407 # Google Compute Engine has three Operation resources:
6408 #
6409 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6410 #
6411 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6412 #
6413 # Operations can be global, regional or zonal.
6414 # - For global operations, use the `globalOperations` resource.
6415 # - For regional operations, use the `regionOperations` resource.
6416 # - For zonal operations, use the `zonalOperations` resource.
6417 #
6418 # 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 -07006419 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6420 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6421 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6422 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6423 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6424 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07006425 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006426 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6427 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6428 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07006429 },
6430 ],
6431 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006432 &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`.
6433 &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.
6434 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6435 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6436 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6437 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6438 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6439 &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.
6440 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6441 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6442 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6443 &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.
6444 &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`.
6445 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6446 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6447 &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.
6448 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6449 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6450 {
6451 &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.
6452 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6453 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6454 {
6455 &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).
6456 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6457 },
6458 ],
6459 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6460 },
6461 ],
6462 &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 -07006463 }</pre>
6464</div>
6465
6466<div class="method">
6467 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07006468 <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 -07006469
6470Args:
6471 project: string, Project ID for this request. (required)
6472 zone: string, The name of the zone for this request. (required)
6473 instance: string, The instance name for this request. (required)
6474 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006475 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006476 The object takes the form of:
6477
Bu Sun Kim65020912020-05-20 12:08:20 -07006478{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6479 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6480 &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.
6481 &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.
6482 &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 -07006483 #
6484 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6485 #
6486 # 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 -07006487 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
6488 &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.
6489 &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.
6490 &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.
6491 &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 -07006492}
6493
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006494 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.
6495
6496For 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.
6497
6498The 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 -07006499
6500Returns:
6501 An object of the form:
6502
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006503 { # Represents an Operation resource.
6504 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006505 # Google Compute Engine has three Operation resources:
6506 #
6507 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6508 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006509 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6510 #
6511 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006512 # - For global operations, use the `globalOperations` resource.
6513 # - For regional operations, use the `regionOperations` resource.
6514 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006515 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006516 # 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 -07006517 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6518 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6519 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6520 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6521 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6522 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006523 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006524 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6525 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6526 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006527 },
6528 ],
6529 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006530 &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`.
6531 &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.
6532 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6533 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6534 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6535 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6536 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6537 &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.
6538 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6539 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6540 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6541 &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.
6542 &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`.
6543 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6544 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6545 &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.
6546 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6547 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6548 {
6549 &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.
6550 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6551 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6552 {
6553 &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).
6554 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6555 },
6556 ],
6557 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6558 },
6559 ],
6560 &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 -07006561 }</pre>
6562</div>
6563
6564<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006565 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006566 <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.
6567
6568Args:
6569 project: string, Project ID for this request. (required)
6570 zone: string, The name of the zone for this request. (required)
6571 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006572 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006573 The object takes the form of:
6574
6575{ # A set of Display Device options
Bu Sun Kim65020912020-05-20 12:08:20 -07006576 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006577}
6578
6579 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.
6580
6581For 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.
6582
6583The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6584
6585Returns:
6586 An object of the form:
6587
6588 { # Represents an Operation resource.
6589 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006590 # Google Compute Engine has three Operation resources:
6591 #
6592 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6593 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006594 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6595 #
6596 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006597 # - For global operations, use the `globalOperations` resource.
6598 # - For regional operations, use the `regionOperations` resource.
6599 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006600 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006601 # 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 -07006602 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6603 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6604 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6605 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6606 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6607 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006608 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006609 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6610 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6611 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006612 },
6613 ],
6614 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006615 &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`.
6616 &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.
6617 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6618 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6619 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6620 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6621 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6622 &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.
6623 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6624 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6625 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6626 &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.
6627 &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`.
6628 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6629 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6630 &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.
6631 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6632 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6633 {
6634 &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.
6635 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6636 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6637 {
6638 &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).
6639 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6640 },
6641 ],
6642 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6643 },
6644 ],
6645 &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 -07006646 }</pre>
6647</div>
6648
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006649<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006650 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07006651 <pre>Updates an instance&#x27;s network interface. This method follows PATCH semantics.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006652
6653Args:
6654 project: string, Project ID for this request. (required)
6655 zone: string, The name of the zone for this request. (required)
6656 instance: string, The instance name for this request. (required)
6657 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006658 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006659 The object takes the form of:
6660
6661{ # A network interface resource attached to an instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006662 &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.
6663 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6664 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6665 &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.
6666 &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.
6667 &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 -07006668 #
6669 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6670 #
6671 # 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 -07006672 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
6673 &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.
6674 &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.
6675 &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.
6676 &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 -07006677 },
6678 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006679 &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.
6680 { # An alias IP range attached to an instance&#x27;s network interface.
6681 &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).
6682 &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.
6683 },
6684 ],
6685 &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.
6686 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
6687 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
6688 &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.
6689 &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 -04006690 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006691 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
6692 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
6693 # - projects/project/global/networks/network
6694 # - global/networks/default
Bu Sun Kim65020912020-05-20 12:08:20 -07006695 &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.
6696 &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:
6697 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
6698 # - regions/region/subnetworks/subnetwork
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006699}
6700
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006701 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.
6702
6703For 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.
6704
6705The 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 -04006706
6707Returns:
6708 An object of the form:
6709
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006710 { # Represents an Operation resource.
6711 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006712 # Google Compute Engine has three Operation resources:
6713 #
6714 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6715 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006716 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6717 #
6718 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006719 # - For global operations, use the `globalOperations` resource.
6720 # - For regional operations, use the `regionOperations` resource.
6721 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006722 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006723 # 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 -07006724 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6725 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6726 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6727 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6728 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6729 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006730 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006731 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6732 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6733 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006734 },
6735 ],
6736 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006737 &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`.
6738 &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.
6739 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6740 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6741 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6742 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6743 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6744 &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.
6745 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6746 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6747 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6748 &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.
6749 &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`.
6750 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6751 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6752 &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.
6753 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6754 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6755 {
6756 &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.
6757 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6758 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6759 {
6760 &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).
6761 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6762 },
6763 ],
6764 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6765 },
6766 ],
6767 &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 -07006768 }</pre>
6769</div>
6770
6771<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006772 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006773 <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.
6774
6775Args:
6776 project: string, Project ID for this request. (required)
6777 zone: string, The name of the zone for this request. (required)
6778 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006779 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006780 The object takes the form of:
6781
6782{ # A set of Shielded Instance options.
Bu Sun Kim65020912020-05-20 12:08:20 -07006783 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
6784 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
6785 &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 -07006786}
6787
6788 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.
6789
6790For 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.
6791
6792The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6793
6794Returns:
6795 An object of the form:
6796
6797 { # Represents an Operation resource.
6798 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006799 # Google Compute Engine has three Operation resources:
6800 #
6801 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6802 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006803 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6804 #
6805 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006806 # - For global operations, use the `globalOperations` resource.
6807 # - For regional operations, use the `regionOperations` resource.
6808 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006809 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006810 # 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 -07006811 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6812 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6813 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6814 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6815 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6816 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006817 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006818 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6819 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6820 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006821 },
6822 ],
6823 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006824 &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`.
6825 &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.
6826 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6827 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6828 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6829 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6830 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6831 &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.
6832 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6833 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6834 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6835 &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.
6836 &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`.
6837 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6838 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6839 &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.
6840 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6841 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6842 {
6843 &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.
6844 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6845 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6846 {
6847 &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).
6848 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6849 },
6850 ],
6851 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6852 },
6853 ],
6854 &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 -07006855 }</pre>
6856</div>
6857
6858<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006859 <code class="details" id="updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006860 <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.
6861
6862Args:
6863 project: string, Project ID for this request. (required)
6864 zone: string, The name of the zone for this request. (required)
6865 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006866 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006867 The object takes the form of:
6868
6869{ # A set of Shielded VM options.
Bu Sun Kim65020912020-05-20 12:08:20 -07006870 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
6871 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
6872 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006873}
6874
6875 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.
6876
6877For 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.
6878
6879The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6880
6881Returns:
6882 An object of the form:
6883
6884 { # Represents an Operation resource.
6885 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006886 # Google Compute Engine has three Operation resources:
6887 #
6888 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6889 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006890 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6891 #
6892 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006893 # - For global operations, use the `globalOperations` resource.
6894 # - For regional operations, use the `regionOperations` resource.
6895 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006896 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006897 # 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 -07006898 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6899 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6900 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6901 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6902 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6903 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006904 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006905 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6906 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6907 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006908 },
6909 ],
6910 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006911 &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`.
6912 &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.
6913 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6914 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6915 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6916 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6917 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6918 &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.
6919 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6920 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6921 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6922 &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.
6923 &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`.
6924 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6925 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6926 &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.
6927 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6928 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6929 {
6930 &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.
6931 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6932 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6933 {
6934 &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).
6935 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6936 },
6937 ],
6938 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6939 },
6940 ],
6941 &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 -04006942 }</pre>
6943</div>
6944
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006945</body></html>