blob: 1c810025d54d393adcc93f4ddfec2c98e5d18c71 [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 Kimd059ad82020-07-22 17:02:09 -0700136<p class="firstline">Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400137<p class="toc_element">
138 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
139<p class="firstline">Retrieves the next page of results.</p>
140<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700141 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
142<p class="firstline">Retrieves the next page of results.</p>
143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
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>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700181<p class="firstline">Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700182<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400184<p class="firstline">Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.</p>
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 Kimd059ad82020-07-22 17:02:09 -0700518 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &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.
520 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
521 &quot;A String&quot;,
522 ],
523 &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.
524 &quot;A String&quot;,
525 ],
526 &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 -0700527 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 # 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:
529 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700530 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700531 #
532 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700534 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700535 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 # To create a disk with a custom image that you created, specify the image name in the following format:
537 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700538 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700539 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700540 # 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:
541 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700542 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800543 #
544 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700545 &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.
546 #
547 # 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.
548 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
549 &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.
550 &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.
551 &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.
552 #
553 # The key must meet the following requirements before you can provide it to Compute Engine:
554 # - The key is wrapped using a RSA public key certificate provided by Google.
555 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
556 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
557 &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.
558 },
559 &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.
560 #
561 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
562 # global/snapshots/my-backup
563 #
564 #
565 # If the source snapshot is deleted later, this field will not be set.
566 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
567 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
568 &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.
569 &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.
570 &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.
571 #
572 # The key must meet the following requirements before you can provide it to Compute Engine:
573 # - The key is wrapped using a RSA public key certificate provided by Google.
574 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
575 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
576 &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 -0700577 },
578 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700579 &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.
580 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
581 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
582 &quot;A String&quot;,
583 ],
584 &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.
585 &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.
586 &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
587 &quot;dbs&quot;: [ # The Key Database (db).
588 {
589 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
590 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
591 },
592 ],
593 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
594 {
595 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
596 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
597 },
598 ],
599 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
600 {
601 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
602 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
603 },
604 ],
605 &quot;pk&quot;: { # The Platform Key (PK).
606 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
607 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700609 },
610 &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 -0800611 #
612 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
613 #
614 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700615 &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 -0700616 },
617 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
619 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -0700620 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
622 &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.
623 #
624 # To see the latest fingerprint, make get() request to the instance.
625 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
626 { # A specification of the type and number of accelerator cards attached to the instance.
627 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
628 &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.
629 },
630 ],
631 &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.
632 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
633 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
634 #
635 # 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.
636 #
637 # 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.
638 #
639 # 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.
640 #
641 # 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.
642 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
643 &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.
644 &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.
645 &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.
646 #
647 # The key must meet the following requirements before you can provide it to Compute Engine:
648 # - The key is wrapped using a RSA public key certificate provided by Google.
649 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
650 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
651 &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.
652 },
653 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
654 &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.
655 #
656 # To see the latest fingerprint, make get() request to the instance.
657 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
658 &quot;a_key&quot;: &quot;A String&quot;,
659 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700660 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
661 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
662 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &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:
664 # zones/us-central1-f/machineTypes/n1-standard-1
665 #
666 #
667 # 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):
668 # zones/zone/machineTypes/custom-CPUS-MEMORY
669 #
670 #
671 # For example: zones/us-central1-f/machineTypes/custom-4-5120
672 #
673 # For a full list of restrictions, read the Specifications for custom machine types.
674 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
675 &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.
676 #
677 # To see the latest fingerprint, make a get() request to retrieve the resource.
678 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
679 {
680 &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.
681 &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).
682 },
683 ],
684 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
685 },
686 &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;.
687 &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.
688 &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.
689 { # A network interface resource attached to an instance.
690 &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.
691 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
692 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
693 &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.
694 &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.
695 &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.
696 #
697 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
698 #
699 # 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.
700 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
701 &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.
702 &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.
703 &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.
704 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
705 },
706 ],
707 &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.
708 { # An alias IP range attached to an instance&#x27;s network interface.
709 &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).
710 &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.
711 },
712 ],
713 &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.
714 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
715 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
716 &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.
717 &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.
718 #
719 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
720 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
721 # - projects/project/global/networks/network
722 # - global/networks/default
723 &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.
724 &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:
725 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
726 # - regions/region/subnetworks/subnetwork
727 },
728 ],
729 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
730 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
731 &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.
732 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
733 &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.
734 &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.
735 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
736 &quot;A String&quot;,
737 ],
738 },
739 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
740 &quot;A String&quot;,
741 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700742 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700743 &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.
744 #
745 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
746 &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.
747 &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.
748 &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.
749 #
750 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
751 #
752 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700753 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
755 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
756 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
757 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
758 &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.
759 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
760 &quot;A String&quot;,
761 ],
762 },
763 ],
764 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700765 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 },
767 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
768 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
769 &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.
770 #
771 # 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.
772 { # A service account.
773 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
774 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
775 &quot;A String&quot;,
776 ],
777 },
778 ],
779 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
780 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
781 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
782 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
783 },
784 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
785 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
786 },
787 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
788 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
789 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
790 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
791 },
792 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
793 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
794 },
795 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
796 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
797 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
798 &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.
799 &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.
800 &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.
801 #
802 # The key must meet the following requirements before you can provide it to Compute Engine:
803 # - The key is wrapped using a RSA public key certificate provided by Google.
804 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
805 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
806 &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.
807 },
808 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700809 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -0700810 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
811 &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.
812 &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.
813 #
814 # To see the latest fingerprint, make get() request to the instance.
815 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
816 &quot;A String&quot;,
817 ],
818 },
819 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
820 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
821 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
822 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
823 },
824 &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 -0700825 },
826 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700827 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
828 &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.
829 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
830 # &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 -0700831 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700832 &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).
833 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700834 },
835 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700836 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700837 },
838 },
839 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700840 &quot;kind&quot;: &quot;compute#instanceAggregatedList&quot;, # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
841 &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.
842 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
843 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
844 &quot;A String&quot;,
845 ],
846 &quot;warning&quot;: { # [Output Only] Informational warning message.
847 &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.
848 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
849 # &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 -0700850 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 &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).
852 &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 -0700853 },
854 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700855 &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 -0700856 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700857 }</pre>
858</div>
859
860<div class="method">
861 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
862 <pre>Retrieves the next page of results.
863
864Args:
865 previous_request: The request for the previous page. (required)
866 previous_response: The response from the request for the previous page. (required)
867
868Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700870 page. Returns None if there are no more items in the collection.
871 </pre>
872</div>
873
874<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400876 <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 -0700877
878Args:
879 project: string, Project ID for this request. (required)
880 zone: string, The name of the zone for this request. (required)
881 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700882 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700883 The object takes the form of:
884
885{ # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700886 &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).
887 &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.
888 &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.
889 #
890 # 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.
891 &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 -0700892 #
893 # 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.
894 #
895 # 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.
896 #
897 # 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.
898 #
899 # 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 -0700900 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
901 &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.
902 &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.
903 &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 -0700904 #
905 # The key must meet the following requirements before you can provide it to Compute Engine:
906 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 # - 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 -0700908 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -0700909 &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 -0700910 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
912 &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.
913 { # Guest OS features.
914 &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.
915 },
916 ],
917 &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.
918 &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 -0700919 #
920 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
921 #
922 # 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 -0700923 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
924 &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.
925 &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.
926 &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 -0700927 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
928 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700929 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700930 # 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:
931 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
932 # - projects/project/zones/zone/diskTypes/diskType
933 # - 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 -0700934 &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 -0700935 #
936 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
937 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700938 &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 -0700939 },
940 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700941 &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.
942 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700943 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700944 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700945 &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.
946 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
947 &quot;A String&quot;,
948 ],
949 &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.
950 &quot;A String&quot;,
951 ],
952 &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 -0700953 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700954 # 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:
955 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700956 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700957 #
958 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700960 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700961 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 # To create a disk with a custom image that you created, specify the image name in the following format:
963 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700964 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700965 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700966 # 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:
967 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700968 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800969 #
970 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700971 &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.
972 #
973 # 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.
974 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
975 &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.
976 &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.
977 &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.
978 #
979 # The key must meet the following requirements before you can provide it to Compute Engine:
980 # - The key is wrapped using a RSA public key certificate provided by Google.
981 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
982 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
983 &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.
984 },
985 &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.
986 #
987 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
988 # global/snapshots/my-backup
989 #
990 #
991 # If the source snapshot is deleted later, this field will not be set.
992 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
993 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
994 &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.
995 &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.
996 &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.
997 #
998 # The key must meet the following requirements before you can provide it to Compute Engine:
999 # - The key is wrapped using a RSA public key certificate provided by Google.
1000 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1001 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1002 &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 -07001003 },
1004 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001005 &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.
1006 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1007 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1008 &quot;A String&quot;,
1009 ],
1010 &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.
1011 &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.
1012 &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
1013 &quot;dbs&quot;: [ # The Key Database (db).
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;dbxs&quot;: [ # The forbidden key database (dbx).
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;keks&quot;: [ # The Key Exchange Key (KEK).
1026 {
1027 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1028 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1029 },
1030 ],
1031 &quot;pk&quot;: { # The Platform Key (PK).
1032 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1033 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001034 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001035 },
1036 &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 -08001037 #
1038 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1039 #
1040 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001041 &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 -07001042}
1043
Bu Sun Kim65020912020-05-20 12:08:20 -07001044 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 -07001045 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.
1046
1047For 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.
1048
1049The 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 -07001050
1051Returns:
1052 An object of the form:
1053
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 { # Represents an Operation resource.
1055 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001056 # Google Compute Engine has three Operation resources:
1057 #
1058 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1059 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001060 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1061 #
1062 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001063 # - For global operations, use the `globalOperations` resource.
1064 # - For regional operations, use the `regionOperations` resource.
1065 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001066 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001067 # 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 -07001068 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1069 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1070 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1071 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1072 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1073 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001074 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001075 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1076 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1077 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07001078 },
1079 ],
1080 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001081 &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`.
1082 &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.
1083 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1084 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1085 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1086 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1087 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1088 &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.
1089 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1090 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1091 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1092 &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.
1093 &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`.
1094 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1095 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1096 &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.
1097 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1098 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1099 {
1100 &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.
1101 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1102 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1103 {
1104 &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).
1105 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1106 },
1107 ],
1108 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1109 },
1110 ],
1111 &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 -07001112 }</pre>
1113</div>
1114
1115<div class="method">
1116 <code class="details" id="bulkInsert">bulkInsert(project, zone, body=None, requestId=None)</code>
1117 <pre>Creates multiple instances. Count specifies the number of instances to create.
1118
1119Args:
1120 project: string, Project ID for this request. (required)
1121 zone: string, The name of the zone for this request. (required)
1122 body: object, The request body.
1123 The object takes the form of:
1124
1125{
Bu Sun Kim65020912020-05-20 12:08:20 -07001126 &quot;count&quot;: &quot;A String&quot;, # The maximum number of instances to create.
Bu Sun Kim65020912020-05-20 12:08:20 -07001127 &quot;instance&quot;: { # Represents an Instance resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001128 #
1129 # 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 -07001130 &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.
1131 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
1132 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001133 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1135 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1136 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1137 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1138 &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 -07001139 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001140 &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).
1141 &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.
1142 &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.
1143 #
1144 # 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.
1145 &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 -07001146 #
1147 # 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.
1148 #
1149 # 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.
1150 #
1151 # 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.
1152 #
1153 # 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 -07001154 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1155 &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.
1156 &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.
1157 &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 -07001158 #
1159 # The key must meet the following requirements before you can provide it to Compute Engine:
1160 # - The key is wrapped using a RSA public key certificate provided by Google.
1161 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1162 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07001163 &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 -07001164 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001165 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1166 &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.
1167 { # Guest OS features.
1168 &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.
1169 },
1170 ],
1171 &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.
1172 &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 -07001173 #
1174 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1175 #
1176 # 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 -07001177 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1178 &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.
1179 &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.
1180 &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 -07001181 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1182 #
1183 #
1184 # 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:
1185 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1186 # - projects/project/zones/zone/diskTypes/diskType
1187 # - 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 -07001188 &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 -07001189 #
1190 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1191 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 &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 -07001193 },
1194 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001195 &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.
1196 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001197 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001198 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001199 &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.
1200 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1201 &quot;A String&quot;,
1202 ],
1203 &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.
1204 &quot;A String&quot;,
1205 ],
1206 &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 -07001207 #
1208 # 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:
1209 # projects/debian-cloud/global/images/family/debian-9
1210 #
1211 #
1212 # Alternatively, use a specific version of a public operating system image:
1213 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1214 #
1215 #
1216 # To create a disk with a custom image that you created, specify the image name in the following format:
1217 # global/images/my-custom-image
1218 #
1219 #
1220 # 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:
1221 # global/images/family/my-image-family
1222 #
1223 #
1224 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001225 &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.
1226 #
1227 # 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.
1228 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1229 &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.
1230 &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.
1231 &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.
1232 #
1233 # The key must meet the following requirements before you can provide it to Compute Engine:
1234 # - The key is wrapped using a RSA public key certificate provided by Google.
1235 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1236 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1237 &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.
1238 },
1239 &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.
1240 #
1241 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1242 # global/snapshots/my-backup
1243 #
1244 #
1245 # If the source snapshot is deleted later, this field will not be set.
1246 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1247 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1248 &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.
1249 &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.
1250 &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.
1251 #
1252 # The key must meet the following requirements before you can provide it to Compute Engine:
1253 # - The key is wrapped using a RSA public key certificate provided by Google.
1254 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1255 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1256 &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 -07001257 },
1258 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001259 &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.
1260 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1261 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1262 &quot;A String&quot;,
1263 ],
1264 &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.
1265 &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.
1266 &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
1267 &quot;dbs&quot;: [ # The Key Database (db).
1268 {
1269 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1270 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1271 },
1272 ],
1273 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1274 {
1275 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1276 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1277 },
1278 ],
1279 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1280 {
1281 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1282 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1283 },
1284 ],
1285 &quot;pk&quot;: { # The Platform Key (PK).
1286 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1287 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001288 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001289 },
1290 &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 -07001291 #
1292 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1293 #
1294 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001295 &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 -07001296 },
1297 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001298 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1299 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001300 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001301 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
1302 &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.
1303 #
1304 # To see the latest fingerprint, make get() request to the instance.
1305 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1306 { # A specification of the type and number of accelerator cards attached to the instance.
1307 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1308 &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.
1309 },
1310 ],
1311 &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.
1312 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1313 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
1314 #
1315 # 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.
1316 #
1317 # 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.
1318 #
1319 # 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.
1320 #
1321 # 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.
1322 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1323 &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.
1324 &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.
1325 &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.
1326 #
1327 # The key must meet the following requirements before you can provide it to Compute Engine:
1328 # - The key is wrapped using a RSA public key certificate provided by Google.
1329 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1330 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1331 &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.
1332 },
1333 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1334 &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.
1335 #
1336 # To see the latest fingerprint, make get() request to the instance.
1337 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1338 &quot;a_key&quot;: &quot;A String&quot;,
1339 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001340 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
1341 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
1342 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07001343 &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:
1344 # zones/us-central1-f/machineTypes/n1-standard-1
1345 #
1346 #
1347 # 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):
1348 # zones/zone/machineTypes/custom-CPUS-MEMORY
1349 #
1350 #
1351 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1352 #
1353 # For a full list of restrictions, read the Specifications for custom machine types.
1354 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1355 &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.
1356 #
1357 # To see the latest fingerprint, make a get() request to retrieve the resource.
1358 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1359 {
1360 &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.
1361 &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).
1362 },
1363 ],
1364 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1365 },
1366 &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;.
1367 &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.
1368 &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.
1369 { # A network interface resource attached to an instance.
1370 &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.
1371 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1372 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1373 &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.
1374 &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.
1375 &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.
1376 #
1377 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1378 #
1379 # 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.
1380 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
1381 &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.
1382 &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.
1383 &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.
1384 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1385 },
1386 ],
1387 &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.
1388 { # An alias IP range attached to an instance&#x27;s network interface.
1389 &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).
1390 &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.
1391 },
1392 ],
1393 &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.
1394 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
1395 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1396 &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.
1397 &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.
1398 #
1399 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1400 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1401 # - projects/project/global/networks/network
1402 # - global/networks/default
1403 &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.
1404 &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:
1405 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1406 # - regions/region/subnetworks/subnetwork
1407 },
1408 ],
1409 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
1410 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
1411 &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.
1412 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1413 &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.
1414 &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.
1415 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1416 &quot;A String&quot;,
1417 ],
1418 },
1419 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
1420 &quot;A String&quot;,
1421 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001422 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001423 &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.
1424 #
1425 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1426 &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.
1427 &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.
1428 &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.
1429 #
1430 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
1431 #
1432 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001433 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001434 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1435 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1436 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1437 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1438 &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.
1439 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1440 &quot;A String&quot;,
1441 ],
1442 },
1443 ],
1444 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001445 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07001446 },
1447 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1448 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1449 &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.
1450 #
1451 # 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.
1452 { # A service account.
1453 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1454 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1455 &quot;A String&quot;,
1456 ],
1457 },
1458 ],
1459 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1460 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1461 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1462 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1463 },
1464 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which 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;shieldedVmConfig&quot;: { # A set of Shielded VM options.
1468 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
1469 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
1470 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
1471 },
1472 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
1473 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1474 },
1475 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
1476 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
1477 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1478 &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.
1479 &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.
1480 &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.
1481 #
1482 # The key must meet the following requirements before you can provide it to Compute Engine:
1483 # - The key is wrapped using a RSA public key certificate provided by Google.
1484 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1485 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1486 &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.
1487 },
1488 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001489 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07001490 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
1491 &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.
1492 &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.
1493 #
1494 # To see the latest fingerprint, make get() request to the instance.
1495 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1496 &quot;A String&quot;,
1497 ],
1498 },
1499 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
1500 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
1501 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
1502 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
1503 },
1504 &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 -07001505 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001506 &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.
1507 &quot;predefinedNames&quot;: [ # List of predefined names. The number of names provided must be equal to count.
1508 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001509 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001510 &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:
1511 # - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
1512 # - projects/project/global/instanceTemplates/instanceTemplate
1513 # - global/instanceTemplates/instanceTemplate
Dan O'Mearadd494642020-05-01 07:42:23 -07001514 }
1515
1516 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.
1517
1518For 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.
1519
1520The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1521
1522Returns:
1523 An object of the form:
1524
1525 { # Represents an Operation resource.
1526 #
1527 # Google Compute Engine has three Operation resources:
1528 #
1529 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1530 #
1531 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1532 #
1533 # Operations can be global, regional or zonal.
1534 # - For global operations, use the `globalOperations` resource.
1535 # - For regional operations, use the `regionOperations` resource.
1536 # - For zonal operations, use the `zonalOperations` resource.
1537 #
1538 # 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 -07001539 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1540 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1541 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1542 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1543 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1544 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001545 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001546 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1547 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1548 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001549 },
1550 ],
1551 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001552 &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`.
1553 &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.
1554 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1555 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1556 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1557 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1558 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1559 &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.
1560 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1561 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1562 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1563 &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.
1564 &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`.
1565 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1566 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1567 &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.
1568 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1569 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1570 {
1571 &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.
1572 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1573 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1574 {
1575 &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).
1576 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1577 },
1578 ],
1579 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1580 },
1581 ],
1582 &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 -07001583 }</pre>
1584</div>
1585
1586<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001587 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001588 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
1589
1590Args:
1591 project: string, Project ID for this request. (required)
1592 zone: string, The name of the zone for this request. (required)
1593 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001594 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.
1595
1596For 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.
1597
1598The 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 -07001599
1600Returns:
1601 An object of the form:
1602
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001603 { # Represents an Operation resource.
1604 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001605 # Google Compute Engine has three Operation resources:
1606 #
1607 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1608 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001609 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1610 #
1611 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001612 # - For global operations, use the `globalOperations` resource.
1613 # - For regional operations, use the `regionOperations` resource.
1614 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001615 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001616 # 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 -07001617 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1618 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1619 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1620 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1621 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1622 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001623 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001624 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1625 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1626 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001627 },
1628 ],
1629 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001630 &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`.
1631 &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.
1632 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1633 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1634 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1635 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1636 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1637 &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.
1638 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1639 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1640 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1641 &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.
1642 &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`.
1643 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1644 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1645 &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.
1646 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1647 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1648 {
1649 &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.
1650 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1651 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1652 {
1653 &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).
1654 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1655 },
1656 ],
1657 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1658 },
1659 ],
1660 &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 -07001661 }</pre>
1662</div>
1663
1664<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001665 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001666 <pre>Deletes an access config from an instance&#x27;s network interface.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001667
1668Args:
1669 project: string, Project ID for this request. (required)
1670 zone: string, The name of the zone for this request. (required)
1671 instance: string, The instance name for this request. (required)
1672 accessConfig: string, The name of the access config to delete. (required)
1673 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001674 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.
1675
1676For 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.
1677
1678The 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 -07001679
1680Returns:
1681 An object of the form:
1682
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001683 { # Represents an Operation resource.
1684 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001685 # Google Compute Engine has three Operation resources:
1686 #
1687 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1688 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001689 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1690 #
1691 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001692 # - For global operations, use the `globalOperations` resource.
1693 # - For regional operations, use the `regionOperations` resource.
1694 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001695 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001696 # 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 -07001697 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1698 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1699 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1700 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1701 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1702 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001703 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001704 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1705 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1706 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001707 },
1708 ],
1709 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001710 &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`.
1711 &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.
1712 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1713 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1714 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1715 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1716 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1717 &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.
1718 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1719 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1720 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1721 &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.
1722 &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`.
1723 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1724 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1725 &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.
1726 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1727 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1728 {
1729 &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.
1730 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1731 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1732 {
1733 &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).
1734 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1735 },
1736 ],
1737 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1738 },
1739 ],
1740 &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 -07001741 }</pre>
1742</div>
1743
1744<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001745 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001746 <pre>Detaches a disk from an instance.
1747
1748Args:
1749 project: string, Project ID for this request. (required)
1750 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001751 instance: string, Instance name for this request. (required)
1752 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)
1753 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.
1754
1755For 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.
1756
1757The 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 -07001758
1759Returns:
1760 An object of the form:
1761
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001762 { # Represents an Operation resource.
1763 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001764 # Google Compute Engine has three Operation resources:
1765 #
1766 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1767 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001768 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1769 #
1770 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001771 # - For global operations, use the `globalOperations` resource.
1772 # - For regional operations, use the `regionOperations` resource.
1773 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001774 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001775 # 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 -07001776 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1777 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1778 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1779 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1780 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1781 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001782 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001783 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1784 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1785 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001786 },
1787 ],
1788 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001789 &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`.
1790 &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.
1791 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1792 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1793 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1794 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1795 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1796 &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.
1797 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1798 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1799 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1800 &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.
1801 &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`.
1802 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1803 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1804 &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.
1805 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1806 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1807 {
1808 &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.
1809 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1810 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1811 {
1812 &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).
1813 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1814 },
1815 ],
1816 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1817 },
1818 ],
1819 &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 -07001820 }</pre>
1821</div>
1822
1823<div class="method">
1824 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001825 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001826
1827Args:
1828 project: string, Project ID for this request. (required)
1829 zone: string, The name of the zone for this request. (required)
1830 instance: string, Name of the instance resource to return. (required)
1831
1832Returns:
1833 An object of the form:
1834
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001835 { # Represents an Instance resource.
1836 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001837 # 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 -07001838 &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.
1839 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
1840 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001841 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001842 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1843 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1844 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1845 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1846 &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 -07001847 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001848 &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).
1849 &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.
1850 &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.
1851 #
1852 # 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.
1853 &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 -07001854 #
1855 # 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.
1856 #
1857 # 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.
1858 #
1859 # 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.
1860 #
1861 # 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 -07001862 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1863 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1864 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1865 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001866 #
1867 # The key must meet the following requirements before you can provide it to Compute Engine:
1868 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001869 # - 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 -07001870 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07001871 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001872 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001873 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1874 &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.
1875 { # Guest OS features.
1876 &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.
1877 },
1878 ],
1879 &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.
1880 &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 -07001881 #
1882 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1883 #
1884 # 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 -07001885 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1886 &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.
1887 &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.
1888 &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 -07001889 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1890 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001891 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001892 # 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:
1893 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1894 # - projects/project/zones/zone/diskTypes/diskType
1895 # - 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 -07001896 &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 -07001897 #
1898 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1899 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001900 &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 -07001901 },
1902 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001903 &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.
1904 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001905 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001906 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001907 &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.
1908 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1909 &quot;A String&quot;,
1910 ],
1911 &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.
1912 &quot;A String&quot;,
1913 ],
1914 &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 -07001915 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001916 # 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:
1917 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001918 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001919 #
1920 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001921 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001922 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001923 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001924 # To create a disk with a custom image that you created, specify the image name in the following format:
1925 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001926 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001927 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001928 # 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:
1929 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001930 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001931 #
1932 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001933 &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.
1934 #
1935 # 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.
1936 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1937 &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.
1938 &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.
1939 &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.
1940 #
1941 # The key must meet the following requirements before you can provide it to Compute Engine:
1942 # - The key is wrapped using a RSA public key certificate provided by Google.
1943 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1944 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1945 &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.
1946 },
1947 &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.
1948 #
1949 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1950 # global/snapshots/my-backup
1951 #
1952 #
1953 # If the source snapshot is deleted later, this field will not be set.
1954 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1955 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1956 &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.
1957 &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.
1958 &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.
1959 #
1960 # The key must meet the following requirements before you can provide it to Compute Engine:
1961 # - The key is wrapped using a RSA public key certificate provided by Google.
1962 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1963 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1964 &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 -07001965 },
1966 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001967 &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.
1968 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1969 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1970 &quot;A String&quot;,
1971 ],
1972 &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.
1973 &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.
1974 &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
1975 &quot;dbs&quot;: [ # The Key Database (db).
1976 {
1977 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1978 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1979 },
1980 ],
1981 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
1982 {
1983 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1984 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1985 },
1986 ],
1987 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
1988 {
1989 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1990 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
1991 },
1992 ],
1993 &quot;pk&quot;: { # The Platform Key (PK).
1994 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1995 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001996 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001997 },
1998 &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 -08001999 #
2000 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2001 #
2002 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002003 &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 -07002004 },
2005 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002006 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2007 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07002008 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002009 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2010 &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.
2011 #
2012 # To see the latest fingerprint, make get() request to the instance.
2013 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2014 { # A specification of the type and number of accelerator cards attached to the instance.
2015 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2016 &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.
2017 },
2018 ],
2019 &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.
2020 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2021 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
2022 #
2023 # 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.
2024 #
2025 # 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.
2026 #
2027 # 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.
2028 #
2029 # 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.
2030 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2031 &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.
2032 &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.
2033 &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.
2034 #
2035 # The key must meet the following requirements before you can provide it to Compute Engine:
2036 # - The key is wrapped using a RSA public key certificate provided by Google.
2037 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2038 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2039 &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.
2040 },
2041 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2042 &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.
2043 #
2044 # To see the latest fingerprint, make get() request to the instance.
2045 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2046 &quot;a_key&quot;: &quot;A String&quot;,
2047 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002048 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
2049 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
2050 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07002051 &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:
2052 # zones/us-central1-f/machineTypes/n1-standard-1
2053 #
2054 #
2055 # 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):
2056 # zones/zone/machineTypes/custom-CPUS-MEMORY
2057 #
2058 #
2059 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2060 #
2061 # For a full list of restrictions, read the Specifications for custom machine types.
2062 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2063 &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.
2064 #
2065 # To see the latest fingerprint, make a get() request to retrieve the resource.
2066 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2067 {
2068 &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.
2069 &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).
2070 },
2071 ],
2072 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2073 },
2074 &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;.
2075 &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.
2076 &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.
2077 { # A network interface resource attached to an instance.
2078 &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.
2079 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2080 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2081 &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.
2082 &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.
2083 &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.
2084 #
2085 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2086 #
2087 # 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.
2088 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
2089 &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.
2090 &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.
2091 &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.
2092 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2093 },
2094 ],
2095 &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.
2096 { # An alias IP range attached to an instance&#x27;s network interface.
2097 &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).
2098 &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.
2099 },
2100 ],
2101 &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.
2102 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
2103 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2104 &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.
2105 &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.
2106 #
2107 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2108 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2109 # - projects/project/global/networks/network
2110 # - global/networks/default
2111 &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.
2112 &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:
2113 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2114 # - regions/region/subnetworks/subnetwork
2115 },
2116 ],
2117 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
2118 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
2119 &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.
2120 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2121 &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.
2122 &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.
2123 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2124 &quot;A String&quot;,
2125 ],
2126 },
2127 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2128 &quot;A String&quot;,
2129 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002130 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002131 &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.
2132 #
2133 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
2134 &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.
2135 &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.
2136 &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.
2137 #
2138 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
2139 #
2140 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002141 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002142 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
2143 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2144 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2145 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2146 &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.
2147 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2148 &quot;A String&quot;,
2149 ],
2150 },
2151 ],
2152 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002153 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07002154 },
2155 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2156 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2157 &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.
2158 #
2159 # 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.
2160 { # A service account.
2161 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2162 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2163 &quot;A String&quot;,
2164 ],
2165 },
2166 ],
2167 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2168 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2169 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2170 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2171 },
2172 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2173 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2174 },
2175 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
2176 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
2177 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
2178 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
2179 },
2180 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
2181 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2182 },
2183 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
2184 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
2185 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2186 &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.
2187 &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.
2188 &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.
2189 #
2190 # The key must meet the following requirements before you can provide it to Compute Engine:
2191 # - The key is wrapped using a RSA public key certificate provided by Google.
2192 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2193 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2194 &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.
2195 },
2196 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002197 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07002198 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2199 &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.
2200 &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.
2201 #
2202 # To see the latest fingerprint, make get() request to the instance.
2203 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2204 &quot;A String&quot;,
2205 ],
2206 },
2207 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
2208 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
2209 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
2210 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
2211 },
2212 &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 -07002213 }</pre>
2214</div>
2215
2216<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002217 <code class="details" id="getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</code>
2218 <pre>Returns effective firewalls applied to an interface of the instance.
2219
2220Args:
2221 project: string, Project ID for this request. (required)
2222 zone: string, The name of the zone for this request. (required)
2223 instance: string, Name of the instance scoping this request. (required)
2224 networkInterface: string, The name of the network interface to get the effective firewalls. (required)
2225
2226Returns:
2227 An object of the form:
2228
2229 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002230 &quot;firewalls&quot;: [ # Effective firewalls on the instance.
2231 { # Represents a Firewall Rule resource.
2232 #
2233 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
2234 &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.
2235 {
2236 &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.
2237 &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.
2238 #
2239 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2240 &quot;A String&quot;,
2241 ],
2242 },
2243 ],
2244 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2245 &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.
2246 {
2247 &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.
2248 &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.
2249 #
2250 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2251 &quot;A String&quot;,
2252 ],
2253 },
2254 ],
2255 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this field when you create the resource.
2256 &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.
2257 &quot;A String&quot;,
2258 ],
2259 &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.
2260 &quot;disabled&quot;: True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002261 &quot;enableLogging&quot;: True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported t Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07002262 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2263 &quot;kind&quot;: &quot;compute#firewall&quot;, # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002264 &quot;logConfig&quot;: { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07002265 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for a particular firewall rule.
2266 &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.
2267 },
2268 &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.
2269 &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:
2270 # global/networks/default
2271 # 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:
2272 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
2273 # - projects/myproject/global/networks/my-network
2274 # - global/networks/default
2275 &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`.
2276 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2277 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
2278 &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.
2279 &quot;A String&quot;,
2280 ],
2281 &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.
2282 &quot;A String&quot;,
2283 ],
2284 &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.
2285 &quot;A String&quot;,
2286 ],
2287 &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.
2288 &quot;A String&quot;,
2289 ],
2290 &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.
2291 &quot;A String&quot;,
2292 ],
2293 },
2294 ],
2295 &quot;organizationFirewalls&quot;: [ # Effective firewalls from organization policies.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002296 { # A pruned SecurityPolicy containing ID and any applicable firewall rules.
Bu Sun Kim65020912020-05-20 12:08:20 -07002297 &quot;id&quot;: &quot;A String&quot;, # The unique identifier for the security policy. This identifier is defined by the server.
2298 &quot;rules&quot;: [ # The rules that apply to the network.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002299 { # 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 -07002300 &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.
2301 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2302 &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.
2303 &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 -07002304 #
2305 # This field may only be specified when the versioned_expr is set to FIREWALL.
Bu Sun Kim65020912020-05-20 12:08:20 -07002306 &quot;kind&quot;: &quot;compute#securityPolicyRule&quot;, # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
2307 &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.
2308 &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.
2309 &quot;destIpRanges&quot;: [ # CIDR IP address range.
2310 #
2311 # This field may only be specified when versioned_expr is set to FIREWALL.
2312 &quot;A String&quot;,
2313 ],
2314 &quot;destPorts&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2315 #
2316 # This field may only be specified when versioned_expr is set to FIREWALL.
2317 {
2318 &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.
2319 &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.
2320 #
2321 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2322 #
2323 # This field may only be specified when versioned_expr is set to FIREWALL.
2324 &quot;A String&quot;,
2325 ],
2326 },
2327 ],
2328 &quot;layer4Configs&quot;: [ # Pairs of IP protocols and ports that the rule should match.
2329 #
2330 # This field may only be specified when versioned_expr is set to FIREWALL.
2331 {
2332 &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.
2333 &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.
2334 #
2335 # Example inputs include: [&quot;22&quot;], [&quot;80&quot;,&quot;443&quot;], and [&quot;12345-12349&quot;].
2336 #
2337 # This field may only be specified when versioned_expr is set to FIREWALL.
2338 &quot;A String&quot;,
2339 ],
2340 },
2341 ],
2342 &quot;srcIpRanges&quot;: [ # CIDR IP address range.
2343 &quot;A String&quot;,
2344 ],
2345 },
2346 &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 -07002347 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002348 # Example (Comparison):
2349 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002350 # 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 -07002351 #
2352 # Example (Equality):
2353 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002354 # 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 -07002355 #
2356 # Example (Logic):
2357 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002358 # 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 -07002359 #
2360 # Example (Data Manipulation):
2361 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002362 # 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 -07002363 #
2364 # 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 -07002365 &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.
2366 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2367 &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.
2368 &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 -07002369 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002370 &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 -07002371 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002372 &quot;preview&quot;: True or False, # If set to true, the specified action is not enforced.
2373 &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.
2374 &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.
2375 &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.
2376 &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;.
2377 &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.
2378 &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.
2379 &quot;thresholdRps&quot;: 42, # Rate in requests per second at which to begin ratelimiting.
2380 },
2381 &quot;ruleTupleCount&quot;: 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
2382 &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.
2383 #
2384 # This field may only be specified when versioned_expr is set to FIREWALL.
2385 &quot;A String&quot;,
2386 ],
2387 &quot;targetServiceAccounts&quot;: [ # A list of service accounts indicating the sets of instances that are applied with this rule.
2388 &quot;A String&quot;,
2389 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002390 },
2391 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002392 },
2393 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002394 }</pre>
2395</div>
2396
2397<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002398 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002399 <pre>Returns the specified guest attributes entry.
2400
2401Args:
2402 project: string, Project ID for this request. (required)
2403 zone: string, The name of the zone for this request. (required)
2404 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002405 queryPath: string, Specifies the guest attributes path to be queried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002406 variableKey: string, Specifies the key for the guest attributes entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002407
2408Returns:
2409 An object of the form:
2410
2411 { # A guest attributes entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002412 &quot;kind&quot;: &quot;compute#guestAttributes&quot;, # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
2413 &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;)
2414 &quot;queryValue&quot;: { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
2415 &quot;items&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002416 { # A guest attributes namespace/key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002417 &quot;key&quot;: &quot;A String&quot;, # Key for the guest attribute entry.
2418 &quot;namespace&quot;: &quot;A String&quot;, # Namespace for the guest attribute entry.
2419 &quot;value&quot;: &quot;A String&quot;, # Value for the guest attribute entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002420 },
2421 ],
2422 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002423 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2424 &quot;variableKey&quot;: &quot;A String&quot;, # The key to search for.
2425 &quot;variableValue&quot;: &quot;A String&quot;, # [Output Only] The value found for the requested key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002426 }</pre>
2427</div>
2428
2429<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002430 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002431 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
2432
2433Args:
2434 project: string, Project ID for this request. (required)
2435 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002436 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002437 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002438
2439Returns:
2440 An object of the form:
2441
Dan O'Mearadd494642020-05-01 07:42:23 -07002442 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002443 #
2444 #
2445 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002446 # 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 -07002447 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002448 # 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 -07002449 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002450 # **JSON example:**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002451 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002452 # { &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 -07002453 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002454 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002455 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002456 # 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 -07002457 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002458 # 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 -07002459 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002460 { # 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 -04002461 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002462 # 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 -04002463 #
2464 # Example Policy with multiple AuditConfigs:
2465 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002466 # { &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 -04002467 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002468 # 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 -07002469 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002470 { # Provides the configuration for logging a type of permissions. Example:
2471 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002472 # { &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 -04002473 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002474 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
2475 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2476 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002477 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002478 &quot;ignoreChildExemptions&quot;: True or False,
2479 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002480 },
2481 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002482 &quot;exemptedMembers&quot;: [
2483 &quot;A String&quot;,
2484 ],
2485 &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 -07002486 },
2487 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002488 &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 -07002489 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002490 &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.
2491 #
2492 # If the condition evaluates to `true`, then this binding applies to the current request.
2493 #
2494 # 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.
2495 #
2496 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2497 #
2498 # Example (Comparison):
2499 #
2500 # 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;
2501 #
2502 # Example (Equality):
2503 #
2504 # 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;
2505 #
2506 # Example (Logic):
2507 #
2508 # 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;
2509 #
2510 # Example (Data Manipulation):
2511 #
2512 # 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;
2513 #
2514 # 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.
2515 &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.
2516 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2517 &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.
2518 &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.
2519 },
2520 &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 -07002521 #
2522 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2523 #
2524 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2525 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002526 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002527 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002528 #
2529 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002530 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2531 #
2532 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2533 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002534 # * `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.
2535 #
2536 # * `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.
2537 #
2538 # * `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.
2539 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002540 #
2541 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002542 # * `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 -07002543 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002544 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002545 &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 -07002546 },
2547 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002548 &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.
2549 #
2550 # **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.
2551 &quot;iamOwned&quot;: True or False,
2552 &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.
2553 { # A rule to be applied in a Policy.
2554 &quot;action&quot;: &quot;A String&quot;, # Required
2555 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2556 { # A condition to be met.
2557 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
2558 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
2559 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
2560 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2561 &quot;values&quot;: [ # The objects of the condition.
2562 &quot;A String&quot;,
2563 ],
2564 },
2565 ],
2566 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
2567 &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.
2568 &quot;A String&quot;,
2569 ],
2570 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2571 { # Specifies what kind of log the caller must write
2572 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
2573 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2574 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
2575 },
2576 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
2577 },
2578 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
2579 #
2580 # 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.
2581 #
2582 # Field names correspond to IAM request parameters and field values are their respective values.
2583 #
2584 # 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.
2585 #
2586 # 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]}
2587 &quot;customFields&quot;: [ # Custom fields.
2588 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2589 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
2590 &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.
2591 },
2592 ],
2593 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
2594 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
2595 },
2596 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
2597 &quot;logMode&quot;: &quot;A String&quot;,
2598 },
2599 },
2600 ],
2601 &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.
2602 &quot;A String&quot;,
2603 ],
2604 &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.
2605 &quot;A String&quot;,
2606 ],
2607 },
2608 ],
2609 &quot;version&quot;: 42, # Specifies the format of the policy.
2610 #
2611 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2612 #
2613 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2614 #
2615 # * 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
2616 #
2617 # **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.
2618 #
2619 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
2620 #
2621 # 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 -07002622 }</pre>
2623</div>
2624
2625<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002626 <code class="details" id="getScreenshot">getScreenshot(project, zone, instance)</code>
2627 <pre>Returns the screenshot from the specified instance.
2628
2629Args:
2630 project: string, Project ID for this request. (required)
2631 zone: string, The name of the zone for this request. (required)
2632 instance: string, Name of the instance scoping this request. (required)
2633
2634Returns:
2635 An object of the form:
2636
Bu Sun Kim65020912020-05-20 12:08:20 -07002637 { # An instance&#x27;s screenshot.
2638 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The Base64-encoded screenshot data.
2639 &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 -07002640 }</pre>
2641</div>
2642
2643<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002644 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002645 <pre>Returns the last 1 MB of serial port output from the specified instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002646
2647Args:
2648 project: string, Project ID for this request. (required)
2649 zone: string, The name of the zone for this request. (required)
2650 instance: string, Name of the instance scoping this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002651 port: integer, Specifies which COM or serial port to retrieve data from.
Bu Sun Kim65020912020-05-20 12:08:20 -07002652 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 -07002653
2654Returns:
2655 An object of the form:
2656
Bu Sun Kim65020912020-05-20 12:08:20 -07002657 { # An instance&#x27;s serial console output.
2658 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The contents of the console output.
2659 &quot;kind&quot;: &quot;compute#serialPortOutput&quot;, # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
2660 &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.
2661 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2662 &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 -07002663 }</pre>
2664</div>
2665
2666<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002667 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
2668 <pre>Returns the Shielded Instance Identity of an instance
2669
2670Args:
2671 project: string, Project ID for this request. (required)
2672 zone: string, The name of the zone for this request. (required)
2673 instance: string, Name or id of the instance scoping this request. (required)
2674
2675Returns:
2676 An object of the form:
2677
2678 { # A shielded Instance identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002679 &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.
2680 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2681 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002682 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002683 &quot;kind&quot;: &quot;compute#shieldedInstanceIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
2684 &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.
2685 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2686 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002687 },
2688 }</pre>
2689</div>
2690
2691<div class="method">
2692 <code class="details" id="getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</code>
2693 <pre>Returns the Shielded VM Identity of an instance
2694
2695Args:
2696 project: string, Project ID for this request. (required)
2697 zone: string, The name of the zone for this request. (required)
2698 instance: string, Name of the instance scoping this request. (required)
2699
2700Returns:
2701 An object of the form:
2702
2703 { # A shielded VM identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07002704 &quot;encryptionKey&quot;: { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded VM&#x27;s vTPM.
2705 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2706 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002707 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002708 &quot;kind&quot;: &quot;compute#shieldedVmIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.
2709 &quot;signingKey&quot;: { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded VM&#x27;s vTPM.
2710 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
2711 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002712 },
2713 }</pre>
2714</div>
2715
2716<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002717 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None, sourceMachineImage=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002718 <pre>Creates an instance resource in the specified project using the data included in the request.
2719
2720Args:
2721 project: string, Project ID for this request. (required)
2722 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002723 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002724 The object takes the form of:
2725
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002726{ # Represents an Instance resource.
2727 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002728 # 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 -07002729 &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.
2730 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
2731 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002732 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002733 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
2734 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2735 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
2736 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2737 &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 -07002738 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002739 &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).
2740 &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.
2741 &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.
2742 #
2743 # 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.
2744 &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 -07002745 #
2746 # 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.
2747 #
2748 # 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.
2749 #
2750 # 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.
2751 #
2752 # 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 -07002753 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2754 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2755 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2756 &quot;rsaEncryptedKey&quot;: &quot;A String&quot;, # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002757 #
2758 # The key must meet the following requirements before you can provide it to Compute Engine:
2759 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002760 # - 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 -07002761 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07002762 &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 -07002763 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002764 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
2765 &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.
2766 { # Guest OS features.
2767 &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.
2768 },
2769 ],
2770 &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.
2771 &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 -07002772 #
2773 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2774 #
2775 # 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 -07002776 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
2777 &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.
2778 &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.
2779 &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 -07002780 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2781 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002782 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002783 # 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:
2784 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2785 # - projects/project/zones/zone/diskTypes/diskType
2786 # - 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 -07002787 &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 -07002788 #
2789 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2790 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07002791 &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 -07002792 },
2793 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002794 &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.
2795 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002796 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002797 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002798 &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.
2799 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
2800 &quot;A String&quot;,
2801 ],
2802 &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.
2803 &quot;A String&quot;,
2804 ],
2805 &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 -07002806 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002807 # 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:
2808 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002809 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002810 #
2811 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002812 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002813 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002814 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002815 # To create a disk with a custom image that you created, specify the image name in the following format:
2816 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002817 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002818 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002819 # 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:
2820 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002821 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002822 #
2823 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07002824 &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.
2825 #
2826 # 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.
2827 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2828 &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.
2829 &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.
2830 &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.
2831 #
2832 # The key must meet the following requirements before you can provide it to Compute Engine:
2833 # - The key is wrapped using a RSA public key certificate provided by Google.
2834 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2835 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2836 &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.
2837 },
2838 &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.
2839 #
2840 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2841 # global/snapshots/my-backup
2842 #
2843 #
2844 # If the source snapshot is deleted later, this field will not be set.
2845 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2846 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2847 &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.
2848 &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.
2849 &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.
2850 #
2851 # The key must meet the following requirements before you can provide it to Compute Engine:
2852 # - The key is wrapped using a RSA public key certificate provided by Google.
2853 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2854 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2855 &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 -07002856 },
2857 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002858 &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.
2859 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2860 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
2861 &quot;A String&quot;,
2862 ],
2863 &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.
2864 &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.
2865 &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
2866 &quot;dbs&quot;: [ # The Key Database (db).
2867 {
2868 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2869 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
2870 },
2871 ],
2872 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
2873 {
2874 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2875 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
2876 },
2877 ],
2878 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
2879 {
2880 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2881 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
2882 },
2883 ],
2884 &quot;pk&quot;: { # The Platform Key (PK).
2885 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2886 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002887 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002888 },
2889 &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 -08002890 #
2891 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2892 #
2893 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002894 &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 -07002895 },
2896 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002897 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2898 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07002899 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002900 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2901 &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.
2902 #
2903 # To see the latest fingerprint, make get() request to the instance.
2904 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2905 { # A specification of the type and number of accelerator cards attached to the instance.
2906 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2907 &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.
2908 },
2909 ],
2910 &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.
2911 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2912 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
2913 #
2914 # 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.
2915 #
2916 # 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.
2917 #
2918 # 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.
2919 #
2920 # 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.
2921 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2922 &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.
2923 &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.
2924 &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.
2925 #
2926 # The key must meet the following requirements before you can provide it to Compute Engine:
2927 # - The key is wrapped using a RSA public key certificate provided by Google.
2928 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2929 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2930 &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.
2931 },
2932 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2933 &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.
2934 #
2935 # To see the latest fingerprint, make get() request to the instance.
2936 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2937 &quot;a_key&quot;: &quot;A String&quot;,
2938 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002939 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
2940 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
2941 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07002942 &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:
2943 # zones/us-central1-f/machineTypes/n1-standard-1
2944 #
2945 #
2946 # 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):
2947 # zones/zone/machineTypes/custom-CPUS-MEMORY
2948 #
2949 #
2950 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2951 #
2952 # For a full list of restrictions, read the Specifications for custom machine types.
2953 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2954 &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.
2955 #
2956 # To see the latest fingerprint, make a get() request to retrieve the resource.
2957 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2958 {
2959 &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.
2960 &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).
2961 },
2962 ],
2963 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2964 },
2965 &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;.
2966 &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.
2967 &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.
2968 { # A network interface resource attached to an instance.
2969 &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.
2970 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2971 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2972 &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.
2973 &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.
2974 &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.
2975 #
2976 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2977 #
2978 # 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.
2979 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
2980 &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.
2981 &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.
2982 &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.
2983 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2984 },
2985 ],
2986 &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.
2987 { # An alias IP range attached to an instance&#x27;s network interface.
2988 &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).
2989 &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.
2990 },
2991 ],
2992 &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.
2993 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
2994 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2995 &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.
2996 &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.
2997 #
2998 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2999 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
3000 # - projects/project/global/networks/network
3001 # - global/networks/default
3002 &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.
3003 &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:
3004 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
3005 # - regions/region/subnetworks/subnetwork
3006 },
3007 ],
3008 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
3009 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
3010 &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.
3011 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
3012 &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.
3013 &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.
3014 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
3015 &quot;A String&quot;,
3016 ],
3017 },
3018 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
3019 &quot;A String&quot;,
3020 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003021 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003022 &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.
3023 #
3024 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
3025 &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.
3026 &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.
3027 &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.
3028 #
3029 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
3030 #
3031 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003032 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003033 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
3034 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
3035 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
3036 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3037 &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.
3038 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
3039 &quot;A String&quot;,
3040 ],
3041 },
3042 ],
3043 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003044 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07003045 },
3046 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3047 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3048 &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.
3049 #
3050 # 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.
3051 { # A service account.
3052 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
3053 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
3054 &quot;A String&quot;,
3055 ],
3056 },
3057 ],
3058 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
3059 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
3060 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
3061 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
3062 },
3063 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
3064 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3065 },
3066 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
3067 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
3068 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
3069 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
3070 },
3071 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
3072 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3073 },
3074 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
3075 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
3076 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3077 &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.
3078 &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.
3079 &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.
3080 #
3081 # The key must meet the following requirements before you can provide it to Compute Engine:
3082 # - The key is wrapped using a RSA public key certificate provided by Google.
3083 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3084 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3085 &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.
3086 },
3087 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003088 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07003089 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
3090 &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.
3091 &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.
3092 #
3093 # To see the latest fingerprint, make get() request to the instance.
3094 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
3095 &quot;A String&quot;,
3096 ],
3097 },
3098 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
3099 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
3100 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
3101 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
3102 },
3103 &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 -07003104}
3105
Bu Sun Kim65020912020-05-20 12:08:20 -07003106 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.
3107
3108For 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.
3109
3110The 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 -07003111 sourceInstanceTemplate: string, Specifies instance template to create the instance.
3112
3113This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
3114- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
3115- projects/project/global/instanceTemplates/instanceTemplate
3116- global/instanceTemplates/instanceTemplate
3117 sourceMachineImage: string, Specifies instance machine to create the instance.
3118
3119This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
3120- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
3121- projects/project/global/global/machineImages/machineImage
3122- global/machineImages/machineImage
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003123
3124Returns:
3125 An object of the form:
3126
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003127 { # Represents an Operation resource.
3128 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003129 # Google Compute Engine has three Operation resources:
3130 #
3131 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3132 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003133 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3134 #
3135 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003136 # - For global operations, use the `globalOperations` resource.
3137 # - For regional operations, use the `regionOperations` resource.
3138 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003139 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003140 # 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 -07003141 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3142 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3143 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3144 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3145 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3146 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003147 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003148 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3149 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3150 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003151 },
3152 ],
3153 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003154 &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`.
3155 &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.
3156 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3157 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3158 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3159 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3160 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3161 &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.
3162 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3163 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3164 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3165 &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.
3166 &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`.
3167 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3168 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3169 &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.
3170 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3171 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3172 {
3173 &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.
3174 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3175 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3176 {
3177 &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).
3178 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3179 },
3180 ],
3181 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3182 },
3183 ],
3184 &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 -07003185 }</pre>
3186</div>
3187
3188<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003189 <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 -07003190 <pre>Retrieves the list of instances contained within the specified zone.
3191
3192Args:
3193 project: string, Project ID for this request. (required)
3194 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003195 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 -07003196
Dan O'Mearadd494642020-05-01 07:42:23 -07003197For 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 -07003198
Dan O'Mearadd494642020-05-01 07:42:23 -07003199You 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 -07003200
Bu Sun Kim65020912020-05-20 12:08:20 -07003201To 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) ```
3202 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`)
3203 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3204
3205You 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.
3206
3207Currently, only sorting by `name` or `creationTimestamp desc` is supported.
3208 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.
3209 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 -07003210
3211Returns:
3212 An object of the form:
3213
3214 { # Contains a list of instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07003215 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3216 &quot;items&quot;: [ # A list of Instance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003217 { # Represents an Instance resource.
3218 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003219 # 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 -07003220 &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.
3221 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
3222 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003223 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003224 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
3225 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
3226 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
3227 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
3228 &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 -07003229 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003230 &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).
3231 &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.
3232 &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.
3233 #
3234 # 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.
3235 &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 -07003236 #
3237 # 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.
3238 #
3239 # 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.
3240 #
3241 # 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.
3242 #
3243 # 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 -07003244 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3245 &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.
3246 &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.
3247 &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 -07003248 #
3249 # The key must meet the following requirements before you can provide it to Compute Engine:
3250 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003251 # - 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 -07003252 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07003253 &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 -07003254 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003255 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
3256 &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.
3257 { # Guest OS features.
3258 &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.
3259 },
3260 ],
3261 &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.
3262 &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 -07003263 #
3264 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
3265 #
3266 # 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 -07003267 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
3268 &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.
3269 &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.
3270 &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 -07003271 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
3272 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003273 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003274 # 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:
3275 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
3276 # - projects/project/zones/zone/diskTypes/diskType
3277 # - 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 -07003278 &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 -07003279 #
3280 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
3281 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07003282 &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 -07003283 },
3284 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003285 &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.
3286 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003287 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003288 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003289 &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.
3290 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
3291 &quot;A String&quot;,
3292 ],
3293 &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.
3294 &quot;A String&quot;,
3295 ],
3296 &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 -07003297 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003298 # 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:
3299 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003300 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003301 #
3302 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003303 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003304 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003305 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003306 # To create a disk with a custom image that you created, specify the image name in the following format:
3307 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003308 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003309 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003310 # 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:
3311 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003312 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003313 #
3314 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07003315 &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.
3316 #
3317 # 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.
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.
3328 },
3329 &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.
3330 #
3331 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
3332 # global/snapshots/my-backup
3333 #
3334 #
3335 # If the source snapshot is deleted later, this field will not be set.
3336 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
3337 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3338 &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.
3339 &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.
3340 &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.
3341 #
3342 # The key must meet the following requirements before you can provide it to Compute Engine:
3343 # - The key is wrapped using a RSA public key certificate provided by Google.
3344 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3345 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3346 &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 -07003347 },
3348 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003349 &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.
3350 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
3351 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
3352 &quot;A String&quot;,
3353 ],
3354 &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.
3355 &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.
3356 &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
3357 &quot;dbs&quot;: [ # The Key Database (db).
3358 {
3359 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3360 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3361 },
3362 ],
3363 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
3364 {
3365 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3366 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3367 },
3368 ],
3369 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
3370 {
3371 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3372 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
3373 },
3374 ],
3375 &quot;pk&quot;: { # The Platform Key (PK).
3376 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
3377 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003378 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003379 },
3380 &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 -08003381 #
3382 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
3383 #
3384 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07003385 &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 -07003386 },
3387 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003388 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
3389 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07003390 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003391 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
3392 &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.
3393 #
3394 # To see the latest fingerprint, make get() request to the instance.
3395 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
3396 { # A specification of the type and number of accelerator cards attached to the instance.
3397 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
3398 &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.
3399 },
3400 ],
3401 &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.
3402 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
3403 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
3404 #
3405 # 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.
3406 #
3407 # 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.
3408 #
3409 # 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.
3410 #
3411 # 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.
3412 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3413 &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.
3414 &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.
3415 &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.
3416 #
3417 # The key must meet the following requirements before you can provide it to Compute Engine:
3418 # - The key is wrapped using a RSA public key certificate provided by Google.
3419 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3420 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3421 &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.
3422 },
3423 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
3424 &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.
3425 #
3426 # To see the latest fingerprint, make get() request to the instance.
3427 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
3428 &quot;a_key&quot;: &quot;A String&quot;,
3429 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003430 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
3431 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
3432 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07003433 &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:
3434 # zones/us-central1-f/machineTypes/n1-standard-1
3435 #
3436 #
3437 # 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):
3438 # zones/zone/machineTypes/custom-CPUS-MEMORY
3439 #
3440 #
3441 # For example: zones/us-central1-f/machineTypes/custom-4-5120
3442 #
3443 # For a full list of restrictions, read the Specifications for custom machine types.
3444 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
3445 &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.
3446 #
3447 # To see the latest fingerprint, make a get() request to retrieve the resource.
3448 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3449 {
3450 &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.
3451 &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).
3452 },
3453 ],
3454 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
3455 },
3456 &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;.
3457 &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.
3458 &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.
3459 { # A network interface resource attached to an instance.
3460 &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.
3461 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
3462 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
3463 &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.
3464 &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.
3465 &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.
3466 #
3467 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
3468 #
3469 # 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.
3470 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
3471 &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.
3472 &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.
3473 &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.
3474 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
3475 },
3476 ],
3477 &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.
3478 { # An alias IP range attached to an instance&#x27;s network interface.
3479 &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).
3480 &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.
3481 },
3482 ],
3483 &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.
3484 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
3485 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
3486 &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.
3487 &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.
3488 #
3489 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
3490 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
3491 # - projects/project/global/networks/network
3492 # - global/networks/default
3493 &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.
3494 &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:
3495 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
3496 # - regions/region/subnetworks/subnetwork
3497 },
3498 ],
3499 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
3500 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
3501 &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.
3502 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
3503 &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.
3504 &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.
3505 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
3506 &quot;A String&quot;,
3507 ],
3508 },
3509 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
3510 &quot;A String&quot;,
3511 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003512 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003513 &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.
3514 #
3515 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
3516 &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.
3517 &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.
3518 &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.
3519 #
3520 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
3521 #
3522 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003523 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003524 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
3525 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
3526 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
3527 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3528 &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.
3529 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
3530 &quot;A String&quot;,
3531 ],
3532 },
3533 ],
3534 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003535 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07003536 },
3537 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3538 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3539 &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.
3540 #
3541 # 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.
3542 { # A service account.
3543 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
3544 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
3545 &quot;A String&quot;,
3546 ],
3547 },
3548 ],
3549 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
3550 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
3551 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
3552 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
3553 },
3554 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
3555 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3556 },
3557 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
3558 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
3559 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
3560 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
3561 },
3562 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
3563 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
3564 },
3565 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
3566 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
3567 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3568 &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.
3569 &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.
3570 &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.
3571 #
3572 # The key must meet the following requirements before you can provide it to Compute Engine:
3573 # - The key is wrapped using a RSA public key certificate provided by Google.
3574 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3575 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3576 &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.
3577 },
3578 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003579 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07003580 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
3581 &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.
3582 &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.
3583 #
3584 # To see the latest fingerprint, make get() request to the instance.
3585 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
3586 &quot;A String&quot;,
3587 ],
3588 },
3589 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
3590 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
3591 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
3592 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
3593 },
3594 &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 -07003595 },
3596 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003597 &quot;kind&quot;: &quot;compute#instanceList&quot;, # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
3598 &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.
3599 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3600 &quot;warning&quot;: { # [Output Only] Informational warning message.
3601 &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.
3602 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3603 # &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 -07003604 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003605 &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).
3606 &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 -07003607 },
3608 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003609 &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 -07003610 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003611 }</pre>
3612</div>
3613
3614<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07003615 <code class="details" id="listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003616 <pre>Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003617
3618Args:
3619 project: string, Project ID for this request. (required)
3620 zone: string, The name of the zone for this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07003621 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 -07003622 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 -04003623
Dan O'Mearadd494642020-05-01 07:42:23 -07003624For 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 -04003625
Dan O'Mearadd494642020-05-01 07:42:23 -07003626You 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 -04003627
Bu Sun Kim65020912020-05-20 12:08:20 -07003628To 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 -07003629 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 -07003630 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3631
3632You 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.
3633
3634Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07003635 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 -07003636 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 -04003637
3638Returns:
3639 An object of the form:
3640
3641 { # Contains a list of instance referrers.
Bu Sun Kim65020912020-05-20 12:08:20 -07003642 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
3643 &quot;items&quot;: [ # A list of Reference resources.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003644 { # Represents a reference to a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003645 &quot;kind&quot;: &quot;compute#reference&quot;, # [Output Only] Type of the resource. Always compute#reference for references.
3646 &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 -04003647 # - MEMBER_OF
Bu Sun Kim65020912020-05-20 12:08:20 -07003648 &quot;referrer&quot;: &quot;A String&quot;, # URL of the resource which refers to the target.
3649 &quot;target&quot;: &quot;A String&quot;, # URL of the resource to which this reference points.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003650 },
3651 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003652 &quot;kind&quot;: &quot;compute#instanceListReferrers&quot;, # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
3653 &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.
3654 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
3655 &quot;warning&quot;: { # [Output Only] Informational warning message.
3656 &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.
3657 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3658 # &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 -07003659 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003660 &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).
3661 &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 -07003662 },
3663 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003664 &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 -07003665 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003666 }</pre>
3667</div>
3668
3669<div class="method">
3670 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
3671 <pre>Retrieves the next page of results.
3672
3673Args:
3674 previous_request: The request for the previous page. (required)
3675 previous_response: The response from the request for the previous page. (required)
3676
3677Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003678 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003679 page. Returns None if there are no more items in the collection.
3680 </pre>
3681</div>
3682
3683<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003684 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3685 <pre>Retrieves the next page of results.
3686
3687Args:
3688 previous_request: The request for the previous page. (required)
3689 previous_response: The response from the request for the previous page. (required)
3690
3691Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07003692 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003693 page. Returns None if there are no more items in the collection.
3694 </pre>
3695</div>
3696
3697<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003698 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003699 <pre>Removes resource policies from an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003700
3701Args:
3702 project: string, Project ID for this request. (required)
3703 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003704 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003705 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003706 The object takes the form of:
3707
3708{
Bu Sun Kim65020912020-05-20 12:08:20 -07003709 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this instance.
3710 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003711 ],
3712 }
3713
3714 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.
3715
3716For 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.
3717
3718The 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 -07003719
3720Returns:
3721 An object of the form:
3722
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003723 { # Represents an Operation resource.
3724 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003725 # Google Compute Engine has three Operation resources:
3726 #
3727 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3728 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003729 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3730 #
3731 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003732 # - For global operations, use the `globalOperations` resource.
3733 # - For regional operations, use the `regionOperations` resource.
3734 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003735 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003736 # 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 -07003737 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3738 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3739 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3740 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3741 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3742 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003743 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003744 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3745 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3746 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003747 },
3748 ],
3749 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003750 &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`.
3751 &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.
3752 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3753 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3754 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3755 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3756 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3757 &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.
3758 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3759 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3760 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3761 &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.
3762 &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`.
3763 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3764 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3765 &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.
3766 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3767 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3768 {
3769 &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.
3770 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3771 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3772 {
3773 &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).
3774 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3775 },
3776 ],
3777 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3778 },
3779 ],
3780 &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 -07003781 }</pre>
3782</div>
3783
3784<div class="method">
3785 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
3786 <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.
3787
3788Args:
3789 project: string, Project ID for this request. (required)
3790 zone: string, The name of the zone for this request. (required)
3791 instance: string, Name of the instance scoping this request. (required)
3792 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.
3793
3794For 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.
3795
3796The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3797
3798Returns:
3799 An object of the form:
3800
3801 { # Represents an Operation resource.
3802 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003803 # Google Compute Engine has three Operation resources:
3804 #
3805 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3806 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003807 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3808 #
3809 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003810 # - For global operations, use the `globalOperations` resource.
3811 # - For regional operations, use the `regionOperations` resource.
3812 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003813 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003814 # 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 -07003815 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3816 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3817 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3818 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3819 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3820 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003821 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003822 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3823 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3824 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003825 },
3826 ],
3827 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003828 &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`.
3829 &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.
3830 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3831 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3832 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3833 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3834 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3835 &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.
3836 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3837 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3838 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3839 &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.
3840 &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`.
3841 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3842 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3843 &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.
3844 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3845 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3846 {
3847 &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.
3848 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3849 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3850 {
3851 &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).
3852 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3853 },
3854 ],
3855 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3856 },
3857 ],
3858 &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 -07003859 }</pre>
3860</div>
3861
3862<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003863 <code class="details" id="resume">resume(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003864 <pre>Resumes an instance that was suspended using the instances().suspend method.
3865
3866Args:
3867 project: string, Project ID for this request. (required)
3868 zone: string, The name of the zone for this request. (required)
3869 instance: string, Name of the instance resource to resume. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003870 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003871 The object takes the form of:
3872
3873{
Bu Sun Kim65020912020-05-20 12:08:20 -07003874 &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 -07003875 #
3876 # In order to resume the instance, the disk url and its corresponding key must be provided.
3877 #
3878 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
3879 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003880 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
3881 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3882 &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.
3883 &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.
3884 &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 -07003885 #
3886 # The key must meet the following requirements before you can provide it to Compute Engine:
3887 # - The key is wrapped using a RSA public key certificate provided by Google.
3888 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3889 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07003890 &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 -07003891 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003892 &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 -07003893 },
3894 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003895 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
3896 #
3897 # 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.
3898 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
3899 &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.
3900 &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.
3901 &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.
3902 #
3903 # The key must meet the following requirements before you can provide it to Compute Engine:
3904 # - The key is wrapped using a RSA public key certificate provided by Google.
3905 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3906 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3907 &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.
3908 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003909 }
3910
3911 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.
3912
3913For 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.
3914
3915The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3916
3917Returns:
3918 An object of the form:
3919
3920 { # Represents an Operation resource.
3921 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003922 # Google Compute Engine has three Operation resources:
3923 #
3924 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3925 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003926 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3927 #
3928 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003929 # - For global operations, use the `globalOperations` resource.
3930 # - For regional operations, use the `regionOperations` resource.
3931 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003932 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003933 # 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 -07003934 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3935 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3936 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3937 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3938 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3939 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003940 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003941 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3942 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3943 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003944 },
3945 ],
3946 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003947 &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`.
3948 &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.
3949 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3950 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3951 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3952 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3953 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3954 &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.
3955 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3956 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3957 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
3958 &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.
3959 &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`.
3960 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3961 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3962 &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.
3963 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3964 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3965 {
3966 &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.
3967 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3968 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3969 {
3970 &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).
3971 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3972 },
3973 ],
3974 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3975 },
3976 ],
3977 &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 -07003978 }</pre>
3979</div>
3980
3981<div class="method">
3982 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
3983 <pre>Sets deletion protection on the instance.
3984
3985Args:
3986 project: string, Project ID for this request. (required)
3987 zone: string, The name of the zone for this request. (required)
3988 resource: string, Name or id of the resource for this request. (required)
3989 deletionProtection: boolean, Whether the resource should be protected against deletion.
3990 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.
3991
3992For 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.
3993
3994The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3995
3996Returns:
3997 An object of the form:
3998
3999 { # Represents an Operation resource.
4000 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004001 # Google Compute Engine has three Operation resources:
4002 #
4003 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4004 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004005 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4006 #
4007 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004008 # - For global operations, use the `globalOperations` resource.
4009 # - For regional operations, use the `regionOperations` resource.
4010 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004011 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004012 # 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 -07004013 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4014 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4015 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4016 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4017 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4018 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004019 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004020 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4021 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4022 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004023 },
4024 ],
4025 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004026 &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`.
4027 &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.
4028 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4029 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4030 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4031 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4032 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4033 &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.
4034 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4035 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4036 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4037 &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.
4038 &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`.
4039 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4040 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4041 &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.
4042 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4043 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4044 {
4045 &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.
4046 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4047 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4048 {
4049 &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).
4050 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4051 },
4052 ],
4053 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4054 },
4055 ],
4056 &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 -07004057 }</pre>
4058</div>
4059
4060<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004061 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004062 <pre>Sets the auto-delete flag for a disk attached to an instance.
4063
4064Args:
4065 project: string, Project ID for this request. (required)
4066 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004067 instance: string, The instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004068 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004069 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)
4070 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.
4071
4072For 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.
4073
4074The 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 -07004075
4076Returns:
4077 An object of the form:
4078
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004079 { # Represents an Operation resource.
4080 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004081 # Google Compute Engine has three Operation resources:
4082 #
4083 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4084 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004085 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4086 #
4087 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004088 # - For global operations, use the `globalOperations` resource.
4089 # - For regional operations, use the `regionOperations` resource.
4090 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004091 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004092 # 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 -07004093 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4094 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4095 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4096 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4097 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4098 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004099 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004100 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4101 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4102 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004103 },
4104 ],
4105 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004106 &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`.
4107 &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.
4108 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4109 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4110 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4111 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4112 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4113 &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.
4114 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4115 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4116 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4117 &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.
4118 &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`.
4119 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4120 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4121 &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.
4122 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4123 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4124 {
4125 &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.
4126 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4127 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4128 {
4129 &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).
4130 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4131 },
4132 ],
4133 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4134 },
4135 ],
4136 &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 -07004137 }</pre>
4138</div>
4139
4140<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004141 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004142 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
4143
4144Args:
4145 project: string, Project ID for this request. (required)
4146 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004147 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004148 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004149 The object takes the form of:
4150
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004151{
Bu Sun Kim65020912020-05-20 12:08:20 -07004152 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
4153 { # Associates `members` with a `role`.
4154 &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.
4155 #
4156 # If the condition evaluates to `true`, then this binding applies to the current request.
4157 #
4158 # 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.
4159 #
4160 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4161 #
4162 # Example (Comparison):
4163 #
4164 # 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;
4165 #
4166 # Example (Equality):
4167 #
4168 # 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;
4169 #
4170 # Example (Logic):
4171 #
4172 # 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;
4173 #
4174 # Example (Data Manipulation):
4175 #
4176 # 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;
4177 #
4178 # 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.
4179 &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.
4180 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4181 &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.
4182 &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.
4183 },
4184 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
4185 #
4186 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4187 #
4188 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4189 #
4190 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
4191 #
4192 #
4193 #
4194 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4195 #
4196 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4197 #
4198 # * `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.
4199 #
4200 # * `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.
4201 #
4202 # * `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.
4203 #
4204 #
4205 #
4206 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
4207 &quot;A String&quot;,
4208 ],
4209 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
4210 },
4211 ],
4212 &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.
4213 &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 -04004214 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004215 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004216 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004217 # 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 -04004218 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004219 # 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 -07004220 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004221 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004222 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004223 # { &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 -07004224 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004225 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004226 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004227 # 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 -07004228 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004229 # 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 -07004230 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004231 { # 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 -04004232 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004233 # 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 -04004234 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004235 # Example Policy with multiple AuditConfigs:
4236 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004237 # { &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 -07004238 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004239 # 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 -07004240 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004241 { # Provides the configuration for logging a type of permissions. Example:
4242 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004243 # { &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 -07004244 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004245 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
4246 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
4247 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004248 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004249 &quot;ignoreChildExemptions&quot;: True or False,
4250 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004251 },
4252 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004253 &quot;exemptedMembers&quot;: [
4254 &quot;A String&quot;,
4255 ],
4256 &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 -08004257 },
4258 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004259 &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 -07004260 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004261 &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.
4262 #
4263 # If the condition evaluates to `true`, then this binding applies to the current request.
4264 #
4265 # 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.
4266 #
4267 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4268 #
4269 # Example (Comparison):
4270 #
4271 # 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;
4272 #
4273 # Example (Equality):
4274 #
4275 # 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;
4276 #
4277 # Example (Logic):
4278 #
4279 # 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;
4280 #
4281 # Example (Data Manipulation):
4282 #
4283 # 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;
4284 #
4285 # 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.
4286 &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.
4287 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4288 &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.
4289 &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.
4290 },
4291 &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 -07004292 #
4293 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4294 #
4295 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4296 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004297 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004298 #
4299 #
4300 #
4301 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4302 #
4303 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4304 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004305 # * `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.
4306 #
4307 # * `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.
4308 #
4309 # * `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.
4310 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004311 #
4312 #
4313 # * `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 -07004314 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004315 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004316 &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 -07004317 },
4318 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004319 &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.
4320 #
4321 # **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.
4322 &quot;iamOwned&quot;: True or False,
4323 &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.
4324 { # A rule to be applied in a Policy.
4325 &quot;action&quot;: &quot;A String&quot;, # Required
4326 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
4327 { # A condition to be met.
4328 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
4329 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
4330 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
4331 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
4332 &quot;values&quot;: [ # The objects of the condition.
4333 &quot;A String&quot;,
4334 ],
4335 },
4336 ],
4337 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
4338 &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.
4339 &quot;A String&quot;,
4340 ],
4341 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4342 { # Specifies what kind of log the caller must write
4343 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
4344 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4345 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
4346 },
4347 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
4348 },
4349 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
4350 #
4351 # 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.
4352 #
4353 # Field names correspond to IAM request parameters and field values are their respective values.
4354 #
4355 # 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.
4356 #
4357 # 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]}
4358 &quot;customFields&quot;: [ # Custom fields.
4359 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4360 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
4361 &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.
4362 },
4363 ],
4364 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
4365 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
4366 },
4367 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
4368 &quot;logMode&quot;: &quot;A String&quot;,
4369 },
4370 },
4371 ],
4372 &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.
4373 &quot;A String&quot;,
4374 ],
4375 &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.
4376 &quot;A String&quot;,
4377 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004378 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004379 ],
4380 &quot;version&quot;: 42, # Specifies the format of the policy.
4381 #
4382 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4383 #
4384 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4385 #
4386 # * 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
4387 #
4388 # **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.
4389 #
4390 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
4391 #
4392 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4393 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004394 }
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004395
4396
4397Returns:
4398 An object of the form:
4399
Dan O'Mearadd494642020-05-01 07:42:23 -07004400 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004401 #
4402 #
4403 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004404 # 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 -07004405 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004406 # 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 -07004407 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004408 # **JSON example:**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004409 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004410 # { &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 -07004411 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004412 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004413 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004414 # 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 -07004415 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004416 # 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 -07004417 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004418 { # 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 -04004419 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004420 # 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 -04004421 #
4422 # Example Policy with multiple AuditConfigs:
4423 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004424 # { &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 -04004425 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004426 # 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 -07004427 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004428 { # Provides the configuration for logging a type of permissions. Example:
4429 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004430 # { &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 -04004431 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004432 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
4433 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
4434 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004435 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004436 &quot;ignoreChildExemptions&quot;: True or False,
4437 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004438 },
4439 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004440 &quot;exemptedMembers&quot;: [
4441 &quot;A String&quot;,
4442 ],
4443 &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 -07004444 },
4445 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004446 &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 -07004447 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004448 &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.
4449 #
4450 # If the condition evaluates to `true`, then this binding applies to the current request.
4451 #
4452 # 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.
4453 #
4454 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4455 #
4456 # Example (Comparison):
4457 #
4458 # 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;
4459 #
4460 # Example (Equality):
4461 #
4462 # 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;
4463 #
4464 # Example (Logic):
4465 #
4466 # 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;
4467 #
4468 # Example (Data Manipulation):
4469 #
4470 # 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;
4471 #
4472 # 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.
4473 &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.
4474 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
4475 &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.
4476 &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.
4477 },
4478 &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 -07004479 #
4480 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4481 #
4482 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4483 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004484 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004485 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004486 #
4487 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004488 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4489 #
4490 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4491 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004492 # * `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.
4493 #
4494 # * `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.
4495 #
4496 # * `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.
4497 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004498 #
4499 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004500 # * `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 -07004501 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004502 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004503 &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 -07004504 },
4505 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004506 &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.
4507 #
4508 # **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.
4509 &quot;iamOwned&quot;: True or False,
4510 &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.
4511 { # A rule to be applied in a Policy.
4512 &quot;action&quot;: &quot;A String&quot;, # Required
4513 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
4514 { # A condition to be met.
4515 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
4516 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
4517 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
4518 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
4519 &quot;values&quot;: [ # The objects of the condition.
4520 &quot;A String&quot;,
4521 ],
4522 },
4523 ],
4524 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
4525 &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.
4526 &quot;A String&quot;,
4527 ],
4528 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4529 { # Specifies what kind of log the caller must write
4530 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
4531 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4532 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
4533 },
4534 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
4535 },
4536 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
4537 #
4538 # 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.
4539 #
4540 # Field names correspond to IAM request parameters and field values are their respective values.
4541 #
4542 # 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.
4543 #
4544 # 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]}
4545 &quot;customFields&quot;: [ # Custom fields.
4546 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4547 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
4548 &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.
4549 },
4550 ],
4551 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
4552 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
4553 },
4554 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
4555 &quot;logMode&quot;: &quot;A String&quot;,
4556 },
4557 },
4558 ],
4559 &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.
4560 &quot;A String&quot;,
4561 ],
4562 &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.
4563 &quot;A String&quot;,
4564 ],
4565 },
4566 ],
4567 &quot;version&quot;: 42, # Specifies the format of the policy.
4568 #
4569 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4570 #
4571 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4572 #
4573 # * 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
4574 #
4575 # **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.
4576 #
4577 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
4578 #
4579 # 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 -07004580 }</pre>
4581</div>
4582
4583<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004584 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004585 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004586
4587Args:
4588 project: string, Project ID for this request. (required)
4589 zone: string, The name of the zone for this request. (required)
4590 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004591 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004592 The object takes the form of:
4593
4594{
Bu Sun Kim65020912020-05-20 12:08:20 -07004595 &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.
4596 &quot;labels&quot;: {
4597 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004598 },
4599 }
4600
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004601 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.
4602
4603For 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.
4604
4605The 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 -07004606
4607Returns:
4608 An object of the form:
4609
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004610 { # Represents an Operation resource.
4611 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004612 # Google Compute Engine has three Operation resources:
4613 #
4614 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4615 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004616 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4617 #
4618 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004619 # - For global operations, use the `globalOperations` resource.
4620 # - For regional operations, use the `regionOperations` resource.
4621 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004622 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004623 # 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 -07004624 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4625 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4626 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4627 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4628 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4629 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004630 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004631 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4632 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4633 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004634 },
4635 ],
4636 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004637 &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`.
4638 &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.
4639 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4640 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4641 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4642 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4643 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4644 &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.
4645 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4646 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4647 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4648 &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.
4649 &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`.
4650 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4651 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4652 &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.
4653 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4654 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4655 {
4656 &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.
4657 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4658 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4659 {
4660 &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).
4661 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4662 },
4663 ],
4664 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4665 },
4666 ],
4667 &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 -07004668 }</pre>
4669</div>
4670
4671<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004672 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004673 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
4674
4675Args:
4676 project: string, Project ID for this request. (required)
4677 zone: string, The name of the zone for this request. (required)
4678 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004679 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004680 The object takes the form of:
4681
4682{
Bu Sun Kim65020912020-05-20 12:08:20 -07004683 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004684 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07004685 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
4686 &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 -04004687 },
4688 ],
4689 }
4690
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004691 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.
4692
4693For 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.
4694
4695The 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 -04004696
4697Returns:
4698 An object of the form:
4699
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004700 { # Represents an Operation resource.
4701 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004702 # Google Compute Engine has three Operation resources:
4703 #
4704 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4705 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004706 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4707 #
4708 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004709 # - For global operations, use the `globalOperations` resource.
4710 # - For regional operations, use the `regionOperations` resource.
4711 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004712 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004713 # 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 -07004714 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4715 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4716 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4717 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4718 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4719 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004720 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004721 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4722 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4723 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004724 },
4725 ],
4726 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004727 &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`.
4728 &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.
4729 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4730 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4731 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4732 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4733 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4734 &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.
4735 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4736 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4737 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4738 &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.
4739 &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`.
4740 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4741 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4742 &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.
4743 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4744 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4745 {
4746 &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.
4747 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4748 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4749 {
4750 &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).
4751 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4752 },
4753 ],
4754 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4755 },
4756 ],
4757 &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 -04004758 }</pre>
4759</div>
4760
4761<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004762 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004763 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
4764
4765Args:
4766 project: string, Project ID for this request. (required)
4767 zone: string, The name of the zone for this request. (required)
4768 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004769 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004770 The object takes the form of:
4771
4772{
Bu Sun Kim65020912020-05-20 12:08:20 -07004773 &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 -07004774 }
4775
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004776 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.
4777
4778For 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.
4779
4780The 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 -07004781
4782Returns:
4783 An object of the form:
4784
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004785 { # Represents an Operation resource.
4786 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004787 # Google Compute Engine has three Operation resources:
4788 #
4789 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4790 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004791 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4792 #
4793 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004794 # - For global operations, use the `globalOperations` resource.
4795 # - For regional operations, use the `regionOperations` resource.
4796 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004797 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004798 # 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 -07004799 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4800 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4801 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4802 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4803 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4804 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004805 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004806 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4807 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4808 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004809 },
4810 ],
4811 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004812 &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`.
4813 &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.
4814 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4815 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4816 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4817 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4818 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4819 &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.
4820 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4821 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4822 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4823 &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.
4824 &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`.
4825 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4826 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4827 &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.
4828 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4829 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4830 {
4831 &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.
4832 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4833 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4834 {
4835 &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).
4836 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4837 },
4838 ],
4839 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4840 },
4841 ],
4842 &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 -07004843 }</pre>
4844</div>
4845
4846<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004847 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004848 <pre>Sets metadata for the specified instance to the data included in the request.
4849
4850Args:
4851 project: string, Project ID for this request. (required)
4852 zone: string, The name of the zone for this request. (required)
4853 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004854 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004855 The object takes the form of:
4856
4857{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07004858 &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 -07004859 #
4860 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004861 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4862 {
4863 &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.
4864 &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).
4865 },
4866 ],
4867 &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 -07004868}
4869
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004870 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.
4871
4872For 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.
4873
4874The 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 -07004875
4876Returns:
4877 An object of the form:
4878
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004879 { # Represents an Operation resource.
4880 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004881 # Google Compute Engine has three Operation resources:
4882 #
4883 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4884 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004885 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4886 #
4887 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004888 # - For global operations, use the `globalOperations` resource.
4889 # - For regional operations, use the `regionOperations` resource.
4890 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004891 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004892 # 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 -07004893 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4894 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4895 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4896 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4897 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4898 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004899 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004900 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4901 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4902 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004903 },
4904 ],
4905 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004906 &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`.
4907 &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.
4908 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4909 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4910 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4911 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4912 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4913 &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.
4914 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4915 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4916 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
4917 &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.
4918 &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`.
4919 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4920 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4921 &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.
4922 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4923 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4924 {
4925 &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.
4926 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4927 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4928 {
4929 &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).
4930 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4931 },
4932 ],
4933 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4934 },
4935 ],
4936 &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 -07004937 }</pre>
4938</div>
4939
4940<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004941 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004942 <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 -04004943
4944Args:
4945 project: string, Project ID for this request. (required)
4946 zone: string, The name of the zone for this request. (required)
4947 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004948 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004949 The object takes the form of:
4950
4951{
Bu Sun Kim65020912020-05-20 12:08:20 -07004952 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform this instance should be started at.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004953 }
4954
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004955 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.
4956
4957For 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.
4958
4959The 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 -04004960
4961Returns:
4962 An object of the form:
4963
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004964 { # Represents an Operation resource.
4965 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004966 # Google Compute Engine has three Operation resources:
4967 #
4968 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4969 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004970 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4971 #
4972 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004973 # - For global operations, use the `globalOperations` resource.
4974 # - For regional operations, use the `regionOperations` resource.
4975 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004976 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004977 # 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 -07004978 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4979 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4980 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4981 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4982 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4983 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004984 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004985 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4986 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4987 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004988 },
4989 ],
4990 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004991 &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`.
4992 &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.
4993 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4994 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4995 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4996 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4997 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4998 &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.
4999 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5000 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5001 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5002 &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.
5003 &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`.
5004 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5005 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5006 &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.
5007 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5008 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5009 {
5010 &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.
5011 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5012 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5013 {
5014 &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).
5015 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5016 },
5017 ],
5018 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5019 },
5020 ],
5021 &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 -07005022 }</pre>
5023</div>
5024
5025<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005026 <code class="details" id="setName">setName(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005027 <pre>Sets name of an instance.
5028
5029Args:
5030 project: string, Project ID for this request. (required)
5031 zone: string, The name of the zone for this request. (required)
5032 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005033 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005034 The object takes the form of:
5035
5036{
Bu Sun Kim65020912020-05-20 12:08:20 -07005037 &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.
5038 &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 -07005039 }
5040
5041 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.
5042
5043For 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.
5044
5045The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5046
5047Returns:
5048 An object of the form:
5049
5050 { # Represents an Operation resource.
5051 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005052 # Google Compute Engine has three Operation resources:
5053 #
5054 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5055 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005056 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5057 #
5058 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005059 # - For global operations, use the `globalOperations` resource.
5060 # - For regional operations, use the `regionOperations` resource.
5061 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005062 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005063 # 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 -07005064 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5065 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5066 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5067 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5068 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5069 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005070 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005071 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5072 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5073 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005074 },
5075 ],
5076 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005077 &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`.
5078 &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.
5079 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5080 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5081 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5082 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5083 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5084 &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.
5085 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5086 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5087 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5088 &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.
5089 &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`.
5090 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5091 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5092 &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.
5093 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5094 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5095 {
5096 &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.
5097 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5098 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5099 {
5100 &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).
5101 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5102 },
5103 ],
5104 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5105 },
5106 ],
5107 &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 -04005108 }</pre>
5109</div>
5110
5111<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005112 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005113 <pre>Sets an instance&#x27;s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005114
5115Args:
5116 project: string, Project ID for this request. (required)
5117 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005118 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005119 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005120 The object takes the form of:
5121
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005122{ # Sets the scheduling options for an Instance. NextID: 12
Bu Sun Kim65020912020-05-20 12:08:20 -07005123 &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.
5124 #
5125 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
5126 &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.
5127 &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.
5128 &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 -07005129 #
5130 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
5131 #
5132 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005133 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005134 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
5135 &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 -07005136 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Bu Sun Kim65020912020-05-20 12:08:20 -07005137 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
5138 &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.
5139 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
5140 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005141 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005142 },
5143 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005144 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005145 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005146}
5147
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005148 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.
5149
5150For 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.
5151
5152The 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 -07005153
5154Returns:
5155 An object of the form:
5156
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005157 { # Represents an Operation resource.
5158 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005159 # Google Compute Engine has three Operation resources:
5160 #
5161 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5162 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005163 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5164 #
5165 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005166 # - For global operations, use the `globalOperations` resource.
5167 # - For regional operations, use the `regionOperations` resource.
5168 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005169 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005170 # 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 -07005171 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5172 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5173 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5174 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5175 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5176 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005177 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005178 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5179 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5180 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005181 },
5182 ],
5183 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005184 &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`.
5185 &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.
5186 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5187 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5188 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5189 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5190 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5191 &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.
5192 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5193 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5194 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5195 &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.
5196 &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`.
5197 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5198 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5199 &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.
5200 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5201 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5202 {
5203 &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.
5204 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5205 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5206 {
5207 &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).
5208 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5209 },
5210 ],
5211 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5212 },
5213 ],
5214 &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 -07005215 }</pre>
5216</div>
5217
5218<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005219 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005220 <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 -07005221
5222Args:
5223 project: string, Project ID for this request. (required)
5224 zone: string, The name of the zone for this request. (required)
5225 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005226 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005227 The object takes the form of:
5228
5229{
Bu Sun Kim65020912020-05-20 12:08:20 -07005230 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
5231 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
5232 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005233 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005234 }
5235
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005236 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.
5237
5238For 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.
5239
5240The 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 -07005241
5242Returns:
5243 An object of the form:
5244
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005245 { # Represents an Operation resource.
5246 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005247 # Google Compute Engine has three Operation resources:
5248 #
5249 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5250 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005251 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5252 #
5253 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005254 # - For global operations, use the `globalOperations` resource.
5255 # - For regional operations, use the `regionOperations` resource.
5256 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005257 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005258 # 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 -07005259 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5260 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5261 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5262 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5263 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5264 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005265 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005266 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5267 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5268 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005269 },
5270 ],
5271 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005272 &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`.
5273 &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.
5274 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5275 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5276 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5277 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5278 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5279 &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.
5280 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5281 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5282 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5283 &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.
5284 &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`.
5285 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5286 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5287 &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.
5288 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5289 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5290 {
5291 &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.
5292 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5293 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5294 {
5295 &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).
5296 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5297 },
5298 ],
5299 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5300 },
5301 ],
5302 &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 -07005303 }</pre>
5304</div>
5305
5306<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005307 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005308 <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.
5309
5310Args:
5311 project: string, Project ID for this request. (required)
5312 zone: string, The name of the zone for this request. (required)
5313 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005314 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005315 The object takes the form of:
5316
5317{ # The policy describes the baseline against which Instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07005318 &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 -07005319}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005320
5321 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.
5322
5323For 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.
5324
5325The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5326
5327Returns:
5328 An object of the form:
5329
5330 { # Represents an Operation resource.
5331 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005332 # Google Compute Engine has three Operation resources:
5333 #
5334 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5335 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005336 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5337 #
5338 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005339 # - For global operations, use the `globalOperations` resource.
5340 # - For regional operations, use the `regionOperations` resource.
5341 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005342 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005343 # 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 -07005344 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5345 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5346 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5347 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5348 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5349 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005350 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005351 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5352 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5353 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005354 },
5355 ],
5356 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005357 &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`.
5358 &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.
5359 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5360 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5361 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5362 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5363 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5364 &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.
5365 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5366 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5367 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5368 &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.
5369 &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`.
5370 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5371 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5372 &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.
5373 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5374 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5375 {
5376 &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.
5377 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5378 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5379 {
5380 &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).
5381 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5382 },
5383 ],
5384 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5385 },
5386 ],
5387 &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 -07005388 }</pre>
5389</div>
5390
5391<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005392 <code class="details" id="setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005393 <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.
5394
5395Args:
5396 project: string, Project ID for this request. (required)
5397 zone: string, The name of the zone for this request. (required)
5398 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005399 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005400 The object takes the form of:
5401
5402{ # The policy describes the baseline against which VM instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07005403 &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 -07005404}
5405
5406 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.
5407
5408For 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.
5409
5410The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5411
5412Returns:
5413 An object of the form:
5414
5415 { # Represents an Operation resource.
5416 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005417 # Google Compute Engine has three Operation resources:
5418 #
5419 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5420 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005421 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5422 #
5423 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005424 # - For global operations, use the `globalOperations` resource.
5425 # - For regional operations, use the `regionOperations` resource.
5426 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005427 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005428 # 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 -07005429 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5430 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5431 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5432 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5433 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5434 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005435 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005436 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5437 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5438 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005439 },
5440 ],
5441 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005442 &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`.
5443 &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.
5444 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5445 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5446 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5447 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5448 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5449 &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.
5450 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5451 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5452 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5453 &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.
5454 &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`.
5455 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5456 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5457 &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.
5458 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5459 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5460 {
5461 &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.
5462 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5463 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5464 {
5465 &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).
5466 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5467 },
5468 ],
5469 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5470 },
5471 ],
5472 &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 -07005473 }</pre>
5474</div>
5475
5476<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005477 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005478 <pre>Sets network tags for the specified instance to the data included in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005479
5480Args:
5481 project: string, Project ID for this request. (required)
5482 zone: string, The name of the zone for this request. (required)
5483 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005484 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005485 The object takes the form of:
5486
5487{ # A set of instance tags.
Bu Sun Kim65020912020-05-20 12:08:20 -07005488 &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 -07005489 #
5490 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005491 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
5492 &quot;A String&quot;,
5493 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005494}
5495
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005496 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
5497
5498For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
5499
5500The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005501
5502Returns:
5503 An object of the form:
5504
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005505 { # Represents an Operation resource.
5506 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005507 # Google Compute Engine has three Operation resources:
5508 #
5509 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5510 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005511 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5512 #
5513 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005514 # - For global operations, use the `globalOperations` resource.
5515 # - For regional operations, use the `regionOperations` resource.
5516 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005517 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005518 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07005519 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5520 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5521 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5522 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5523 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5524 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005525 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005526 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5527 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5528 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005529 },
5530 ],
5531 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005532 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5533 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
5534 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5535 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5536 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5537 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5538 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5539 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
5540 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5541 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5542 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5543 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5544 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5545 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5546 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5547 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
5548 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5549 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5550 {
5551 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5552 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5553 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5554 {
5555 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
5556 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5557 },
5558 ],
5559 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5560 },
5561 ],
5562 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005563 }</pre>
5564</div>
5565
5566<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005567 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
5568 <pre>Simulates a maintenance event on the instance.
5569
5570Args:
5571 project: string, Project ID for this request. (required)
5572 zone: string, The name of the zone for this request. (required)
5573 instance: string, Name of the instance scoping this request. (required)
5574
5575Returns:
5576 An object of the form:
5577
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005578 { # Represents an Operation resource.
5579 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005580 # Google Compute Engine has three Operation resources:
5581 #
5582 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5583 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005584 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5585 #
5586 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005587 # - For global operations, use the `globalOperations` resource.
5588 # - For regional operations, use the `regionOperations` resource.
5589 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005590 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005591 # 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 -07005592 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5593 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5594 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5595 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5596 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5597 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005598 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005599 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5600 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5601 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005602 },
5603 ],
5604 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005605 &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`.
5606 &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.
5607 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5608 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5609 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5610 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5611 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5612 &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.
5613 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5614 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5615 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5616 &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.
5617 &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`.
5618 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5619 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5620 &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.
5621 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5622 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5623 {
5624 &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.
5625 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5626 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5627 {
5628 &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).
5629 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5630 },
5631 ],
5632 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5633 },
5634 ],
5635 &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 -04005636 }</pre>
5637</div>
5638
5639<div class="method">
5640 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005641 <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 -07005642
5643Args:
5644 project: string, Project ID for this request. (required)
5645 zone: string, The name of the zone for this request. (required)
5646 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005647 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.
5648
5649For 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.
5650
5651The 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 -07005652
5653Returns:
5654 An object of the form:
5655
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005656 { # Represents an Operation resource.
5657 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005658 # Google Compute Engine has three Operation resources:
5659 #
5660 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5661 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005662 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5663 #
5664 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005665 # - For global operations, use the `globalOperations` resource.
5666 # - For regional operations, use the `regionOperations` resource.
5667 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005668 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005669 # 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 -07005670 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5671 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5672 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5673 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5674 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5675 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005676 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005677 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5678 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5679 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005680 },
5681 ],
5682 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005683 &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`.
5684 &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.
5685 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5686 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5687 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5688 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5689 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5690 &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.
5691 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5692 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5693 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5694 &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.
5695 &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`.
5696 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5697 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5698 &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.
5699 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5700 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5701 {
5702 &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.
5703 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5704 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5705 {
5706 &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).
5707 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5708 },
5709 ],
5710 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5711 },
5712 ],
5713 &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 -07005714 }</pre>
5715</div>
5716
5717<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005718 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005719 <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 -07005720
5721Args:
5722 project: string, Project ID for this request. (required)
5723 zone: string, The name of the zone for this request. (required)
5724 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005725 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005726 The object takes the form of:
5727
5728{
Bu Sun Kim65020912020-05-20 12:08:20 -07005729 &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 -07005730 #
5731 # In order to start the instance, the disk url and its corresponding key must be provided.
5732 #
5733 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
5734 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005735 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
5736 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5737 &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.
5738 &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.
5739 &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 -07005740 #
5741 # The key must meet the following requirements before you can provide it to Compute Engine:
5742 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005743 # - 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 -07005744 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07005745 &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 -07005746 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005747 &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 -07005748 },
5749 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005750 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
5751 #
5752 # 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.
5753 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
5754 &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.
5755 &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.
5756 &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.
5757 #
5758 # The key must meet the following requirements before you can provide it to Compute Engine:
5759 # - The key is wrapped using a RSA public key certificate provided by Google.
5760 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5761 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5762 &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.
5763 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005764 }
5765
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005766 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.
5767
5768For 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.
5769
5770The 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 -07005771
5772Returns:
5773 An object of the form:
5774
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005775 { # Represents an Operation resource.
5776 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005777 # Google Compute Engine has three Operation resources:
5778 #
5779 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5780 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005781 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5782 #
5783 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005784 # - For global operations, use the `globalOperations` resource.
5785 # - For regional operations, use the `regionOperations` resource.
5786 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005787 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005788 # 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 -07005789 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5790 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5791 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5792 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5793 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5794 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005795 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005796 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5797 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5798 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005799 },
5800 ],
5801 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005802 &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`.
5803 &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.
5804 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5805 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5806 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5807 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5808 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5809 &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.
5810 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5811 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5812 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5813 &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.
5814 &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`.
5815 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5816 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5817 &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.
5818 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5819 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5820 {
5821 &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.
5822 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5823 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5824 {
5825 &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).
5826 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5827 },
5828 ],
5829 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5830 },
5831 ],
5832 &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 -07005833 }</pre>
5834</div>
5835
5836<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005837 <code class="details" id="stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005838 <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 -07005839
5840Args:
5841 project: string, Project ID for this request. (required)
5842 zone: string, The name of the zone for this request. (required)
5843 instance: string, Name of the instance resource to stop. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005844 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 -07005845 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.
5846
5847For 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.
5848
5849The 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 -07005850
5851Returns:
5852 An object of the form:
5853
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005854 { # Represents an Operation resource.
5855 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005856 # Google Compute Engine has three Operation resources:
5857 #
5858 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5859 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005860 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5861 #
5862 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005863 # - For global operations, use the `globalOperations` resource.
5864 # - For regional operations, use the `regionOperations` resource.
5865 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005866 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005867 # 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 -07005868 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5869 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5870 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5871 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5872 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5873 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005874 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005875 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5876 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5877 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005878 },
5879 ],
5880 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005881 &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`.
5882 &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.
5883 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5884 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5885 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5886 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5887 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5888 &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.
5889 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5890 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5891 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5892 &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.
5893 &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`.
5894 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5895 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5896 &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.
5897 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5898 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5899 {
5900 &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.
5901 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5902 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5903 {
5904 &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).
5905 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5906 },
5907 ],
5908 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5909 },
5910 ],
5911 &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 -07005912 }</pre>
5913</div>
5914
5915<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005916 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005917 <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.
5918
5919Args:
5920 project: string, Project ID for this request. (required)
5921 zone: string, The name of the zone for this request. (required)
5922 instance: string, Name of the instance resource to suspend. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005923 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 -07005924 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.
5925
5926For 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.
5927
5928The 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 -07005929
5930Returns:
5931 An object of the form:
5932
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005933 { # Represents an Operation resource.
5934 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005935 # Google Compute Engine has three Operation resources:
5936 #
5937 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5938 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005939 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5940 #
5941 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005942 # - For global operations, use the `globalOperations` resource.
5943 # - For regional operations, use the `regionOperations` resource.
5944 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005945 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005946 # 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 -07005947 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5948 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5949 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5950 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5951 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5952 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005953 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005954 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5955 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5956 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005957 },
5958 ],
5959 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005960 &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`.
5961 &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.
5962 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5963 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5964 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5965 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5966 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5967 &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.
5968 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5969 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5970 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
5971 &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.
5972 &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`.
5973 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5974 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5975 &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.
5976 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5977 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5978 {
5979 &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.
5980 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5981 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5982 {
5983 &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).
5984 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5985 },
5986 ],
5987 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5988 },
5989 ],
5990 &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 -07005991 }</pre>
5992</div>
5993
5994<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005995 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005996 <pre>Returns permissions that a caller has on the specified resource.
5997
5998Args:
5999 project: string, Project ID for this request. (required)
6000 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006001 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006002 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006003 The object takes the form of:
6004
6005{
Bu Sun Kim65020912020-05-20 12:08:20 -07006006 &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.
6007 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006008 ],
6009 }
6010
6011
6012Returns:
6013 An object of the form:
6014
6015 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006016 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
6017 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006018 ],
6019 }</pre>
6020</div>
6021
6022<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07006023 <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 -07006024 <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.
6025
6026Args:
6027 project: string, Project ID for this request. (required)
6028 zone: string, The name of the zone for this request. (required)
6029 instance: string, Name of the instance resource to update. (required)
6030 body: object, The request body.
6031 The object takes the form of:
6032
6033{ # Represents an Instance resource.
6034 #
6035 # 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 -07006036 &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.
6037 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
6038 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07006039 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006040 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
6041 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
6042 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
6043 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
6044 &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 -07006045 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07006046 &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).
6047 &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.
6048 &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.
6049 #
6050 # 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.
6051 &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 -07006052 #
6053 # 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.
6054 #
6055 # 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.
6056 #
6057 # 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.
6058 #
6059 # 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 -07006060 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6061 &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.
6062 &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.
6063 &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 -07006064 #
6065 # The key must meet the following requirements before you can provide it to Compute Engine:
6066 # - The key is wrapped using a RSA public key certificate provided by Google.
6067 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6068 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim65020912020-05-20 12:08:20 -07006069 &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 -07006070 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006071 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
6072 &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.
6073 { # Guest OS features.
6074 &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.
6075 },
6076 ],
6077 &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.
6078 &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 -07006079 #
6080 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
6081 #
6082 # 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 -07006083 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
6084 &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.
6085 &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.
6086 &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 -07006087 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
6088 #
6089 #
6090 # 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:
6091 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
6092 # - projects/project/zones/zone/diskTypes/diskType
6093 # - 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 -07006094 &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 -07006095 #
6096 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
6097 { # Guest OS features.
Bu Sun Kim65020912020-05-20 12:08:20 -07006098 &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 -07006099 },
6100 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006101 &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.
6102 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07006103 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006104 &quot;multiWriter&quot;: True or False, # Indicates whether or not the disk can be read/write attached to more than one instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006105 &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.
6106 &quot;replicaZones&quot;: [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
6107 &quot;A String&quot;,
6108 ],
6109 &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.
6110 &quot;A String&quot;,
6111 ],
6112 &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 -07006113 #
6114 # 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:
6115 # projects/debian-cloud/global/images/family/debian-9
6116 #
6117 #
6118 # Alternatively, use a specific version of a public operating system image:
6119 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
6120 #
6121 #
6122 # To create a disk with a custom image that you created, specify the image name in the following format:
6123 # global/images/my-custom-image
6124 #
6125 #
6126 # 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:
6127 # global/images/family/my-image-family
6128 #
6129 #
6130 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07006131 &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.
6132 #
6133 # 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.
6134 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6135 &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.
6136 &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.
6137 &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.
6138 #
6139 # The key must meet the following requirements before you can provide it to Compute Engine:
6140 # - The key is wrapped using a RSA public key certificate provided by Google.
6141 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6142 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6143 &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.
6144 },
6145 &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.
6146 #
6147 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
6148 # global/snapshots/my-backup
6149 #
6150 #
6151 # If the source snapshot is deleted later, this field will not be set.
6152 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
6153 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6154 &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.
6155 &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.
6156 &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.
6157 #
6158 # The key must meet the following requirements before you can provide it to Compute Engine:
6159 # - The key is wrapped using a RSA public key certificate provided by Google.
6160 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6161 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6162 &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 -07006163 },
6164 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006165 &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.
6166 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
6167 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
6168 &quot;A String&quot;,
6169 ],
6170 &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.
6171 &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.
6172 &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
6173 &quot;dbs&quot;: [ # The Key Database (db).
6174 {
6175 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6176 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
6177 },
6178 ],
6179 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
6180 {
6181 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6182 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
6183 },
6184 ],
6185 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
6186 {
6187 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6188 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
6189 },
6190 ],
6191 &quot;pk&quot;: { # The Platform Key (PK).
6192 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
6193 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07006194 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006195 },
6196 &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 -07006197 #
6198 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
6199 #
6200 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07006201 &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 -07006202 },
6203 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006204 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
6205 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07006206 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006207 &quot;eraseWindowsVssSignature&quot;: True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
6208 &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.
6209 #
6210 # To see the latest fingerprint, make get() request to the instance.
6211 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
6212 { # A specification of the type and number of accelerator cards attached to the instance.
6213 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
6214 &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.
6215 },
6216 ],
6217 &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.
6218 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
6219 &quot;instanceEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
6220 #
6221 # 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.
6222 #
6223 # 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.
6224 #
6225 # 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.
6226 #
6227 # 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.
6228 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6229 &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.
6230 &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.
6231 &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.
6232 #
6233 # The key must meet the following requirements before you can provide it to Compute Engine:
6234 # - The key is wrapped using a RSA public key certificate provided by Google.
6235 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6236 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6237 &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.
6238 },
6239 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
6240 &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.
6241 #
6242 # To see the latest fingerprint, make get() request to the instance.
6243 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
6244 &quot;a_key&quot;: &quot;A String&quot;,
6245 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006246 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
6247 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
6248 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07006249 &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:
6250 # zones/us-central1-f/machineTypes/n1-standard-1
6251 #
6252 #
6253 # 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):
6254 # zones/zone/machineTypes/custom-CPUS-MEMORY
6255 #
6256 #
6257 # For example: zones/us-central1-f/machineTypes/custom-4-5120
6258 #
6259 # For a full list of restrictions, read the Specifications for custom machine types.
6260 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
6261 &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.
6262 #
6263 # To see the latest fingerprint, make a get() request to retrieve the resource.
6264 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
6265 {
6266 &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.
6267 &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).
6268 },
6269 ],
6270 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
6271 },
6272 &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;.
6273 &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.
6274 &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.
6275 { # A network interface resource attached to an instance.
6276 &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.
6277 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6278 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6279 &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.
6280 &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.
6281 &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.
6282 #
6283 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6284 #
6285 # 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.
6286 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
6287 &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.
6288 &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.
6289 &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.
6290 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
6291 },
6292 ],
6293 &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.
6294 { # An alias IP range attached to an instance&#x27;s network interface.
6295 &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).
6296 &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.
6297 },
6298 ],
6299 &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.
6300 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
6301 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
6302 &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.
6303 &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.
6304 #
6305 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
6306 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
6307 # - projects/project/global/networks/network
6308 # - global/networks/default
6309 &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.
6310 &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:
6311 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
6312 # - regions/region/subnetworks/subnetwork
6313 },
6314 ],
6315 &quot;postKeyRevocationActionType&quot;: &quot;A String&quot;, # Specifies whether this instance will be shut down on key revocation.
6316 &quot;preservedStateSizeGb&quot;: &quot;A String&quot;, # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
6317 &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.
6318 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
6319 &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.
6320 &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.
6321 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
6322 &quot;A String&quot;,
6323 ],
6324 },
6325 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
6326 &quot;A String&quot;,
6327 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006328 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006329 &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.
6330 #
6331 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
6332 &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.
6333 &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.
6334 &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.
6335 #
6336 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
6337 #
6338 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006339 &quot;maintenanceFreezeDurationHours&quot;: 42, # Specifies the number of hours after instance creation where the instance won&#x27;t be scheduled for maintenance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006340 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
6341 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
6342 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
6343 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
6344 &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.
6345 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
6346 &quot;A String&quot;,
6347 ],
6348 },
6349 ],
6350 &quot;onHostMaintenance&quot;: &quot;A String&quot;, # Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006351 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states.
Bu Sun Kim65020912020-05-20 12:08:20 -07006352 },
6353 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
6354 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6355 &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.
6356 #
6357 # 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.
6358 { # A service account.
6359 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
6360 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
6361 &quot;A String&quot;,
6362 ],
6363 },
6364 ],
6365 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
6366 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
6367 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
6368 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
6369 },
6370 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
6371 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
6372 },
6373 &quot;shieldedVmConfig&quot;: { # A set of Shielded VM options.
6374 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
6375 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
6376 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
6377 },
6378 &quot;shieldedVmIntegrityPolicy&quot;: { # The policy describes the baseline against which VM instance boot integrity is measured.
6379 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
6380 },
6381 &quot;sourceMachineImage&quot;: &quot;A String&quot;, # Source machine image
6382 &quot;sourceMachineImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
6383 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
6384 &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.
6385 &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.
6386 &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.
6387 #
6388 # The key must meet the following requirements before you can provide it to Compute Engine:
6389 # - The key is wrapped using a RSA public key certificate provided by Google.
6390 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6391 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6392 &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.
6393 },
6394 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07006395 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07006396 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
6397 &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.
6398 &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.
6399 #
6400 # To see the latest fingerprint, make get() request to the instance.
6401 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
6402 &quot;A String&quot;,
6403 ],
6404 },
6405 &quot;upcomingMaintenance&quot;: { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
6406 &quot;date&quot;: &quot;A String&quot;, # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
6407 &quot;time&quot;: &quot;A String&quot;, # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
6408 &quot;type&quot;: &quot;A String&quot;, # Defines the type of maintenance.
6409 },
6410 &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 -07006411}
6412
6413 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.
6414 Allowed values
6415 INVALID -
6416 NO_EFFECT -
6417 REFRESH -
6418 RESTART -
Bu Sun Kim65020912020-05-20 12:08:20 -07006419 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.
6420 Allowed values
6421 INVALID -
6422 NO_EFFECT -
6423 REFRESH -
6424 RESTART -
Dan O'Mearadd494642020-05-01 07:42:23 -07006425 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.
6426
6427For 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.
6428
6429The 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 -07006430
6431Returns:
6432 An object of the form:
6433
6434 { # Represents an Operation resource.
6435 #
6436 # Google Compute Engine has three Operation resources:
6437 #
6438 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6439 #
6440 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6441 #
6442 # Operations can be global, regional or zonal.
6443 # - For global operations, use the `globalOperations` resource.
6444 # - For regional operations, use the `regionOperations` resource.
6445 # - For zonal operations, use the `zonalOperations` resource.
6446 #
6447 # 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 -07006448 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6449 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6450 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6451 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6452 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6453 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07006454 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006455 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6456 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6457 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07006458 },
6459 ],
6460 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006461 &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`.
6462 &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.
6463 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6464 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6465 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6466 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6467 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6468 &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.
6469 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6470 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6471 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6472 &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.
6473 &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`.
6474 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6475 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6476 &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.
6477 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6478 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6479 {
6480 &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.
6481 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6482 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6483 {
6484 &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).
6485 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6486 },
6487 ],
6488 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6489 },
6490 ],
6491 &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 -07006492 }</pre>
6493</div>
6494
6495<div class="method">
6496 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07006497 <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 -07006498
6499Args:
6500 project: string, Project ID for this request. (required)
6501 zone: string, The name of the zone for this request. (required)
6502 instance: string, The instance name for this request. (required)
6503 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006504 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006505 The object takes the form of:
6506
Bu Sun Kim65020912020-05-20 12:08:20 -07006507{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6508 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6509 &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.
6510 &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.
6511 &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 -07006512 #
6513 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6514 #
6515 # 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 -07006516 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
6517 &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.
6518 &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.
6519 &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.
6520 &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 -07006521}
6522
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006523 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.
6524
6525For 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.
6526
6527The 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 -07006528
6529Returns:
6530 An object of the form:
6531
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006532 { # Represents an Operation resource.
6533 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006534 # Google Compute Engine has three Operation resources:
6535 #
6536 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6537 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006538 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6539 #
6540 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006541 # - For global operations, use the `globalOperations` resource.
6542 # - For regional operations, use the `regionOperations` resource.
6543 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006544 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006545 # 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 -07006546 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6547 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6548 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6549 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6550 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6551 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006552 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006553 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6554 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6555 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006556 },
6557 ],
6558 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006559 &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`.
6560 &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.
6561 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6562 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6563 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6564 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6565 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6566 &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.
6567 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6568 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6569 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6570 &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.
6571 &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`.
6572 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6573 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6574 &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.
6575 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6576 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6577 {
6578 &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.
6579 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6580 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6581 {
6582 &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).
6583 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6584 },
6585 ],
6586 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6587 },
6588 ],
6589 &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 -07006590 }</pre>
6591</div>
6592
6593<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006594 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006595 <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.
6596
6597Args:
6598 project: string, Project ID for this request. (required)
6599 zone: string, The name of the zone for this request. (required)
6600 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006601 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006602 The object takes the form of:
6603
6604{ # A set of Display Device options
Bu Sun Kim65020912020-05-20 12:08:20 -07006605 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006606}
6607
6608 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.
6609
6610For 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.
6611
6612The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6613
6614Returns:
6615 An object of the form:
6616
6617 { # Represents an Operation resource.
6618 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006619 # Google Compute Engine has three Operation resources:
6620 #
6621 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6622 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006623 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6624 #
6625 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006626 # - For global operations, use the `globalOperations` resource.
6627 # - For regional operations, use the `regionOperations` resource.
6628 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006629 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006630 # 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 -07006631 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6632 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6633 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6634 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6635 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6636 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006637 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006638 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6639 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6640 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006641 },
6642 ],
6643 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006644 &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`.
6645 &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.
6646 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6647 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6648 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6649 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6650 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6651 &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.
6652 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6653 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6654 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6655 &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.
6656 &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`.
6657 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6658 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6659 &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.
6660 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6661 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6662 {
6663 &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.
6664 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6665 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6666 {
6667 &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).
6668 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6669 },
6670 ],
6671 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6672 },
6673 ],
6674 &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 -07006675 }</pre>
6676</div>
6677
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006678<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006679 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07006680 <pre>Updates an instance&#x27;s network interface. This method follows PATCH semantics.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006681
6682Args:
6683 project: string, Project ID for this request. (required)
6684 zone: string, The name of the zone for this request. (required)
6685 instance: string, The instance name for this request. (required)
6686 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006687 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006688 The object takes the form of:
6689
6690{ # A network interface resource attached to an instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07006691 &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.
6692 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
6693 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6694 &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.
6695 &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.
6696 &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 -07006697 #
6698 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6699 #
6700 # 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 -07006701 &quot;publicDnsName&quot;: &quot;A String&quot;, # [Output Only] The public DNS domain name for the instance.
6702 &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.
6703 &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.
6704 &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.
6705 &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 -07006706 },
6707 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07006708 &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.
6709 { # An alias IP range attached to an instance&#x27;s network interface.
6710 &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).
6711 &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.
6712 },
6713 ],
6714 &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.
6715 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
6716 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
6717 &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.
6718 &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 -04006719 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006720 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
6721 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
6722 # - projects/project/global/networks/network
6723 # - global/networks/default
Bu Sun Kim65020912020-05-20 12:08:20 -07006724 &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.
6725 &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:
6726 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
6727 # - regions/region/subnetworks/subnetwork
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006728}
6729
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006730 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.
6731
6732For 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.
6733
6734The 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 -04006735
6736Returns:
6737 An object of the form:
6738
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006739 { # Represents an Operation resource.
6740 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006741 # Google Compute Engine has three Operation resources:
6742 #
6743 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6744 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006745 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6746 #
6747 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006748 # - For global operations, use the `globalOperations` resource.
6749 # - For regional operations, use the `regionOperations` resource.
6750 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006751 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006752 # 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 -07006753 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6754 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6755 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6756 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6757 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6758 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006759 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006760 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6761 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6762 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006763 },
6764 ],
6765 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006766 &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`.
6767 &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.
6768 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6769 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6770 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6771 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6772 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6773 &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.
6774 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6775 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6776 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6777 &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.
6778 &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`.
6779 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6780 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6781 &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.
6782 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6783 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6784 {
6785 &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.
6786 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6787 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6788 {
6789 &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).
6790 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6791 },
6792 ],
6793 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6794 },
6795 ],
6796 &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 -07006797 }</pre>
6798</div>
6799
6800<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006801 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006802 <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.
6803
6804Args:
6805 project: string, Project ID for this request. (required)
6806 zone: string, The name of the zone for this request. (required)
6807 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006808 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006809 The object takes the form of:
6810
6811{ # A set of Shielded Instance options.
Bu Sun Kim65020912020-05-20 12:08:20 -07006812 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
6813 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
6814 &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 -07006815}
6816
6817 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.
6818
6819For 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.
6820
6821The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6822
6823Returns:
6824 An object of the form:
6825
6826 { # Represents an Operation resource.
6827 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006828 # Google Compute Engine has three Operation resources:
6829 #
6830 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6831 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006832 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6833 #
6834 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006835 # - For global operations, use the `globalOperations` resource.
6836 # - For regional operations, use the `regionOperations` resource.
6837 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006838 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006839 # 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 -07006840 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6841 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6842 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6843 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6844 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6845 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006846 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006847 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6848 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6849 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006850 },
6851 ],
6852 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006853 &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`.
6854 &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.
6855 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6856 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6857 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6858 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6859 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6860 &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.
6861 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6862 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6863 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6864 &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.
6865 &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`.
6866 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6867 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6868 &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.
6869 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6870 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6871 {
6872 &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.
6873 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6874 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6875 {
6876 &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).
6877 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6878 },
6879 ],
6880 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6881 },
6882 ],
6883 &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 -07006884 }</pre>
6885</div>
6886
6887<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006888 <code class="details" id="updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006889 <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.
6890
6891Args:
6892 project: string, Project ID for this request. (required)
6893 zone: string, The name of the zone for this request. (required)
6894 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006895 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006896 The object takes the form of:
6897
6898{ # A set of Shielded VM options.
Bu Sun Kim65020912020-05-20 12:08:20 -07006899 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled.
6900 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled.
6901 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006902}
6903
6904 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.
6905
6906For 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.
6907
6908The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6909
6910Returns:
6911 An object of the form:
6912
6913 { # Represents an Operation resource.
6914 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006915 # Google Compute Engine has three Operation resources:
6916 #
6917 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6918 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006919 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6920 #
6921 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006922 # - For global operations, use the `globalOperations` resource.
6923 # - For regional operations, use the `regionOperations` resource.
6924 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006925 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006926 # 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 -07006927 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6928 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
6929 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
6930 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6931 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6932 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006933 {
Bu Sun Kim65020912020-05-20 12:08:20 -07006934 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
6935 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6936 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006937 },
6938 ],
6939 },
Bu Sun Kim65020912020-05-20 12:08:20 -07006940 &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`.
6941 &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.
6942 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6943 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6944 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6945 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
6946 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6947 &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.
6948 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6949 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
6950 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
6951 &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.
6952 &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`.
6953 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
6954 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6955 &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.
6956 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
6957 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6958 {
6959 &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.
6960 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
6961 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
6962 {
6963 &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).
6964 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
6965 },
6966 ],
6967 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
6968 },
6969 ],
6970 &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 -04006971 }</pre>
6972</div>
6973
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006974</body></html>