blob: 1b7a6a0e411ccbc7583942c49a83ec5b1823913f [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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_v1.html">Compute Engine API</a> . <a href="compute_v1.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>
John Asmuth614db982014-04-24 15:46:26 -040079<p class="firstline">Adds an access config to an instance's network interface.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
82<p class="firstline">Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.</p>
83<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Retrieves aggregated list of all of the instances in your project across all regions and zones.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<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>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093 <code><a href="#close">close()</a></code></p>
94<p class="firstline">Close httplib2 connections.</p>
95<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040098<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<p class="firstline">Deletes an access config from an instance's network interface.</p>
101<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400103<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">
Bu Sun Kim65020912020-05-20 12:08:20 -0700108 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Returns the specified guest attributes entry.</p>
110<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700111 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
John Asmuth614db982014-04-24 15:46:26 -0400113<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114 <code><a href="#getScreenshot">getScreenshot(project, zone, instance)</a></code></p>
115<p class="firstline">Returns the screenshot from the specified instance.</p>
116<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400119<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
121<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
122<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 <code><a href="#insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400124<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
125<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700126 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800127<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
John Asmuth614db982014-04-24 15:46:26 -0400128<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700129 <code><a href="#listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700130<p class="firstline">Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131<p class="toc_element">
132 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
133<p class="firstline">Retrieves the next page of results.</p>
134<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -0400135 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
136<p class="firstline">Retrieves the next page of results.</p>
137<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700138 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
139<p class="firstline">Removes resource policies from an instance.</p>
140<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
142<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>
John Asmuth614db982014-04-24 15:46:26 -0400143<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
145<p class="firstline">Sets deletion protection on the instance.</p>
146<p class="toc_element">
147 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000148<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400152<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 <code><a href="#setLabels">setLabels(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
155<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800160<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400163<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
164<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700166<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>
167<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 <code><a href="#setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700169<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>
John Asmuth614db982014-04-24 15:46:26 -0400170<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400172<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>
173<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175<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>
Craig Citroe633be12015-03-02 13:40:36 -0800176<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 <code><a href="#setTags">setTags(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178<p class="firstline">Sets network tags for the specified instance to the data included in the request.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800179<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700180 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
181<p class="firstline">Simulates a maintenance event on the instance.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700182<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700183 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
184<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
185<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
188<p class="toc_element">
189 <code><a href="#stop">stop(project, zone, instance, requestId=None)</a></code></p>
190<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>
191<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
194<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 <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 -0700196<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>
197<p class="toc_element">
198 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199<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>
200<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</a></code></p>
202<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>
203<p class="toc_element">
204 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205<p class="firstline">Updates an instance's network interface. This method follows PATCH semantics.</p>
206<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700207 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208<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>
John Asmuth614db982014-04-24 15:46:26 -0400209<h3>Method Details</h3>
210<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700211 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 <pre>Adds an access config to an instance&#x27;s network interface.
John Asmuth614db982014-04-24 15:46:26 -0400213
214Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000215 project: string, Project ID for this request. (required)
216 zone: string, The name of the zone for this request. (required)
217 instance: string, The instance name for this request. (required)
218 networkInterface: string, The name of the network interface to add to this instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400220 The object takes the form of:
221
Bu Sun Kim65020912020-05-20 12:08:20 -0700222{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
223 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
224 &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.
225 &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.
226 &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 -0700227 #
228 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
229 #
230 # 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 -0700231 &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.
232 &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.
233 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
John Asmuth614db982014-04-24 15:46:26 -0400234}
235
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 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.
237
238For 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.
239
240The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400241
242Returns:
243 An object of the form:
244
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 { # Represents an Operation resource.
246 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700247 # Google Compute Engine has three Operation resources:
248 #
249 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
250 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
252 #
253 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700254 # - For global operations, use the `globalOperations` resource.
255 # - For regional operations, use the `regionOperations` resource.
256 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700257 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 # 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 -0700259 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
260 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
261 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
262 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
263 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
264 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400265 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
267 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
268 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400269 },
270 ],
271 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 &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`.
273 &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.
274 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
275 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
276 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
277 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
278 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
279 &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.
280 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
281 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
282 &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.
283 &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`.
284 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
285 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
286 &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.
287 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
288 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
289 {
290 &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.
291 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
292 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
293 {
294 &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).
295 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
296 },
297 ],
298 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
299 },
300 ],
301 &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.
John Asmuth614db982014-04-24 15:46:26 -0400302 }</pre>
303</div>
304
305<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700306 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
307 <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.
308
309Args:
310 project: string, Project ID for this request. (required)
311 zone: string, The name of the zone for this request. (required)
312 instance: string, The instance name for this request. (required)
313 body: object, The request body.
314 The object takes the form of:
315
316{
Bu Sun Kim65020912020-05-20 12:08:20 -0700317 &quot;resourcePolicies&quot;: [ # Resource policies to be added to this instance.
318 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 ],
320 }
321
322 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.
323
324For 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.
325
326The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
327
328Returns:
329 An object of the form:
330
331 { # Represents an Operation resource.
332 #
333 # Google Compute Engine has three Operation resources:
334 #
335 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
336 #
337 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
338 #
339 # Operations can be global, regional or zonal.
340 # - For global operations, use the `globalOperations` resource.
341 # - For regional operations, use the `regionOperations` resource.
342 # - For zonal operations, use the `zonalOperations` resource.
343 #
344 # 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 -0700345 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
346 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
347 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
348 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
349 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
350 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700351 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
353 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
354 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -0700355 },
356 ],
357 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 &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`.
359 &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.
360 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
361 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
362 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
363 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
364 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
365 &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.
366 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
367 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
368 &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.
369 &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`.
370 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
371 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
372 &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.
373 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
374 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
375 {
376 &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.
377 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
378 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
379 {
380 &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).
381 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
382 },
383 ],
384 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
385 },
386 ],
387 &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 -0700388 }</pre>
389</div>
390
391<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700392 <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 -0700393 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
John Asmuth614db982014-04-24 15:46:26 -0400394
395Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000396 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700397 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;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700398
Dan O'Mearadd494642020-05-01 07:42:23 -0700399For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700400
Dan O'Mearadd494642020-05-01 07:42:23 -0700401You 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800402
Bu Sun Kim65020912020-05-20 12:08:20 -0700403To 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 -0700404 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 -0700405 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`)
406 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
407
408You 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.
409
410Currently, only sorting by `name` or `creationTimestamp desc` is supported.
411 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700412 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.
John Asmuth614db982014-04-24 15:46:26 -0400413
414Returns:
415 An object of the form:
416
417 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700418 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
419 &quot;items&quot;: { # An object that contains a list of instances scoped by zone.
420 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of instances.
421 &quot;instances&quot;: [ # [Output Only] A list of instances contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 { # Represents an Instance resource.
423 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700424 # 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 -0700425 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700426 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
427 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
428 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700429 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
430 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
431 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
432 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
433 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
John Asmuth614db982014-04-24 15:46:26 -0400434 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700435 &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).
436 &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.
437 &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.
438 #
439 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700440 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700441 #
442 # 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.
443 #
444 # 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.
445 #
446 # 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.
447 #
448 # 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 -0700449 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
450 &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.
451 &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.
452 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700453 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
455 &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.
456 { # Guest OS features.
457 &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.
458 },
459 ],
460 &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.
461 &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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000462 #
463 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
464 #
465 # 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 -0700466 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
467 &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.
468 &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.
469 &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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000470 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
471 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700472 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000473 # 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:
474 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
475 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700476 # - 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 -0700477 &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.
478 &quot;a_key&quot;: &quot;A String&quot;,
479 },
480 &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.
481 &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.
482 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700483 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700484 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700485 #
486 # 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:
487 # projects/debian-cloud/global/images/family/debian-9
488 #
489 #
490 # Alternatively, use a specific version of a public operating system image:
491 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
492 #
493 #
494 # To create a disk with a custom image that you created, specify the image name in the following format:
495 # global/images/my-custom-image
496 #
497 #
498 # 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:
499 # global/images/family/my-image-family
500 #
501 #
502 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700503 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700504 #
505 # 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.
506 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
507 &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.
508 &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.
509 &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.
510 },
511 &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.
512 #
513 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
514 # global/snapshots/my-backup
515 #
516 #
517 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700518 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
520 &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.
521 &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.
522 &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 -0700523 },
John Asmuth614db982014-04-24 15:46:26 -0400524 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700525 &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.
526 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
527 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
528 &quot;A String&quot;,
529 ],
530 &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.
531 &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
532 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -0700533 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
535 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700536 },
537 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700538 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -0700539 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
541 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 },
543 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -0700545 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
547 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700548 },
549 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 &quot;pk&quot;: { # The Platform Key (PK).
551 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
552 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700553 },
554 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 &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 -0800556 #
557 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
558 #
559 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700561 },
John Asmuth614db982014-04-24 15:46:26 -0400562 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700563 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
564 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
565 },
566 &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.
567 #
568 # To see the latest fingerprint, make get() request to the instance.
569 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
570 { # A specification of the type and number of accelerator cards attached to the instance.
571 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
572 &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.
573 },
574 ],
575 &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.
576 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
577 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
578 &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.
579 #
580 # To see the latest fingerprint, make get() request to the instance.
581 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
582 &quot;a_key&quot;: &quot;A String&quot;,
583 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700584 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
585 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
586 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &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:
588 # zones/us-central1-f/machineTypes/n1-standard-1
589 #
590 #
591 # 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):
592 # zones/zone/machineTypes/custom-CPUS-MEMORY
593 #
594 #
595 # For example: zones/us-central1-f/machineTypes/custom-4-5120
596 #
597 # For a full list of restrictions, read the Specifications for custom machine types.
598 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
599 &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.
600 #
601 # To see the latest fingerprint, make a get() request to retrieve the resource.
602 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
603 {
604 &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.
605 &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).
606 },
607 ],
608 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
609 },
610 &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;.
611 &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.
612 &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.
613 { # A network interface resource attached to an instance.
614 &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.
615 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
616 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
617 &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.
618 &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.
619 &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.
620 #
621 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
622 #
623 # 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.
624 &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.
625 &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.
626 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
627 },
628 ],
629 &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.
630 { # An alias IP range attached to an instance&#x27;s network interface.
631 &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).
632 &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.
633 },
634 ],
635 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700636 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
Bu Sun Kim65020912020-05-20 12:08:20 -0700637 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
638 &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.
639 &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.
640 #
641 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
642 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
643 # - projects/project/global/networks/network
644 # - global/networks/default
645 &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.
646 &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:
647 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
648 # - regions/region/subnetworks/subnetwork
649 },
650 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700651 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
653 &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.
654 &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.
655 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
656 &quot;A String&quot;,
657 ],
658 },
659 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
660 &quot;A String&quot;,
661 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700662 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &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.
664 #
665 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700666 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Bu Sun Kim65020912020-05-20 12:08:20 -0700667 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
668 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
669 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
670 &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.
671 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
672 &quot;A String&quot;,
673 ],
674 },
675 ],
676 &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 -0700677 &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 -0700678 },
679 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
680 &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.
681 #
682 # 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.
683 { # A service account.
684 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
685 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
686 &quot;A String&quot;,
687 ],
688 },
689 ],
690 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
691 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
692 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
693 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
694 },
695 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
696 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
697 },
698 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700699 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle.
Bu Sun Kim65020912020-05-20 12:08:20 -0700700 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
701 &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.
702 &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.
703 #
704 # To see the latest fingerprint, make get() request to the instance.
705 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
706 &quot;A String&quot;,
707 ],
708 },
709 &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.
John Asmuth614db982014-04-24 15:46:26 -0400710 },
711 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700712 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
713 &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.
714 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
715 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
John Asmuth614db982014-04-24 15:46:26 -0400716 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &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).
718 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
John Asmuth614db982014-04-24 15:46:26 -0400719 },
720 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700721 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
John Asmuth614db982014-04-24 15:46:26 -0400722 },
723 },
724 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 &quot;kind&quot;: &quot;compute#instanceAggregatedList&quot;, # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
726 &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.
727 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700728 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
729 &quot;A String&quot;,
730 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700731 &quot;warning&quot;: { # [Output Only] Informational warning message.
732 &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.
733 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
734 # &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 -0700735 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700736 &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).
737 &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 -0700738 },
739 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 &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 -0700741 },
John Asmuth614db982014-04-24 15:46:26 -0400742 }</pre>
743</div>
744
745<div class="method">
746 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
747 <pre>Retrieves the next page of results.
748
749Args:
750 previous_request: The request for the previous page. (required)
751 previous_response: The response from the request for the previous page. (required)
752
753Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400755 page. Returns None if there are no more items in the collection.
756 </pre>
757</div>
758
759<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700760 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400761 <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.
John Asmuth614db982014-04-24 15:46:26 -0400762
763Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000764 project: string, Project ID for this request. (required)
765 zone: string, The name of the zone for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800766 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700767 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400768 The object takes the form of:
769
770{ # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700771 &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).
772 &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.
773 &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.
774 #
775 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700776 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700777 #
778 # 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.
779 #
780 # 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.
781 #
782 # 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.
783 #
784 # 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 -0700785 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
786 &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.
787 &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.
788 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700789 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700790 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
791 &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.
792 { # Guest OS features.
793 &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.
794 },
795 ],
796 &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.
797 &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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000798 #
799 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
800 #
801 # 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 -0700802 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
803 &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.
804 &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.
805 &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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000806 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
807 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700808 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000809 # 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:
810 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
811 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700812 # - 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 -0700813 &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.
814 &quot;a_key&quot;: &quot;A String&quot;,
815 },
816 &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.
817 &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.
818 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700820 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700821 #
822 # 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:
823 # projects/debian-cloud/global/images/family/debian-9
824 #
825 #
826 # Alternatively, use a specific version of a public operating system image:
827 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
828 #
829 #
830 # To create a disk with a custom image that you created, specify the image name in the following format:
831 # global/images/my-custom-image
832 #
833 #
834 # 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:
835 # global/images/family/my-image-family
836 #
837 #
838 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700839 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -0700840 #
841 # 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.
842 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
843 &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.
844 &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.
845 &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.
846 },
847 &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.
848 #
849 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
850 # global/snapshots/my-backup
851 #
852 #
853 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700854 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -0700855 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
856 &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.
857 &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.
858 &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 -0700859 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700860 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700861 &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.
862 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
863 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
864 &quot;A String&quot;,
865 ],
866 &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.
867 &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
868 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -0700869 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700870 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
871 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700872 },
873 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700874 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
877 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700878 },
879 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -0700881 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700882 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
883 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700884 },
885 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700886 &quot;pk&quot;: { # The Platform Key (PK).
887 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
888 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700889 },
890 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700891 &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 -0800892 #
893 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
894 #
895 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700896 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700897}
John Asmuth614db982014-04-24 15:46:26 -0400898
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700899 forceAttach: boolean, Whether to force attach the regional disk even if it&#x27;s currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700900 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.
901
902For 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.
903
904The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400905
906Returns:
907 An object of the form:
908
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 { # Represents an Operation resource.
910 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700911 # Google Compute Engine has three Operation resources:
912 #
913 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
914 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700915 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
916 #
917 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700918 # - For global operations, use the `globalOperations` resource.
919 # - For regional operations, use the `regionOperations` resource.
920 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700921 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700922 # 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 -0700923 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
924 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
925 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
926 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
927 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
928 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400929 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
931 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
932 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400933 },
934 ],
935 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700936 &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`.
937 &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.
938 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
939 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
940 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
941 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
942 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
943 &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.
944 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
945 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
946 &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.
947 &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`.
948 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
949 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
950 &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.
951 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
952 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
953 {
954 &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.
955 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
956 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
957 {
958 &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).
959 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
960 },
961 ],
962 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
963 },
964 ],
965 &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.
John Asmuth614db982014-04-24 15:46:26 -0400966 }</pre>
967</div>
968
969<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700970 <code class="details" id="close">close()</code>
971 <pre>Close httplib2 connections.</pre>
972</div>
973
974<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800976 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
John Asmuth614db982014-04-24 15:46:26 -0400977
978Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000979 project: string, Project ID for this request. (required)
980 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400981 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700982 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.
983
984For 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.
985
986The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400987
988Returns:
989 An object of the form:
990
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700991 { # Represents an Operation resource.
992 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700993 # Google Compute Engine has three Operation resources:
994 #
995 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
996 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700997 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
998 #
999 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001000 # - For global operations, use the `globalOperations` resource.
1001 # - For regional operations, use the `regionOperations` resource.
1002 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001003 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001004 # 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 -07001005 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1006 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1007 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1008 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1009 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1010 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001011 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001012 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1013 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1014 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04001015 },
1016 ],
1017 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001018 &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`.
1019 &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.
1020 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1021 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1022 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1023 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1024 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1025 &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.
1026 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1027 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1028 &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.
1029 &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`.
1030 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1031 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1032 &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.
1033 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1034 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1035 {
1036 &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.
1037 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1038 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1039 {
1040 &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).
1041 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1042 },
1043 ],
1044 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1045 },
1046 ],
1047 &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.
John Asmuth614db982014-04-24 15:46:26 -04001048 }</pre>
1049</div>
1050
1051<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 <pre>Deletes an access config from an instance&#x27;s network interface.
John Asmuth614db982014-04-24 15:46:26 -04001054
1055Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001056 project: string, Project ID for this request. (required)
1057 zone: string, The name of the zone for this request. (required)
1058 instance: string, The instance name for this request. (required)
1059 accessConfig: string, The name of the access config to delete. (required)
1060 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001061 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.
1062
1063For 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.
1064
1065The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04001066
1067Returns:
1068 An object of the form:
1069
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001070 { # Represents an Operation resource.
1071 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001072 # Google Compute Engine has three Operation resources:
1073 #
1074 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1075 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001076 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1077 #
1078 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001079 # - For global operations, use the `globalOperations` resource.
1080 # - For regional operations, use the `regionOperations` resource.
1081 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001082 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001083 # 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 -07001084 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1085 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1086 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1087 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1088 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1089 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001090 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001091 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1092 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1093 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04001094 },
1095 ],
1096 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001097 &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`.
1098 &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.
1099 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1100 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1101 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1102 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1103 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1104 &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.
1105 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1106 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1107 &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.
1108 &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`.
1109 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1110 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1111 &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.
1112 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1113 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1114 {
1115 &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.
1116 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1117 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1118 {
1119 &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).
1120 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1121 },
1122 ],
1123 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1124 },
1125 ],
1126 &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.
John Asmuth614db982014-04-24 15:46:26 -04001127 }</pre>
1128</div>
1129
1130<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001131 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001132 <pre>Detaches a disk from an instance.
1133
1134Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001135 project: string, Project ID for this request. (required)
1136 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001137 instance: string, Instance name for this request. (required)
1138 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)
1139 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.
1140
1141For 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.
1142
1143The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04001144
1145Returns:
1146 An object of the form:
1147
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001148 { # Represents an Operation resource.
1149 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001150 # Google Compute Engine has three Operation resources:
1151 #
1152 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1153 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001154 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1155 #
1156 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001157 # - For global operations, use the `globalOperations` resource.
1158 # - For regional operations, use the `regionOperations` resource.
1159 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001160 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001161 # 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 -07001162 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1163 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1164 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1165 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1166 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1167 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001168 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001169 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1170 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1171 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04001172 },
1173 ],
1174 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001175 &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`.
1176 &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.
1177 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1178 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1179 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1180 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1181 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1182 &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.
1183 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1184 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1185 &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.
1186 &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`.
1187 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1188 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1189 &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.
1190 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1191 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1192 {
1193 &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.
1194 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1195 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1196 {
1197 &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).
1198 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1199 },
1200 ],
1201 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1202 },
1203 ],
1204 &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.
John Asmuth614db982014-04-24 15:46:26 -04001205 }</pre>
1206</div>
1207
1208<div class="method">
1209 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001210 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -04001211
1212Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001213 project: string, Project ID for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001214 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001215 instance: string, Name of the instance resource to return. (required)
1216
1217Returns:
1218 An object of the form:
1219
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 { # Represents an Instance resource.
1221 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001222 # 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 -07001223 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001224 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
1225 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
1226 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001227 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1228 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1229 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1230 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1231 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
John Asmuth614db982014-04-24 15:46:26 -04001232 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001233 &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).
1234 &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.
1235 &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.
1236 #
1237 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001238 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001239 #
1240 # 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.
1241 #
1242 # 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.
1243 #
1244 # 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.
1245 #
1246 # 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 -07001247 &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;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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001251 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001252 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1253 &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.
1254 { # Guest OS features.
1255 &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.
1256 },
1257 ],
1258 &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.
1259 &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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001260 #
1261 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1262 #
1263 # 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 -07001264 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1265 &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.
1266 &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.
1267 &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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001268 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1269 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001270 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001271 # 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:
1272 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1273 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001274 # - 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 -07001275 &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.
1276 &quot;a_key&quot;: &quot;A String&quot;,
1277 },
1278 &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.
1279 &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.
1280 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001281 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001282 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001283 #
1284 # 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:
1285 # projects/debian-cloud/global/images/family/debian-9
1286 #
1287 #
1288 # Alternatively, use a specific version of a public operating system image:
1289 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1290 #
1291 #
1292 # To create a disk with a custom image that you created, specify the image name in the following format:
1293 # global/images/my-custom-image
1294 #
1295 #
1296 # 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:
1297 # global/images/family/my-image-family
1298 #
1299 #
1300 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001301 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07001302 #
1303 # 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.
1304 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1305 &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.
1306 &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.
1307 &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.
1308 },
1309 &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.
1310 #
1311 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1312 # global/snapshots/my-backup
1313 #
1314 #
1315 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001316 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07001317 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1318 &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.
1319 &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.
1320 &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 -07001321 },
John Asmuth614db982014-04-24 15:46:26 -04001322 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001323 &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.
1324 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1325 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1326 &quot;A String&quot;,
1327 ],
1328 &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.
1329 &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
1330 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07001331 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001332 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1333 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001334 },
1335 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001336 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07001337 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001338 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1339 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001340 },
1341 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001342 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07001343 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001344 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1345 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001346 },
1347 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001348 &quot;pk&quot;: { # The Platform Key (PK).
1349 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1350 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001351 },
1352 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001353 &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 -08001354 #
1355 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1356 #
1357 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001358 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001359 },
John Asmuth614db982014-04-24 15:46:26 -04001360 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001361 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1362 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1363 },
1364 &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.
1365 #
1366 # To see the latest fingerprint, make get() request to the instance.
1367 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1368 { # A specification of the type and number of accelerator cards attached to the instance.
1369 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1370 &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.
1371 },
1372 ],
1373 &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.
1374 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1375 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1376 &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.
1377 #
1378 # To see the latest fingerprint, make get() request to the instance.
1379 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1380 &quot;a_key&quot;: &quot;A String&quot;,
1381 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001382 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
1383 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
1384 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07001385 &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:
1386 # zones/us-central1-f/machineTypes/n1-standard-1
1387 #
1388 #
1389 # 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):
1390 # zones/zone/machineTypes/custom-CPUS-MEMORY
1391 #
1392 #
1393 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1394 #
1395 # For a full list of restrictions, read the Specifications for custom machine types.
1396 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1397 &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.
1398 #
1399 # To see the latest fingerprint, make a get() request to retrieve the resource.
1400 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1401 {
1402 &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.
1403 &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).
1404 },
1405 ],
1406 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1407 },
1408 &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;.
1409 &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.
1410 &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.
1411 { # A network interface resource attached to an instance.
1412 &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.
1413 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1414 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1415 &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.
1416 &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.
1417 &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.
1418 #
1419 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1420 #
1421 # 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.
1422 &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.
1423 &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.
1424 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1425 },
1426 ],
1427 &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.
1428 { # An alias IP range attached to an instance&#x27;s network interface.
1429 &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).
1430 &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.
1431 },
1432 ],
1433 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001434 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
Bu Sun Kim65020912020-05-20 12:08:20 -07001435 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1436 &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.
1437 &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.
1438 #
1439 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1440 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1441 # - projects/project/global/networks/network
1442 # - global/networks/default
1443 &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.
1444 &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:
1445 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1446 # - regions/region/subnetworks/subnetwork
1447 },
1448 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001449 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001450 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1451 &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.
1452 &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.
1453 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1454 &quot;A String&quot;,
1455 ],
1456 },
1457 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
1458 &quot;A String&quot;,
1459 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001460 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001461 &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.
1462 #
1463 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001464 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1466 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1467 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1468 &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.
1469 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1470 &quot;A String&quot;,
1471 ],
1472 },
1473 ],
1474 &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 -07001475 &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 -07001476 },
1477 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1478 &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.
1479 #
1480 # 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.
1481 { # A service account.
1482 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1483 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1484 &quot;A String&quot;,
1485 ],
1486 },
1487 ],
1488 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1489 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1490 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1491 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1492 },
1493 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
1494 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1495 },
1496 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001497 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle.
Bu Sun Kim65020912020-05-20 12:08:20 -07001498 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
1499 &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.
1500 &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.
1501 #
1502 # To see the latest fingerprint, make get() request to the instance.
1503 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1504 &quot;A String&quot;,
1505 ],
1506 },
1507 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001508 }</pre>
1509</div>
1510
1511<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001512 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001513 <pre>Returns the specified guest attributes entry.
1514
1515Args:
1516 project: string, Project ID for this request. (required)
1517 zone: string, The name of the zone for this request. (required)
1518 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519 queryPath: string, Specifies the guest attributes path to be queried.
Bu Sun Kim65020912020-05-20 12:08:20 -07001520 variableKey: string, Specifies the key for the guest attributes entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001521
1522Returns:
1523 An object of the form:
1524
1525 { # A guest attributes entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001526 &quot;kind&quot;: &quot;compute#guestAttributes&quot;, # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
1527 &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;)
1528 &quot;queryValue&quot;: { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
1529 &quot;items&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001530 { # A guest attributes namespace/key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001531 &quot;key&quot;: &quot;A String&quot;, # Key for the guest attribute entry.
1532 &quot;namespace&quot;: &quot;A String&quot;, # Namespace for the guest attribute entry.
1533 &quot;value&quot;: &quot;A String&quot;, # Value for the guest attribute entry.
John Asmuth614db982014-04-24 15:46:26 -04001534 },
1535 ],
John Asmuth614db982014-04-24 15:46:26 -04001536 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001537 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1538 &quot;variableKey&quot;: &quot;A String&quot;, # The key to search for.
1539 &quot;variableValue&quot;: &quot;A String&quot;, # [Output Only] The value found for the requested key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001540 }</pre>
1541</div>
1542
1543<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001544 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001545 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
1546
1547Args:
1548 project: string, Project ID for this request. (required)
1549 zone: string, The name of the zone for this request. (required)
1550 resource: string, Name or id of the resource for this request. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001551 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001552
1553Returns:
1554 An object of the form:
1555
Dan O'Mearadd494642020-05-01 07:42:23 -07001556 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001557 #
1558 #
1559 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001560 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001561 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001562 # 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 -07001563 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001564 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001565 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001566 # { &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 -07001567 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001568 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001569 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001570 # 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 -07001571 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001572 # 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 -07001573 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001574 { # 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.
1575 #
1576 # 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.
1577 #
1578 # Example Policy with multiple AuditConfigs:
1579 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001580 # { &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 -07001581 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001582 # 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 -07001583 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001584 { # Provides the configuration for logging a type of permissions. Example:
1585 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001586 # { &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 -07001587 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001588 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1589 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1590 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001591 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001592 &quot;ignoreChildExemptions&quot;: True or False,
1593 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001594 },
1595 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001596 &quot;exemptedMembers&quot;: [
1597 &quot;A String&quot;,
1598 ],
1599 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001600 },
1601 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001602 &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 -07001603 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001604 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001605 &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.
1606 #
1607 # If the condition evaluates to `true`, then this binding applies to the current request.
1608 #
1609 # 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.
1610 #
1611 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1612 #
1613 # Example (Comparison):
1614 #
1615 # 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;
1616 #
1617 # Example (Equality):
1618 #
1619 # 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;
1620 #
1621 # Example (Logic):
1622 #
1623 # 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;
1624 #
1625 # Example (Data Manipulation):
1626 #
1627 # 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;
1628 #
1629 # 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.
1630 &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.
1631 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1632 &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.
1633 &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.
1634 },
1635 &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 -07001636 #
1637 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1638 #
1639 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1640 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001641 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001642 #
1643 #
1644 #
1645 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1646 #
1647 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1648 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001649 # * `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.
1650 #
1651 # * `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.
1652 #
1653 # * `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.
1654 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001655 #
1656 #
1657 # * `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 -07001658 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001659 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001660 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001661 },
1662 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001663 &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.
1664 #
1665 # **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.
1666 &quot;iamOwned&quot;: True or False,
1667 &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.
1668 { # A rule to be applied in a Policy.
1669 &quot;action&quot;: &quot;A String&quot;, # Required
1670 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1671 { # A condition to be met.
1672 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1673 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1674 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1675 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1676 &quot;values&quot;: [ # The objects of the condition.
1677 &quot;A String&quot;,
1678 ],
1679 },
1680 ],
1681 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1682 &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.
1683 &quot;A String&quot;,
1684 ],
1685 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1686 { # Specifies what kind of log the caller must write
1687 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1688 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1689 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1690 },
1691 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1692 },
1693 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1694 #
1695 # 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.
1696 #
1697 # Field names correspond to IAM request parameters and field values are their respective values.
1698 #
1699 # 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.
1700 #
1701 # 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]}
1702 &quot;customFields&quot;: [ # Custom fields.
1703 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1704 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1705 &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.
1706 },
1707 ],
1708 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1709 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1710 },
1711 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1712 &quot;logMode&quot;: &quot;A String&quot;,
1713 },
1714 },
1715 ],
1716 &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.
1717 &quot;A String&quot;,
1718 ],
1719 &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.
1720 &quot;A String&quot;,
1721 ],
1722 },
1723 ],
1724 &quot;version&quot;: 42, # Specifies the format of the policy.
1725 #
1726 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1727 #
1728 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1729 #
1730 # * 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
1731 #
1732 # **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.
1733 #
1734 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1735 #
1736 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
John Asmuth614db982014-04-24 15:46:26 -04001737 }</pre>
1738</div>
1739
1740<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001741 <code class="details" id="getScreenshot">getScreenshot(project, zone, instance)</code>
1742 <pre>Returns the screenshot from the specified instance.
1743
1744Args:
1745 project: string, Project ID for this request. (required)
1746 zone: string, The name of the zone for this request. (required)
1747 instance: string, Name of the instance scoping this request. (required)
1748
1749Returns:
1750 An object of the form:
1751
1752 { # An instance&#x27;s screenshot.
1753 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The Base64-encoded screenshot data.
1754 &quot;kind&quot;: &quot;compute#screenshot&quot;, # [Output Only] Type of the resource. Always compute#screenshot for the screenshots.
1755 }</pre>
1756</div>
1757
1758<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001759 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001760 <pre>Returns the last 1 MB of serial port output from the specified instance.
John Asmuth614db982014-04-24 15:46:26 -04001761
1762Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001763 project: string, Project ID for this request. (required)
1764 zone: string, The name of the zone for this request. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001765 instance: string, Name of the instance for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001766 port: integer, Specifies which COM or serial port to retrieve data from.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001767 start: string, Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`.
1768
1769If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value.
1770
1771You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.
John Asmuth614db982014-04-24 15:46:26 -04001772
1773Returns:
1774 An object of the form:
1775
Bu Sun Kim65020912020-05-20 12:08:20 -07001776 { # An instance&#x27;s serial console output.
1777 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The contents of the console output.
1778 &quot;kind&quot;: &quot;compute#serialPortOutput&quot;, # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001779 &quot;next&quot;: &quot;A String&quot;, # [Output Only] The position of the next byte of content, regardless of whether the content exists, following the output returned in the `contents` property. Use this value in the next request as the start parameter.
Bu Sun Kim65020912020-05-20 12:08:20 -07001780 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001781 &quot;start&quot;: &quot;A String&quot;, # The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer (1 MB), older output is overwritten by newer content. The output start value will indicate the byte position of the output that was returned, which might be different than the `start` value that was specified in the request.
John Asmuth614db982014-04-24 15:46:26 -04001782 }</pre>
1783</div>
1784
1785<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001786 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
1787 <pre>Returns the Shielded Instance Identity of an instance
1788
1789Args:
1790 project: string, Project ID for this request. (required)
1791 zone: string, The name of the zone for this request. (required)
1792 instance: string, Name or id of the instance scoping this request. (required)
1793
1794Returns:
1795 An object of the form:
1796
1797 { # A shielded Instance identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001798 &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.
1799 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
1800 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001801 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001802 &quot;kind&quot;: &quot;compute#shieldedInstanceIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
1803 &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.
1804 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
1805 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001806 },
1807 }</pre>
1808</div>
1809
1810<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001811 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001812 <pre>Creates an instance resource in the specified project using the data included in the request.
1813
1814Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001815 project: string, Project ID for this request. (required)
1816 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001817 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04001818 The object takes the form of:
1819
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001820{ # Represents an Instance resource.
1821 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001822 # 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 -07001823 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001824 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
1825 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
1826 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001827 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1828 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1829 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1830 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1831 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
John Asmuth614db982014-04-24 15:46:26 -04001832 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001833 &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).
1834 &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.
1835 &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.
1836 #
1837 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001838 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001839 #
1840 # 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.
1841 #
1842 # 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.
1843 #
1844 # 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.
1845 #
1846 # 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 -07001847 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1848 &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.
1849 &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.
1850 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001851 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001852 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1853 &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.
1854 { # Guest OS features.
1855 &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.
1856 },
1857 ],
1858 &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.
1859 &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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001860 #
1861 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1862 #
1863 # 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 -07001864 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1865 &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.
1866 &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.
1867 &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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001868 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1869 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001870 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001871 # 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:
1872 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1873 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001874 # - 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 -07001875 &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.
1876 &quot;a_key&quot;: &quot;A String&quot;,
1877 },
1878 &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.
1879 &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.
1880 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001881 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001882 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001883 #
1884 # 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:
1885 # projects/debian-cloud/global/images/family/debian-9
1886 #
1887 #
1888 # Alternatively, use a specific version of a public operating system image:
1889 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1890 #
1891 #
1892 # To create a disk with a custom image that you created, specify the image name in the following format:
1893 # global/images/my-custom-image
1894 #
1895 #
1896 # 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:
1897 # global/images/family/my-image-family
1898 #
1899 #
1900 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001901 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07001902 #
1903 # 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.
1904 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1905 &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.
1906 &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.
1907 &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.
1908 },
1909 &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.
1910 #
1911 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1912 # global/snapshots/my-backup
1913 #
1914 #
1915 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001916 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07001917 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1918 &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.
1919 &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.
1920 &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 -07001921 },
John Asmuth614db982014-04-24 15:46:26 -04001922 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001923 &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.
1924 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1925 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1926 &quot;A String&quot;,
1927 ],
1928 &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.
1929 &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
1930 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07001931 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001932 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1933 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001934 },
1935 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001936 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07001937 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001938 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1939 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001940 },
1941 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001942 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07001943 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001944 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1945 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001946 },
1947 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001948 &quot;pk&quot;: { # The Platform Key (PK).
1949 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1950 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001951 },
1952 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001953 &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 -08001954 #
1955 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1956 #
1957 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001958 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001959 },
John Asmuth614db982014-04-24 15:46:26 -04001960 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001961 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1962 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1963 },
1964 &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.
1965 #
1966 # To see the latest fingerprint, make get() request to the instance.
1967 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1968 { # A specification of the type and number of accelerator cards attached to the instance.
1969 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1970 &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.
1971 },
1972 ],
1973 &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.
1974 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1975 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1976 &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.
1977 #
1978 # To see the latest fingerprint, make get() request to the instance.
1979 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1980 &quot;a_key&quot;: &quot;A String&quot;,
1981 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001982 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
1983 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
1984 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07001985 &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:
1986 # zones/us-central1-f/machineTypes/n1-standard-1
1987 #
1988 #
1989 # 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):
1990 # zones/zone/machineTypes/custom-CPUS-MEMORY
1991 #
1992 #
1993 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1994 #
1995 # For a full list of restrictions, read the Specifications for custom machine types.
1996 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1997 &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.
1998 #
1999 # To see the latest fingerprint, make a get() request to retrieve the resource.
2000 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2001 {
2002 &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.
2003 &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).
2004 },
2005 ],
2006 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2007 },
2008 &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;.
2009 &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.
2010 &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.
2011 { # A network interface resource attached to an instance.
2012 &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.
2013 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2014 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2015 &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.
2016 &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.
2017 &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.
2018 #
2019 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2020 #
2021 # 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.
2022 &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.
2023 &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.
2024 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2025 },
2026 ],
2027 &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.
2028 { # An alias IP range attached to an instance&#x27;s network interface.
2029 &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).
2030 &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.
2031 },
2032 ],
2033 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002034 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
Bu Sun Kim65020912020-05-20 12:08:20 -07002035 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2036 &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.
2037 &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.
2038 #
2039 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2040 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2041 # - projects/project/global/networks/network
2042 # - global/networks/default
2043 &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.
2044 &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:
2045 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2046 # - regions/region/subnetworks/subnetwork
2047 },
2048 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002049 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002050 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2051 &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.
2052 &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.
2053 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2054 &quot;A String&quot;,
2055 ],
2056 },
2057 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2058 &quot;A String&quot;,
2059 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002060 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002061 &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.
2062 #
2063 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002064 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Bu Sun Kim65020912020-05-20 12:08:20 -07002065 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2066 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2067 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2068 &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.
2069 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2070 &quot;A String&quot;,
2071 ],
2072 },
2073 ],
2074 &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 -07002075 &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 -07002076 },
2077 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2078 &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.
2079 #
2080 # 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.
2081 { # A service account.
2082 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2083 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2084 &quot;A String&quot;,
2085 ],
2086 },
2087 ],
2088 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2089 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2090 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2091 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2092 },
2093 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2094 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2095 },
2096 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002097 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle.
Bu Sun Kim65020912020-05-20 12:08:20 -07002098 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2099 &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.
2100 &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.
2101 #
2102 # To see the latest fingerprint, make get() request to the instance.
2103 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2104 &quot;A String&quot;,
2105 ],
2106 },
2107 &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.
John Asmuth614db982014-04-24 15:46:26 -04002108}
2109
Bu Sun Kim65020912020-05-20 12:08:20 -07002110 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.
2111
2112For 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.
2113
2114The 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 -07002115 sourceInstanceTemplate: string, Specifies instance template to create the instance.
2116
2117This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2118- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
2119- projects/project/global/instanceTemplates/instanceTemplate
2120- global/instanceTemplates/instanceTemplate
John Asmuth614db982014-04-24 15:46:26 -04002121
2122Returns:
2123 An object of the form:
2124
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002125 { # Represents an Operation resource.
2126 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002127 # Google Compute Engine has three Operation resources:
2128 #
2129 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2130 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002131 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2132 #
2133 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002134 # - For global operations, use the `globalOperations` resource.
2135 # - For regional operations, use the `regionOperations` resource.
2136 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002137 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002138 # 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 -07002139 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2140 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2141 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2142 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2143 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2144 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002145 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002146 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2147 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2148 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04002149 },
2150 ],
2151 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002152 &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`.
2153 &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.
2154 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2155 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2156 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2157 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2158 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2159 &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.
2160 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2161 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2162 &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.
2163 &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`.
2164 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2165 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2166 &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.
2167 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2168 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2169 {
2170 &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.
2171 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2172 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2173 {
2174 &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).
2175 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2176 },
2177 ],
2178 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2179 },
2180 ],
2181 &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.
John Asmuth614db982014-04-24 15:46:26 -04002182 }</pre>
2183</div>
2184
2185<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002186 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002187 <pre>Retrieves the list of instances contained within the specified zone.
John Asmuth614db982014-04-24 15:46:26 -04002188
2189Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002190 project: string, Project ID for this request. (required)
2191 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002192 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;`.
Takashi Matsuo06694102015-09-11 13:55:40 -07002193
Dan O'Mearadd494642020-05-01 07:42:23 -07002194For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -07002195
Dan O'Mearadd494642020-05-01 07:42:23 -07002196You 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002197
Bu Sun Kim65020912020-05-20 12:08:20 -07002198To 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) ```
2199 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`)
2200 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2201
2202You 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.
2203
2204Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2205 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002206 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.
John Asmuth614db982014-04-24 15:46:26 -04002207
2208Returns:
2209 An object of the form:
2210
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002211 { # Contains a list of instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002212 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2213 &quot;items&quot;: [ # A list of Instance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002214 { # Represents an Instance resource.
2215 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002216 # 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 -07002217 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002218 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
2219 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
2220 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002221 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
2222 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2223 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
2224 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2225 &quot;disks&quot;: [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
John Asmuth614db982014-04-24 15:46:26 -04002226 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002227 &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).
2228 &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.
2229 &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.
2230 #
2231 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002232 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002233 #
2234 # 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.
2235 #
2236 # 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.
2237 #
2238 # 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.
2239 #
2240 # 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 -07002241 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2242 &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.
2243 &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.
2244 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002245 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002246 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
2247 &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.
2248 { # Guest OS features.
2249 &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.
2250 },
2251 ],
2252 &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.
2253 &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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002254 #
2255 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2256 #
2257 # 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 -07002258 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
2259 &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.
2260 &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.
2261 &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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002262 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2263 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002264 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002265 # 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:
2266 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2267 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002268 # - 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 -07002269 &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.
2270 &quot;a_key&quot;: &quot;A String&quot;,
2271 },
2272 &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.
2273 &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.
2274 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002275 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002276 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002277 #
2278 # 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:
2279 # projects/debian-cloud/global/images/family/debian-9
2280 #
2281 #
2282 # Alternatively, use a specific version of a public operating system image:
2283 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
2284 #
2285 #
2286 # To create a disk with a custom image that you created, specify the image name in the following format:
2287 # global/images/my-custom-image
2288 #
2289 #
2290 # 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:
2291 # global/images/family/my-image-family
2292 #
2293 #
2294 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002295 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07002296 #
2297 # 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.
2298 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2299 &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.
2300 &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.
2301 &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.
2302 },
2303 &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.
2304 #
2305 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2306 # global/snapshots/my-backup
2307 #
2308 #
2309 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002310 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07002311 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2312 &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.
2313 &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.
2314 &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 -07002315 },
John Asmuth614db982014-04-24 15:46:26 -04002316 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002317 &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.
2318 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2319 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
2320 &quot;A String&quot;,
2321 ],
2322 &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.
2323 &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
2324 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07002325 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002326 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2327 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002328 },
2329 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002330 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07002331 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002332 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2333 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002334 },
2335 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002336 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07002337 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002338 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2339 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002340 },
2341 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002342 &quot;pk&quot;: { # The Platform Key (PK).
2343 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2344 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002345 },
2346 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002347 &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 -08002348 #
2349 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2350 #
2351 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002352 &quot;type&quot;: &quot;A String&quot;, # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002353 },
John Asmuth614db982014-04-24 15:46:26 -04002354 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002355 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2356 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
2357 },
2358 &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.
2359 #
2360 # To see the latest fingerprint, make get() request to the instance.
2361 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2362 { # A specification of the type and number of accelerator cards attached to the instance.
2363 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2364 &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.
2365 },
2366 ],
2367 &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.
2368 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2369 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2370 &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.
2371 #
2372 # To see the latest fingerprint, make get() request to the instance.
2373 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2374 &quot;a_key&quot;: &quot;A String&quot;,
2375 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002376 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
2377 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
2378 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07002379 &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:
2380 # zones/us-central1-f/machineTypes/n1-standard-1
2381 #
2382 #
2383 # 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):
2384 # zones/zone/machineTypes/custom-CPUS-MEMORY
2385 #
2386 #
2387 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2388 #
2389 # For a full list of restrictions, read the Specifications for custom machine types.
2390 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2391 &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.
2392 #
2393 # To see the latest fingerprint, make a get() request to retrieve the resource.
2394 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2395 {
2396 &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.
2397 &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).
2398 },
2399 ],
2400 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2401 },
2402 &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;.
2403 &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.
2404 &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.
2405 { # A network interface resource attached to an instance.
2406 &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.
2407 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2408 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2409 &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.
2410 &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.
2411 &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.
2412 #
2413 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2414 #
2415 # 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.
2416 &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.
2417 &quot;setPublicPtr&quot;: True or False, # Specifies whether a public DNS &#x27;PTR&#x27; record should be created to map the external IP address of the instance to a DNS domain name.
2418 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2419 },
2420 ],
2421 &quot;aliasIpRanges&quot;: [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
2422 { # An alias IP range attached to an instance&#x27;s network interface.
2423 &quot;ipCidrRange&quot;: &quot;A String&quot;, # The IP alias ranges to allocate for this interface. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (such as 10.2.3.4), a netmask (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24).
2424 &quot;subnetworkRangeName&quot;: &quot;A String&quot;, # The name of a subnetwork secondary IP range from which to allocate an IP alias range. If not specified, the primary range of the subnetwork is used.
2425 },
2426 ],
2427 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface, otherwise the request will fail with error 412 conditionNotMet.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002428 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
Bu Sun Kim65020912020-05-20 12:08:20 -07002429 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2430 &quot;name&quot;: &quot;A String&quot;, # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
2431 &quot;network&quot;: &quot;A String&quot;, # URL of the network resource for this instance. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred.
2432 #
2433 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2434 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2435 # - projects/project/global/networks/network
2436 # - global/networks/default
2437 &quot;networkIP&quot;: &quot;A String&quot;, # An IPv4 internal IP address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system.
2438 &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:
2439 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2440 # - regions/region/subnetworks/subnetwork
2441 },
2442 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002443 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07002444 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2445 &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.
2446 &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.
2447 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2448 &quot;A String&quot;,
2449 ],
2450 },
2451 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2452 &quot;A String&quot;,
2453 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002454 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002455 &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.
2456 #
2457 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002458 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Bu Sun Kim65020912020-05-20 12:08:20 -07002459 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2460 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2461 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2462 &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.
2463 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2464 &quot;A String&quot;,
2465 ],
2466 },
2467 ],
2468 &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 -07002469 &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 -07002470 },
2471 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2472 &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.
2473 #
2474 # 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.
2475 { # A service account.
2476 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2477 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2478 &quot;A String&quot;,
2479 ],
2480 },
2481 ],
2482 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2483 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2484 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2485 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2486 },
2487 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2488 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2489 },
2490 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002491 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle.
Bu Sun Kim65020912020-05-20 12:08:20 -07002492 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2493 &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.
2494 &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.
2495 #
2496 # To see the latest fingerprint, make get() request to the instance.
2497 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2498 &quot;A String&quot;,
2499 ],
2500 },
2501 &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.
John Asmuth614db982014-04-24 15:46:26 -04002502 },
2503 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002504 &quot;kind&quot;: &quot;compute#instanceList&quot;, # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
2505 &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.
2506 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2507 &quot;warning&quot;: { # [Output Only] Informational warning message.
2508 &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.
2509 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2510 # &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 -07002511 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002512 &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).
2513 &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 -07002514 },
2515 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002516 &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 -07002517 },
John Asmuth614db982014-04-24 15:46:26 -04002518 }</pre>
2519</div>
2520
2521<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002522 <code class="details" id="listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002523 <pre>Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002524
2525Args:
2526 project: string, Project ID for this request. (required)
2527 zone: string, The name of the zone for this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07002528 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 -07002529 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;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002530
Dan O'Mearadd494642020-05-01 07:42:23 -07002531For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002532
Dan O'Mearadd494642020-05-01 07:42:23 -07002533You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002534
Bu Sun Kim65020912020-05-20 12:08:20 -07002535To 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 -07002536 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 -07002537 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2538
2539You 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.
2540
2541Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07002542 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002543 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002544
2545Returns:
2546 An object of the form:
2547
2548 { # Contains a list of instance referrers.
Bu Sun Kim65020912020-05-20 12:08:20 -07002549 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2550 &quot;items&quot;: [ # A list of Reference resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002551 { # Represents a reference to a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002552 &quot;kind&quot;: &quot;compute#reference&quot;, # [Output Only] Type of the resource. Always compute#reference for references.
2553 &quot;referenceType&quot;: &quot;A String&quot;, # A description of the reference type with no implied semantics. Possible values include:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002554 # - MEMBER_OF
Bu Sun Kim65020912020-05-20 12:08:20 -07002555 &quot;referrer&quot;: &quot;A String&quot;, # URL of the resource which refers to the target.
2556 &quot;target&quot;: &quot;A String&quot;, # URL of the resource to which this reference points.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002557 },
2558 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002559 &quot;kind&quot;: &quot;compute#instanceListReferrers&quot;, # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
2560 &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.
2561 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2562 &quot;warning&quot;: { # [Output Only] Informational warning message.
2563 &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.
2564 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2565 # &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 -07002566 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002567 &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).
2568 &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 -07002569 },
2570 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002571 &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 -07002572 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002573 }</pre>
2574</div>
2575
2576<div class="method">
2577 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
2578 <pre>Retrieves the next page of results.
2579
2580Args:
2581 previous_request: The request for the previous page. (required)
2582 previous_response: The response from the request for the previous page. (required)
2583
2584Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002585 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002586 page. Returns None if there are no more items in the collection.
2587 </pre>
2588</div>
2589
2590<div class="method">
John Asmuth614db982014-04-24 15:46:26 -04002591 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2592 <pre>Retrieves the next page of results.
2593
2594Args:
2595 previous_request: The request for the previous page. (required)
2596 previous_response: The response from the request for the previous page. (required)
2597
2598Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002599 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04002600 page. Returns None if there are no more items in the collection.
2601 </pre>
2602</div>
2603
2604<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002605 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
2606 <pre>Removes resource policies from an instance.
2607
2608Args:
2609 project: string, Project ID for this request. (required)
2610 zone: string, The name of the zone for this request. (required)
2611 instance: string, The instance name for this request. (required)
2612 body: object, The request body.
2613 The object takes the form of:
2614
2615{
Bu Sun Kim65020912020-05-20 12:08:20 -07002616 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this instance.
2617 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002618 ],
2619 }
2620
2621 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.
2622
2623For 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.
2624
2625The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2626
2627Returns:
2628 An object of the form:
2629
2630 { # Represents an Operation resource.
2631 #
2632 # Google Compute Engine has three Operation resources:
2633 #
2634 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2635 #
2636 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2637 #
2638 # Operations can be global, regional or zonal.
2639 # - For global operations, use the `globalOperations` resource.
2640 # - For regional operations, use the `regionOperations` resource.
2641 # - For zonal operations, use the `zonalOperations` resource.
2642 #
2643 # 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 -07002644 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2645 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2646 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2647 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2648 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2649 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002650 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002651 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2652 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2653 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07002654 },
2655 ],
2656 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002657 &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`.
2658 &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.
2659 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2660 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2661 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2662 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2663 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2664 &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.
2665 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2666 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2667 &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.
2668 &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`.
2669 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2670 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2671 &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.
2672 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2673 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2674 {
2675 &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.
2676 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2677 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2678 {
2679 &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).
2680 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2681 },
2682 ],
2683 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2684 },
2685 ],
2686 &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 -07002687 }</pre>
2688</div>
2689
2690<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002691 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
2692 <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.
John Asmuth614db982014-04-24 15:46:26 -04002693
2694Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002695 project: string, Project ID for this request. (required)
2696 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04002697 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002698 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.
2699
2700For 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.
2701
2702The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04002703
2704Returns:
2705 An object of the form:
2706
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002707 { # Represents an Operation resource.
2708 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002709 # Google Compute Engine has three Operation resources:
2710 #
2711 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2712 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002713 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2714 #
2715 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002716 # - For global operations, use the `globalOperations` resource.
2717 # - For regional operations, use the `regionOperations` resource.
2718 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002719 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002720 # 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 -07002721 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2722 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2723 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2724 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2725 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2726 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002727 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002728 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2729 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2730 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04002731 },
2732 ],
2733 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002734 &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`.
2735 &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.
2736 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2737 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2738 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2739 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2740 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2741 &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.
2742 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2743 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2744 &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.
2745 &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`.
2746 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2747 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2748 &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.
2749 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2750 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2751 {
2752 &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.
2753 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2754 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2755 {
2756 &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).
2757 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2758 },
2759 ],
2760 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2761 },
2762 ],
2763 &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.
John Asmuth614db982014-04-24 15:46:26 -04002764 }</pre>
2765</div>
2766
2767<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002768 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
2769 <pre>Sets deletion protection on the instance.
2770
2771Args:
2772 project: string, Project ID for this request. (required)
2773 zone: string, The name of the zone for this request. (required)
2774 resource: string, Name or id of the resource for this request. (required)
2775 deletionProtection: boolean, Whether the resource should be protected against deletion.
2776 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.
2777
2778For 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.
2779
2780The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2781
2782Returns:
2783 An object of the form:
2784
2785 { # Represents an Operation resource.
2786 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002787 # Google Compute Engine has three Operation resources:
2788 #
2789 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2790 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002791 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2792 #
2793 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002794 # - For global operations, use the `globalOperations` resource.
2795 # - For regional operations, use the `regionOperations` resource.
2796 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002797 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002798 # 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 -07002799 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2800 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2801 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2802 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2803 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2804 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002805 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002806 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2807 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2808 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002809 },
2810 ],
2811 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002812 &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`.
2813 &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.
2814 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2815 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2816 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2817 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2818 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2819 &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.
2820 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2821 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2822 &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.
2823 &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`.
2824 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2825 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2826 &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.
2827 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2828 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2829 {
2830 &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.
2831 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2832 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2833 {
2834 &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).
2835 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2836 },
2837 ],
2838 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2839 },
2840 ],
2841 &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 -07002842 }</pre>
2843</div>
2844
2845<div class="method">
2846 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002847 <pre>Sets the auto-delete flag for a disk attached to an instance.
John Asmuth614db982014-04-24 15:46:26 -04002848
2849Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002850 project: string, Project ID for this request. (required)
2851 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002852 instance: string, The instance name for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04002853 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002854 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)
2855 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.
2856
2857For 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.
2858
2859The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04002860
2861Returns:
2862 An object of the form:
2863
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002864 { # Represents an Operation resource.
2865 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002866 # Google Compute Engine has three Operation resources:
2867 #
2868 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2869 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002870 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2871 #
2872 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002873 # - For global operations, use the `globalOperations` resource.
2874 # - For regional operations, use the `regionOperations` resource.
2875 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002876 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002877 # 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 -07002878 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2879 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2880 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2881 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2882 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2883 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002884 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002885 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2886 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2887 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04002888 },
2889 ],
2890 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002891 &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`.
2892 &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.
2893 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2894 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2895 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2896 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2897 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2898 &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.
2899 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2900 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2901 &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.
2902 &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`.
2903 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2904 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2905 &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.
2906 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2907 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2908 {
2909 &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.
2910 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2911 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2912 {
2913 &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).
2914 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2915 },
2916 ],
2917 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2918 },
2919 ],
2920 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002921 }</pre>
2922</div>
2923
2924<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002925 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002926 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
2927
2928Args:
2929 project: string, Project ID for this request. (required)
2930 zone: string, The name of the zone for this request. (required)
2931 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002932 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002933 The object takes the form of:
2934
2935{
Bu Sun Kim65020912020-05-20 12:08:20 -07002936 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
2937 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002938 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07002939 &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.
2940 #
2941 # If the condition evaluates to `true`, then this binding applies to the current request.
2942 #
2943 # 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.
2944 #
2945 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2946 #
2947 # Example (Comparison):
2948 #
2949 # 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;
2950 #
2951 # Example (Equality):
2952 #
2953 # 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;
2954 #
2955 # Example (Logic):
2956 #
2957 # 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;
2958 #
2959 # Example (Data Manipulation):
2960 #
2961 # 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;
2962 #
2963 # 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.
2964 &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.
2965 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2966 &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.
2967 &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.
2968 },
2969 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2970 #
2971 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2972 #
2973 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2974 #
2975 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
2976 #
2977 #
2978 #
2979 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2980 #
2981 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2982 #
2983 # * `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.
2984 #
2985 # * `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.
2986 #
2987 # * `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.
2988 #
2989 #
2990 #
2991 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2992 &quot;A String&quot;,
2993 ],
2994 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2995 },
2996 ],
2997 &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.
2998 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002999 #
3000 #
3001 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003002 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003003 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003004 # 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 -07003005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003006 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003007 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003008 # { &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 -07003009 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003010 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003011 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003012 # 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 -07003013 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003014 # 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 -07003015 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003016 { # 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.
3017 #
3018 # 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.
3019 #
3020 # Example Policy with multiple AuditConfigs:
3021 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003022 # { &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 -07003023 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003024 # 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 -07003025 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003026 { # Provides the configuration for logging a type of permissions. Example:
3027 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003028 # { &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 -07003029 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003030 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
3031 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3032 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003033 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003034 &quot;ignoreChildExemptions&quot;: True or False,
3035 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003036 },
3037 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003038 &quot;exemptedMembers&quot;: [
3039 &quot;A String&quot;,
3040 ],
3041 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003042 },
3043 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003044 &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 -07003045 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003046 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07003047 &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.
3048 #
3049 # If the condition evaluates to `true`, then this binding applies to the current request.
3050 #
3051 # 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.
3052 #
3053 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3054 #
3055 # Example (Comparison):
3056 #
3057 # 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;
3058 #
3059 # Example (Equality):
3060 #
3061 # 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;
3062 #
3063 # Example (Logic):
3064 #
3065 # 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;
3066 #
3067 # Example (Data Manipulation):
3068 #
3069 # 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;
3070 #
3071 # 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.
3072 &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.
3073 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
3074 &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.
3075 &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.
3076 },
3077 &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 -07003078 #
3079 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3080 #
3081 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3082 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003083 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003084 #
3085 #
3086 #
3087 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3088 #
3089 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3090 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003091 # * `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.
3092 #
3093 # * `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.
3094 #
3095 # * `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.
3096 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003097 #
3098 #
3099 # * `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 -07003100 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003101 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003102 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003103 },
3104 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003105 &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.
3106 #
3107 # **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.
3108 &quot;iamOwned&quot;: True or False,
3109 &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.
3110 { # A rule to be applied in a Policy.
3111 &quot;action&quot;: &quot;A String&quot;, # Required
3112 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3113 { # A condition to be met.
3114 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
3115 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
3116 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
3117 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3118 &quot;values&quot;: [ # The objects of the condition.
3119 &quot;A String&quot;,
3120 ],
3121 },
3122 ],
3123 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
3124 &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.
3125 &quot;A String&quot;,
3126 ],
3127 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3128 { # Specifies what kind of log the caller must write
3129 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
3130 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3131 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
3132 },
3133 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
3134 },
3135 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
3136 #
3137 # 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.
3138 #
3139 # Field names correspond to IAM request parameters and field values are their respective values.
3140 #
3141 # 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.
3142 #
3143 # 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]}
3144 &quot;customFields&quot;: [ # Custom fields.
3145 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3146 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
3147 &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.
3148 },
3149 ],
3150 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
3151 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
3152 },
3153 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
3154 &quot;logMode&quot;: &quot;A String&quot;,
3155 },
3156 },
3157 ],
3158 &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.
3159 &quot;A String&quot;,
3160 ],
3161 &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.
3162 &quot;A String&quot;,
3163 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003164 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003165 ],
3166 &quot;version&quot;: 42, # Specifies the format of the policy.
3167 #
3168 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3169 #
3170 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3171 #
3172 # * 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
3173 #
3174 # **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.
3175 #
3176 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
3177 #
3178 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3179 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003180 }
3181
3182
3183Returns:
3184 An object of the form:
3185
Dan O'Mearadd494642020-05-01 07:42:23 -07003186 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003187 #
3188 #
3189 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003190 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003191 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003192 # 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 -07003193 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003194 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003195 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003196 # { &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 -07003197 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003198 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003199 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003200 # 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 -07003201 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003202 # 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 -07003203 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003204 { # 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.
3205 #
3206 # 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.
3207 #
3208 # Example Policy with multiple AuditConfigs:
3209 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003210 # { &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 -07003211 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003212 # 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 -07003213 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003214 { # Provides the configuration for logging a type of permissions. Example:
3215 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003216 # { &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 -07003217 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003218 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
3219 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3220 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003221 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003222 &quot;ignoreChildExemptions&quot;: True or False,
3223 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003224 },
3225 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003226 &quot;exemptedMembers&quot;: [
3227 &quot;A String&quot;,
3228 ],
3229 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003230 },
3231 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003232 &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 -07003233 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003234 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07003235 &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.
3236 #
3237 # If the condition evaluates to `true`, then this binding applies to the current request.
3238 #
3239 # 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.
3240 #
3241 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3242 #
3243 # Example (Comparison):
3244 #
3245 # 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;
3246 #
3247 # Example (Equality):
3248 #
3249 # 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;
3250 #
3251 # Example (Logic):
3252 #
3253 # 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;
3254 #
3255 # Example (Data Manipulation):
3256 #
3257 # 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;
3258 #
3259 # 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.
3260 &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.
3261 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
3262 &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.
3263 &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.
3264 },
3265 &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 -07003266 #
3267 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3268 #
3269 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3270 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003271 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003272 #
3273 #
3274 #
3275 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3276 #
3277 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3278 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003279 # * `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.
3280 #
3281 # * `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.
3282 #
3283 # * `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.
3284 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003285 #
3286 #
3287 # * `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 -07003288 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003289 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003290 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003291 },
3292 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003293 &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.
3294 #
3295 # **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.
3296 &quot;iamOwned&quot;: True or False,
3297 &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.
3298 { # A rule to be applied in a Policy.
3299 &quot;action&quot;: &quot;A String&quot;, # Required
3300 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3301 { # A condition to be met.
3302 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
3303 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
3304 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
3305 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3306 &quot;values&quot;: [ # The objects of the condition.
3307 &quot;A String&quot;,
3308 ],
3309 },
3310 ],
3311 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
3312 &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.
3313 &quot;A String&quot;,
3314 ],
3315 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3316 { # Specifies what kind of log the caller must write
3317 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
3318 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3319 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
3320 },
3321 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
3322 },
3323 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
3324 #
3325 # 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.
3326 #
3327 # Field names correspond to IAM request parameters and field values are their respective values.
3328 #
3329 # 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.
3330 #
3331 # 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]}
3332 &quot;customFields&quot;: [ # Custom fields.
3333 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3334 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
3335 &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.
3336 },
3337 ],
3338 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
3339 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
3340 },
3341 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
3342 &quot;logMode&quot;: &quot;A String&quot;,
3343 },
3344 },
3345 ],
3346 &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.
3347 &quot;A String&quot;,
3348 ],
3349 &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.
3350 &quot;A String&quot;,
3351 ],
3352 },
3353 ],
3354 &quot;version&quot;: 42, # Specifies the format of the policy.
3355 #
3356 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3357 #
3358 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3359 #
3360 # * 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
3361 #
3362 # **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.
3363 #
3364 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
3365 #
3366 # 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 -07003367 }</pre>
3368</div>
3369
3370<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003371 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003372 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003373
3374Args:
3375 project: string, Project ID for this request. (required)
3376 zone: string, The name of the zone for this request. (required)
3377 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003378 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003379 The object takes the form of:
3380
3381{
Bu Sun Kim65020912020-05-20 12:08:20 -07003382 &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.
3383 &quot;labels&quot;: {
3384 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003385 },
3386 }
3387
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003388 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.
3389
3390For 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.
3391
3392The 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 -04003393
3394Returns:
3395 An object of the form:
3396
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003397 { # Represents an Operation resource.
3398 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003399 # Google Compute Engine has three Operation resources:
3400 #
3401 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3402 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003403 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3404 #
3405 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003406 # - For global operations, use the `globalOperations` resource.
3407 # - For regional operations, use the `regionOperations` resource.
3408 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003409 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003410 # 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 -07003411 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3412 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3413 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3414 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3415 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3416 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003417 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003418 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3419 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3420 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003421 },
3422 ],
3423 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003424 &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`.
3425 &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.
3426 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3427 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3428 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3429 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3430 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3431 &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.
3432 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3433 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3434 &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.
3435 &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`.
3436 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3437 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3438 &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.
3439 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3440 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3441 {
3442 &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.
3443 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3444 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3445 {
3446 &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).
3447 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3448 },
3449 ],
3450 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3451 },
3452 ],
3453 &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 -04003454 }</pre>
3455</div>
3456
3457<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003458 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003459 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
3460
3461Args:
3462 project: string, Project ID for this request. (required)
3463 zone: string, The name of the zone for this request. (required)
3464 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003465 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003466 The object takes the form of:
3467
3468{
Bu Sun Kim65020912020-05-20 12:08:20 -07003469 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003470 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003471 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
3472 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003473 },
3474 ],
3475 }
3476
3477 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.
3478
3479For 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.
3480
3481The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3482
3483Returns:
3484 An object of the form:
3485
3486 { # Represents an Operation resource.
3487 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003488 # Google Compute Engine has three Operation resources:
3489 #
3490 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3491 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003492 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3493 #
3494 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003495 # - For global operations, use the `globalOperations` resource.
3496 # - For regional operations, use the `regionOperations` resource.
3497 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003498 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003499 # 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 -07003500 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3501 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3502 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3503 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3504 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3505 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003506 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003507 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3508 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3509 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003510 },
3511 ],
3512 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003513 &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`.
3514 &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.
3515 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3516 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3517 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3518 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3519 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3520 &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.
3521 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3522 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3523 &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.
3524 &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`.
3525 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3526 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3527 &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.
3528 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3529 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3530 {
3531 &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.
3532 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3533 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3534 {
3535 &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).
3536 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3537 },
3538 ],
3539 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3540 },
3541 ],
3542 &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 -07003543 }</pre>
3544</div>
3545
3546<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003547 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003548 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
3549
3550Args:
3551 project: string, Project ID for this request. (required)
3552 zone: string, The name of the zone for this request. (required)
3553 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003554 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003555 The object takes the form of:
3556
3557{
Bu Sun Kim65020912020-05-20 12:08:20 -07003558 &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
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003559 }
3560
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003561 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.
3562
3563For 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.
3564
3565The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003566
3567Returns:
3568 An object of the form:
3569
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003570 { # Represents an Operation resource.
3571 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003572 # Google Compute Engine has three Operation resources:
3573 #
3574 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3575 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003576 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3577 #
3578 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003579 # - For global operations, use the `globalOperations` resource.
3580 # - For regional operations, use the `regionOperations` resource.
3581 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003582 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003583 # 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 -07003584 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3585 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3586 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3587 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3588 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3589 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003590 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003591 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3592 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3593 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003594 },
3595 ],
3596 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003597 &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`.
3598 &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.
3599 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3600 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3601 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3602 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3603 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3604 &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.
3605 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3606 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3607 &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.
3608 &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`.
3609 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3610 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3611 &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.
3612 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3613 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3614 {
3615 &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.
3616 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3617 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3618 {
3619 &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).
3620 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3621 },
3622 ],
3623 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3624 },
3625 ],
3626 &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.
John Asmuth614db982014-04-24 15:46:26 -04003627 }</pre>
3628</div>
3629
3630<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003631 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003632 <pre>Sets metadata for the specified instance to the data included in the request.
3633
3634Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003635 project: string, Project ID for this request. (required)
3636 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04003637 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003638 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04003639 The object takes the form of:
3640
3641{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07003642 &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 -07003643 #
3644 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003645 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3646 {
3647 &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.
3648 &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).
3649 },
3650 ],
3651 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
John Asmuth614db982014-04-24 15:46:26 -04003652}
3653
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003654 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.
3655
3656For 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.
3657
3658The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04003659
3660Returns:
3661 An object of the form:
3662
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003663 { # Represents an Operation resource.
3664 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003665 # Google Compute Engine has three Operation resources:
3666 #
3667 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3668 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003669 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3670 #
3671 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003672 # - For global operations, use the `globalOperations` resource.
3673 # - For regional operations, use the `regionOperations` resource.
3674 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003675 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003676 # 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 -07003677 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3678 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3679 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3680 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3681 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3682 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003683 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003684 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3685 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3686 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04003687 },
3688 ],
3689 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003690 &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`.
3691 &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.
3692 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3693 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3694 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3695 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3696 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3697 &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.
3698 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3699 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3700 &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.
3701 &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`.
3702 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3703 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3704 &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.
3705 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3706 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3707 {
3708 &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.
3709 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3710 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3711 {
3712 &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).
3713 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3714 },
3715 ],
3716 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3717 },
3718 ],
3719 &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.
John Asmuth614db982014-04-24 15:46:26 -04003720 }</pre>
3721</div>
3722
3723<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003724 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003725 <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.
3726
3727Args:
3728 project: string, Project ID for this request. (required)
3729 zone: string, The name of the zone for this request. (required)
3730 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003731 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003732 The object takes the form of:
3733
3734{
Bu Sun Kim65020912020-05-20 12:08:20 -07003735 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform this instance should be started at.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003736 }
3737
3738 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.
3739
3740For 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.
3741
3742The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3743
3744Returns:
3745 An object of the form:
3746
3747 { # Represents an Operation resource.
3748 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003749 # Google Compute Engine has three Operation resources:
3750 #
3751 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3752 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003753 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3754 #
3755 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003756 # - For global operations, use the `globalOperations` resource.
3757 # - For regional operations, use the `regionOperations` resource.
3758 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003759 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003760 # 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 -07003761 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3762 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3763 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3764 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3765 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3766 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003767 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003768 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3769 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3770 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003771 },
3772 ],
3773 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003774 &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`.
3775 &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.
3776 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3777 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3778 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3779 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3780 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3781 &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.
3782 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3783 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3784 &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.
3785 &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`.
3786 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3787 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3788 &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.
3789 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3790 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3791 {
3792 &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.
3793 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3794 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3795 {
3796 &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).
3797 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3798 },
3799 ],
3800 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3801 },
3802 ],
3803 &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 -07003804 }</pre>
3805</div>
3806
3807<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003808 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003809 <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.
John Asmuth614db982014-04-24 15:46:26 -04003810
3811Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003812 project: string, Project ID for this request. (required)
3813 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003814 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003815 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04003816 The object takes the form of:
3817
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003818{ # Sets the scheduling options for an Instance. NextID: 13
Bu Sun Kim65020912020-05-20 12:08:20 -07003819 &quot;automaticRestart&quot;: True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003820 #
3821 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07003822 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Bu Sun Kim65020912020-05-20 12:08:20 -07003823 &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 -07003824 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Bu Sun Kim65020912020-05-20 12:08:20 -07003825 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3826 &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.
3827 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
3828 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003829 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003830 },
3831 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003832 &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 -07003833 &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.
John Asmuth614db982014-04-24 15:46:26 -04003834}
3835
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003836 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.
3837
3838For 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.
3839
3840The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04003841
3842Returns:
3843 An object of the form:
3844
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003845 { # Represents an Operation resource.
3846 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003847 # Google Compute Engine has three Operation resources:
3848 #
3849 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3850 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003851 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3852 #
3853 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003854 # - For global operations, use the `globalOperations` resource.
3855 # - For regional operations, use the `regionOperations` resource.
3856 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003857 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003858 # 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 -07003859 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3860 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3861 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3862 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3863 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3864 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003865 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003866 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3867 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3868 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003869 },
3870 ],
3871 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003872 &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`.
3873 &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.
3874 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3875 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3876 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3877 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3878 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3879 &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.
3880 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3881 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3882 &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.
3883 &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`.
3884 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3885 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3886 &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.
3887 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3888 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3889 {
3890 &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.
3891 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3892 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3893 {
3894 &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).
3895 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3896 },
3897 ],
3898 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3899 },
3900 ],
3901 &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 -04003902 }</pre>
3903</div>
3904
3905<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003906 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003907 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
3908
3909Args:
3910 project: string, Project ID for this request. (required)
3911 zone: string, The name of the zone for this request. (required)
3912 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003913 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003914 The object takes the form of:
3915
3916{
Bu Sun Kim65020912020-05-20 12:08:20 -07003917 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
3918 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
3919 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003920 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003921 }
3922
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003923 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3924
3925For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3926
3927The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003928
3929Returns:
3930 An object of the form:
3931
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003932 { # Represents an Operation resource.
3933 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003934 # Google Compute Engine has three Operation resources:
3935 #
3936 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3937 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003938 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3939 #
3940 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003941 # - For global operations, use the `globalOperations` resource.
3942 # - For regional operations, use the `regionOperations` resource.
3943 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003944 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003945 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07003946 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3947 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3948 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3949 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3950 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3951 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003952 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003953 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3954 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3955 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04003956 },
3957 ],
3958 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003959 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
3960 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
3961 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3962 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3963 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3964 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3965 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3966 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
3967 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3968 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3969 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3970 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
3971 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3972 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3973 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
3974 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3975 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3976 {
3977 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3978 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3979 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3980 {
3981 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
3982 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3983 },
3984 ],
3985 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3986 },
3987 ],
3988 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
John Asmuth614db982014-04-24 15:46:26 -04003989 }</pre>
3990</div>
3991
3992<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003993 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003994 <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.
3995
3996Args:
3997 project: string, Project ID for this request. (required)
3998 zone: string, The name of the zone for this request. (required)
3999 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004000 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004001 The object takes the form of:
4002
4003{ # The policy describes the baseline against which Instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07004004 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07004005}
John Asmuth614db982014-04-24 15:46:26 -04004006
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004007 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.
4008
4009For 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.
4010
4011The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04004012
4013Returns:
4014 An object of the form:
4015
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004016 { # Represents an Operation resource.
4017 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004018 # Google Compute Engine has three Operation resources:
4019 #
4020 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4021 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004022 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4023 #
4024 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004025 # - For global operations, use the `globalOperations` resource.
4026 # - For regional operations, use the `regionOperations` resource.
4027 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004028 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004029 # 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 -07004030 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4031 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4032 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4033 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4034 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4035 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04004036 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004037 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4038 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4039 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04004040 },
4041 ],
4042 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004043 &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`.
4044 &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.
4045 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4046 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4047 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4048 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4049 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4050 &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.
4051 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4052 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4053 &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.
4054 &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`.
4055 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4056 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4057 &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.
4058 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4059 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4060 {
4061 &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.
4062 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4063 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4064 {
4065 &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).
4066 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4067 },
4068 ],
4069 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4070 },
4071 ],
4072 &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.
4073 }</pre>
4074</div>
4075
4076<div class="method">
4077 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
4078 <pre>Sets network tags for the specified instance to the data included in the request.
4079
4080Args:
4081 project: string, Project ID for this request. (required)
4082 zone: string, The name of the zone for this request. (required)
4083 instance: string, Name of the instance scoping this request. (required)
4084 body: object, The request body.
4085 The object takes the form of:
4086
4087{ # A set of instance tags.
4088 &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.
4089 #
4090 # To see the latest fingerprint, make get() request to the instance.
4091 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4092 &quot;A String&quot;,
4093 ],
4094}
4095
4096 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4097
4098For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4099
4100The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4101
4102Returns:
4103 An object of the form:
4104
4105 { # Represents an Operation resource.
4106 #
4107 # Google Compute Engine has three Operation resources:
4108 #
4109 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4110 #
4111 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4112 #
4113 # Operations can be global, regional or zonal.
4114 # - For global operations, use the `globalOperations` resource.
4115 # - For regional operations, use the `regionOperations` resource.
4116 # - For zonal operations, use the `zonalOperations` resource.
4117 #
4118 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4119 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4120 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4121 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4122 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4123 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4124 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
4125 {
4126 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4127 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4128 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4129 },
4130 ],
4131 },
4132 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4133 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
4134 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4135 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4136 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4137 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4138 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4139 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
4140 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4141 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4142 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4143 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4144 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4145 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4146 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
4147 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4148 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4149 {
4150 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4151 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4152 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4153 {
4154 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
4155 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4156 },
4157 ],
4158 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4159 },
4160 ],
4161 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Craig Citroe633be12015-03-02 13:40:36 -08004162 }</pre>
4163</div>
4164
4165<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004166 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
4167 <pre>Simulates a maintenance event on the instance.
4168
4169Args:
4170 project: string, Project ID for this request. (required)
4171 zone: string, The name of the zone for this request. (required)
4172 instance: string, Name of the instance scoping this request. (required)
4173
4174Returns:
4175 An object of the form:
4176
4177 { # Represents an Operation resource.
4178 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004179 # Google Compute Engine has three Operation resources:
4180 #
4181 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4182 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004183 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4184 #
4185 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004186 # - For global operations, use the `globalOperations` resource.
4187 # - For regional operations, use the `regionOperations` resource.
4188 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004189 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004190 # 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 -07004191 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4192 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4193 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4194 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4195 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4196 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004197 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004198 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4199 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4200 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004201 },
4202 ],
4203 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004204 &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`.
4205 &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.
4206 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4207 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4208 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4209 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4210 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4211 &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.
4212 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4213 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4214 &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.
4215 &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`.
4216 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4217 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4218 &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.
4219 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4220 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4221 {
4222 &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.
4223 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4224 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4225 {
4226 &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).
4227 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4228 },
4229 ],
4230 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4231 },
4232 ],
4233 &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 -07004234 }</pre>
4235</div>
4236
4237<div class="method">
4238 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
4239 <pre>Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Craig Citroe633be12015-03-02 13:40:36 -08004240
4241Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004242 project: string, Project ID for this request. (required)
4243 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08004244 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004245 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.
4246
4247For 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.
4248
4249The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citroe633be12015-03-02 13:40:36 -08004250
4251Returns:
4252 An object of the form:
4253
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004254 { # Represents an Operation resource.
4255 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004256 # Google Compute Engine has three Operation resources:
4257 #
4258 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4259 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004260 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4261 #
4262 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004263 # - For global operations, use the `globalOperations` resource.
4264 # - For regional operations, use the `regionOperations` resource.
4265 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004266 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004267 # 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 -07004268 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4269 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4270 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4271 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4272 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4273 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citroe633be12015-03-02 13:40:36 -08004274 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004275 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4276 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4277 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citroe633be12015-03-02 13:40:36 -08004278 },
4279 ],
4280 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004281 &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`.
4282 &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.
4283 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4284 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4285 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4286 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4287 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4288 &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.
4289 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4290 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4291 &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.
4292 &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`.
4293 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4294 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4295 &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.
4296 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4297 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4298 {
4299 &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.
4300 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4301 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4302 {
4303 &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).
4304 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4305 },
4306 ],
4307 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4308 },
4309 ],
4310 &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.
Craig Citroe633be12015-03-02 13:40:36 -08004311 }</pre>
4312</div>
4313
4314<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004315 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004316 <pre>Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004317
4318Args:
4319 project: string, Project ID for this request. (required)
4320 zone: string, The name of the zone for this request. (required)
4321 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004322 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004323 The object takes the form of:
4324
4325{
Bu Sun Kim65020912020-05-20 12:08:20 -07004326 &quot;disks&quot;: [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004327 #
4328 # In order to start the instance, the disk url and its corresponding key must be provided.
4329 #
4330 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
4331 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004332 &quot;diskEncryptionKey&quot;: { # Decrypts data associated with the disk with a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07004333 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4334 &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.
4335 &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.
4336 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004337 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004338 &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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004339 },
4340 ],
4341 }
4342
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004343 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.
4344
4345For 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.
4346
4347The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004348
4349Returns:
4350 An object of the form:
4351
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004352 { # Represents an Operation resource.
4353 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004354 # Google Compute Engine has three Operation resources:
4355 #
4356 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4357 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004358 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4359 #
4360 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004361 # - For global operations, use the `globalOperations` resource.
4362 # - For regional operations, use the `regionOperations` resource.
4363 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004364 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004365 # 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 -07004366 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4367 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4368 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4369 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4370 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4371 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004372 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004373 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4374 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4375 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004376 },
4377 ],
4378 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004379 &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`.
4380 &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.
4381 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4382 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4383 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4384 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4385 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4386 &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.
4387 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4388 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4389 &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.
4390 &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`.
4391 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4392 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4393 &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.
4394 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4395 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4396 {
4397 &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.
4398 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4399 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4400 {
4401 &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).
4402 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4403 },
4404 ],
4405 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4406 },
4407 ],
4408 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004409 }</pre>
4410</div>
4411
4412<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004413 <code class="details" id="stop">stop(project, zone, instance, requestId=None)</code>
4414 <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.
Craig Citroe633be12015-03-02 13:40:36 -08004415
4416Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004417 project: string, Project ID for this request. (required)
4418 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004419 instance: string, Name of the instance resource to stop. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004420 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
4421
4422For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
4423
4424The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citroe633be12015-03-02 13:40:36 -08004425
4426Returns:
4427 An object of the form:
4428
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004429 { # Represents an Operation resource.
4430 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004431 # Google Compute Engine has three Operation resources:
4432 #
4433 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4434 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004435 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4436 #
4437 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004438 # - For global operations, use the `globalOperations` resource.
4439 # - For regional operations, use the `regionOperations` resource.
4440 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004441 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004442 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07004443 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4444 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4445 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4446 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4447 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4448 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004449 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004450 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4451 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4452 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004453 },
4454 ],
4455 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004456 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4457 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
4458 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4459 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4460 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4461 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4462 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4463 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
4464 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4465 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4466 &quot;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.
4467 &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`.
4468 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4469 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4470 &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.
4471 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4472 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4473 {
4474 &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.
4475 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4476 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4477 {
4478 &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).
4479 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4480 },
4481 ],
4482 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4483 },
4484 ],
4485 &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 -07004486 }</pre>
4487</div>
4488
4489<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004490 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004491 <pre>Returns permissions that a caller has on the specified resource.
4492
4493Args:
4494 project: string, Project ID for this request. (required)
4495 zone: string, The name of the zone for this request. (required)
4496 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004497 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004498 The object takes the form of:
4499
4500{
Bu Sun Kim65020912020-05-20 12:08:20 -07004501 &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.
4502 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004503 ],
4504 }
4505
4506
4507Returns:
4508 An object of the form:
4509
4510 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004511 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
4512 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004513 ],
4514 }</pre>
4515</div>
4516
4517<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07004518 <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 -07004519 <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.
4520
4521Args:
4522 project: string, Project ID for this request. (required)
4523 zone: string, The name of the zone for this request. (required)
4524 instance: string, Name of the instance resource to update. (required)
4525 body: object, The request body.
4526 The object takes the form of:
4527
4528{ # Represents an Instance resource.
4529 #
4530 # 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 -07004531 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004532 &quot;confidentialInstanceConfig&quot;: { # A set of Confidential Instance options.
4533 &quot;enableConfidentialCompute&quot;: True or False, # Defines whether the instance should have confidential compute enabled.
4534 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004535 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
4536 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4537 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
4538 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4539 &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 -07004540 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004541 &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).
4542 &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.
4543 &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.
4544 #
4545 # If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004546 &quot;diskEncryptionKey&quot;: { # Encrypts or decrypts a disk using a customer-supplied encryption key.
Dan O'Mearadd494642020-05-01 07:42:23 -07004547 #
4548 # 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.
4549 #
4550 # 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.
4551 #
4552 # 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.
4553 #
4554 # 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 -07004555 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4556 &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.
4557 &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.
4558 &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 -07004559 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004560 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
4561 &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.
4562 { # Guest OS features.
4563 &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.
4564 },
4565 ],
4566 &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.
4567 &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 -07004568 #
4569 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
4570 #
4571 # 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 -07004572 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
4573 &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.
4574 &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.
4575 &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 -07004576 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
4577 #
4578 #
4579 # 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:
4580 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
4581 # - projects/project/zones/zone/diskTypes/diskType
4582 # - 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 -07004583 &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.
4584 &quot;a_key&quot;: &quot;A String&quot;,
4585 },
4586 &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.
4587 &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.
4588 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07004589 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004590 &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 -07004591 #
4592 # 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:
4593 # projects/debian-cloud/global/images/family/debian-9
4594 #
4595 #
4596 # Alternatively, use a specific version of a public operating system image:
4597 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
4598 #
4599 #
4600 # To create a disk with a custom image that you created, specify the image name in the following format:
4601 # global/images/my-custom-image
4602 #
4603 #
4604 # 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:
4605 # global/images/family/my-image-family
4606 #
4607 #
4608 # If the source image is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004609 &quot;sourceImageEncryptionKey&quot;: { # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
Bu Sun Kim65020912020-05-20 12:08:20 -07004610 #
4611 # 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.
4612 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4613 &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.
4614 &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.
4615 &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.
4616 },
4617 &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.
4618 #
4619 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
4620 # global/snapshots/my-backup
4621 #
4622 #
4623 # If the source snapshot is deleted later, this field will not be set.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004624 &quot;sourceSnapshotEncryptionKey&quot;: { # The customer-supplied encryption key of the source snapshot.
Bu Sun Kim65020912020-05-20 12:08:20 -07004625 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4626 &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.
4627 &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.
4628 &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 -07004629 },
4630 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004631 &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.
4632 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
4633 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
4634 &quot;A String&quot;,
4635 ],
4636 &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.
4637 &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
4638 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07004639 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004640 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4641 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004642 },
4643 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004644 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07004645 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004646 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4647 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004648 },
4649 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004650 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07004651 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004652 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4653 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004654 },
4655 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004656 &quot;pk&quot;: { # The Platform Key (PK).
4657 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4658 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004659 },
4660 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004661 &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 -07004662 #
4663 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
4664 #
4665 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07004666 &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 -07004667 },
4668 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004669 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
4670 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
4671 },
4672 &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.
4673 #
4674 # To see the latest fingerprint, make get() request to the instance.
4675 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
4676 { # A specification of the type and number of accelerator cards attached to the instance.
4677 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
4678 &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.
4679 },
4680 ],
4681 &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.
4682 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4683 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
4684 &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.
4685 #
4686 # To see the latest fingerprint, make get() request to the instance.
4687 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
4688 &quot;a_key&quot;: &quot;A String&quot;,
4689 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07004690 &quot;lastStartTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last start timestamp in RFC3339 text format.
4691 &quot;lastStopTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last stop timestamp in RFC3339 text format.
4692 &quot;lastSuspendedTimestamp&quot;: &quot;A String&quot;, # [Output Only] Last suspended timestamp in RFC3339 text format.
Bu Sun Kim65020912020-05-20 12:08:20 -07004693 &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:
4694 # zones/us-central1-f/machineTypes/n1-standard-1
4695 #
4696 #
4697 # 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):
4698 # zones/zone/machineTypes/custom-CPUS-MEMORY
4699 #
4700 #
4701 # For example: zones/us-central1-f/machineTypes/custom-4-5120
4702 #
4703 # For a full list of restrictions, read the Specifications for custom machine types.
4704 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
4705 &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.
4706 #
4707 # To see the latest fingerprint, make a get() request to retrieve the resource.
4708 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4709 {
4710 &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.
4711 &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).
4712 },
4713 ],
4714 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
4715 },
4716 &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;.
4717 &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.
4718 &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.
4719 { # A network interface resource attached to an instance.
4720 &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.
4721 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
4722 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4723 &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.
4724 &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.
4725 &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.
4726 #
4727 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4728 #
4729 # 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.
4730 &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.
4731 &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.
4732 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
4733 },
4734 ],
4735 &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.
4736 { # An alias IP range attached to an instance&#x27;s network interface.
4737 &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).
4738 &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.
4739 },
4740 ],
4741 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004742 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
Bu Sun Kim65020912020-05-20 12:08:20 -07004743 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
4744 &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.
4745 &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.
4746 #
4747 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
4748 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
4749 # - projects/project/global/networks/network
4750 # - global/networks/default
4751 &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.
4752 &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:
4753 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
4754 # - regions/region/subnetworks/subnetwork
4755 },
4756 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004757 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -07004758 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
4759 &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.
4760 &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.
4761 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
4762 &quot;A String&quot;,
4763 ],
4764 },
4765 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
4766 &quot;A String&quot;,
4767 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004768 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 13 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07004769 &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.
4770 #
4771 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07004772 &quot;minNodeCpus&quot;: 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Bu Sun Kim65020912020-05-20 12:08:20 -07004773 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
4774 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
4775 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
4776 &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.
4777 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
4778 &quot;A String&quot;,
4779 ],
4780 },
4781 ],
4782 &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 -07004783 &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 -07004784 },
4785 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
4786 &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.
4787 #
4788 # 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.
4789 { # A service account.
4790 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
4791 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
4792 &quot;A String&quot;,
4793 ],
4794 },
4795 ],
4796 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
4797 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
4798 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
4799 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
4800 },
4801 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
4802 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
4803 },
4804 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07004805 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle.
Bu Sun Kim65020912020-05-20 12:08:20 -07004806 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
4807 &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.
4808 &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.
4809 #
4810 # To see the latest fingerprint, make get() request to the instance.
4811 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4812 &quot;A String&quot;,
4813 ],
4814 },
4815 &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 -07004816}
4817
4818 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.
4819 Allowed values
4820 INVALID -
4821 NO_EFFECT -
4822 REFRESH -
4823 RESTART -
Bu Sun Kim65020912020-05-20 12:08:20 -07004824 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.
4825 Allowed values
4826 INVALID -
4827 NO_EFFECT -
4828 REFRESH -
4829 RESTART -
Dan O'Mearadd494642020-05-01 07:42:23 -07004830 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.
4831
4832For 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.
4833
4834The 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 -07004835
4836Returns:
4837 An object of the form:
4838
4839 { # Represents an Operation resource.
4840 #
4841 # Google Compute Engine has three Operation resources:
4842 #
4843 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4844 #
4845 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4846 #
4847 # Operations can be global, regional or zonal.
4848 # - For global operations, use the `globalOperations` resource.
4849 # - For regional operations, use the `regionOperations` resource.
4850 # - For zonal operations, use the `zonalOperations` resource.
4851 #
4852 # 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 -07004853 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4854 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4855 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4856 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4857 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4858 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004859 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004860 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4861 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4862 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07004863 },
4864 ],
4865 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004866 &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`.
4867 &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.
4868 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4869 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4870 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4871 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4872 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4873 &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.
4874 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4875 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4876 &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.
4877 &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`.
4878 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4879 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4880 &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.
4881 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4882 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4883 {
4884 &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.
4885 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4886 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4887 {
4888 &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).
4889 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4890 },
4891 ],
4892 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4893 },
4894 ],
4895 &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 -07004896 }</pre>
4897</div>
4898
4899<div class="method">
4900 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07004901 <pre>Updates the specified access config from an instance&#x27;s network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004902
4903Args:
4904 project: string, Project ID for this request. (required)
4905 zone: string, The name of the zone for this request. (required)
4906 instance: string, The instance name for this request. (required)
4907 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004908 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004909 The object takes the form of:
4910
Bu Sun Kim65020912020-05-20 12:08:20 -07004911{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
4912 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4913 &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.
4914 &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.
4915 &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 -07004916 #
4917 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4918 #
4919 # 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 -07004920 &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.
4921 &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.
4922 &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 -07004923}
4924
4925 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.
4926
4927For 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.
4928
4929The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4930
4931Returns:
4932 An object of the form:
4933
4934 { # Represents an Operation resource.
4935 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004936 # Google Compute Engine has three Operation resources:
4937 #
4938 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4939 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004940 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4941 #
4942 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004943 # - For global operations, use the `globalOperations` resource.
4944 # - For regional operations, use the `regionOperations` resource.
4945 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004946 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004947 # 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 -07004948 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4949 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4950 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4951 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4952 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4953 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004954 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004955 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4956 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4957 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004958 },
4959 ],
4960 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004961 &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`.
4962 &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.
4963 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4964 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4965 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4966 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4967 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4968 &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.
4969 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4970 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4971 &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.
4972 &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`.
4973 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4974 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4975 &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.
4976 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4977 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4978 {
4979 &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.
4980 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4981 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4982 {
4983 &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).
4984 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4985 },
4986 ],
4987 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4988 },
4989 ],
4990 &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 -07004991 }</pre>
4992</div>
4993
4994<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004995 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
4996 <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.
4997
4998Args:
4999 project: string, Project ID for this request. (required)
5000 zone: string, The name of the zone for this request. (required)
5001 instance: string, Name of the instance scoping this request. (required)
5002 body: object, The request body.
5003 The object takes the form of:
5004
5005{ # A set of Display Device options
Bu Sun Kim65020912020-05-20 12:08:20 -07005006 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07005007}
5008
5009 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.
5010
5011For 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.
5012
5013The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5014
5015Returns:
5016 An object of the form:
5017
5018 { # Represents an Operation resource.
5019 #
5020 # Google Compute Engine has three Operation resources:
5021 #
5022 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5023 #
5024 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5025 #
5026 # Operations can be global, regional or zonal.
5027 # - For global operations, use the `globalOperations` resource.
5028 # - For regional operations, use the `regionOperations` resource.
5029 # - For zonal operations, use the `zonalOperations` resource.
5030 #
5031 # 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 -07005032 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5033 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5034 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5035 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5036 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5037 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005038 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005039 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5040 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5041 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07005042 },
5043 ],
5044 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005045 &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`.
5046 &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.
5047 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5048 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5049 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5050 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5051 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5052 &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.
5053 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5054 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5055 &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.
5056 &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`.
5057 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5058 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5059 &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.
5060 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5061 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5062 {
5063 &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.
5064 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5065 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5066 {
5067 &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).
5068 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5069 },
5070 ],
5071 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5072 },
5073 ],
5074 &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 -07005075 }</pre>
5076</div>
5077
5078<div class="method">
5079 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07005080 <pre>Updates an instance&#x27;s network interface. This method follows PATCH semantics.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005081
5082Args:
5083 project: string, Project ID for this request. (required)
5084 zone: string, The name of the zone for this request. (required)
5085 instance: string, The instance name for this request. (required)
5086 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005087 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005088 The object takes the form of:
5089
5090{ # A network interface resource attached to an instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005091 &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.
5092 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
5093 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5094 &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.
5095 &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.
5096 &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.
5097 #
5098 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5099 #
5100 # 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.
5101 &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.
5102 &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.
5103 &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 -07005104 },
5105 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005106 &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.
5107 { # An alias IP range attached to an instance&#x27;s network interface.
5108 &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).
5109 &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.
5110 },
5111 ],
5112 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07005113 &quot;ipv6Address&quot;: &quot;A String&quot;, # [Output Only] An IPv6 internal network address for this network interface.
Bu Sun Kim65020912020-05-20 12:08:20 -07005114 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
5115 &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.
5116 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005117 #
5118 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
5119 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5120 # - projects/project/global/networks/network
5121 # - global/networks/default
Bu Sun Kim65020912020-05-20 12:08:20 -07005122 &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.
5123 &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:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005124 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
5125 # - regions/region/subnetworks/subnetwork
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005126}
5127
5128 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.
5129
5130For 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.
5131
5132The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5133
5134Returns:
5135 An object of the form:
5136
5137 { # Represents an Operation resource.
5138 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005139 # Google Compute Engine has three Operation resources:
5140 #
5141 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5142 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005143 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5144 #
5145 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005146 # - For global operations, use the `globalOperations` resource.
5147 # - For regional operations, use the `regionOperations` resource.
5148 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005149 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005150 # 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 -07005151 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5152 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5153 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5154 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5155 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5156 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005157 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005158 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5159 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5160 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005161 },
5162 ],
5163 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005164 &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`.
5165 &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.
5166 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5167 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5168 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5169 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5170 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5171 &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.
5172 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5173 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5174 &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.
5175 &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`.
5176 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5177 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5178 &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.
5179 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5180 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5181 {
5182 &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.
5183 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5184 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5185 {
5186 &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).
5187 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5188 },
5189 ],
5190 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5191 },
5192 ],
5193 &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 -07005194 }</pre>
5195</div>
5196
5197<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005198 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005199 <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.
5200
5201Args:
5202 project: string, Project ID for this request. (required)
5203 zone: string, The name of the zone for this request. (required)
5204 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005205 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005206 The object takes the form of:
5207
5208{ # A set of Shielded Instance options.
Bu Sun Kim65020912020-05-20 12:08:20 -07005209 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
5210 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
5211 &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 -07005212}
5213
5214 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.
5215
5216For 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.
5217
5218The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5219
5220Returns:
5221 An object of the form:
5222
5223 { # Represents an Operation resource.
5224 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005225 # Google Compute Engine has three Operation resources:
5226 #
5227 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5228 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005229 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5230 #
5231 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005232 # - For global operations, use the `globalOperations` resource.
5233 # - For regional operations, use the `regionOperations` resource.
5234 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005235 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005236 # 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 -07005237 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5238 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5239 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5240 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5241 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5242 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citroe633be12015-03-02 13:40:36 -08005243 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005244 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5245 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5246 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citroe633be12015-03-02 13:40:36 -08005247 },
5248 ],
5249 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005250 &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`.
5251 &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.
5252 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5253 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5254 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5255 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5256 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5257 &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.
5258 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5259 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5260 &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.
5261 &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`.
5262 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5263 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5264 &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.
5265 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5266 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5267 {
5268 &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.
5269 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5270 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5271 {
5272 &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).
5273 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5274 },
5275 ],
5276 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5277 },
5278 ],
5279 &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.
John Asmuth614db982014-04-24 15:46:26 -04005280 }</pre>
5281</div>
5282
5283</body></html>