blob: 1ea2cdf8c08d9cea9594805f48acdda328b0648a [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">
Bu Sun Kim65020912020-05-20 12:08:20 -070084 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<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 -040095<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040097<p class="firstline">Deletes an access config from an instance's network interface.</p>
98<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<p class="firstline">Detaches a disk from an instance.</p>
101<p class="toc_element">
102 <code><a href="#get">get(project, zone, instance)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Returns the specified Instance resource. Gets a list of available instances by making a list() request.</p>
104<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700105 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns the specified guest attributes entry.</p>
107<p class="toc_element">
108 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p>
109<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 -0400110<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700111 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400113<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
115<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
116<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 <code><a href="#insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400118<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
119<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700120 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800121<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
John Asmuth614db982014-04-24 15:46:26 -0400122<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 <code><a href="#listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700124<p class="firstline">Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125<p class="toc_element">
126 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
127<p class="firstline">Retrieves the next page of results.</p>
128<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -0400129 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
130<p class="firstline">Retrieves the next page of results.</p>
131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
133<p class="firstline">Removes resource policies from an instance.</p>
134<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
136<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 -0400137<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
139<p class="firstline">Sets deletion protection on the instance.</p>
140<p class="toc_element">
141 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000142<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#setLabels">setLabels(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
152<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 <code><a href="#setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800154<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
155<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 <code><a href="#setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400157<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160<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>
161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700163<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 -0400164<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400166<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>
167<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700169<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 -0800170<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code><a href="#setTags">setTags(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172<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 -0800173<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
175<p class="firstline">Simulates a maintenance event on the instance.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700176<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700177 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
178<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
179<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700181<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
182<p class="toc_element">
183 <code><a href="#stop">stop(project, zone, instance, requestId=None)</a></code></p>
184<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>
185<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
188<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700189 <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 -0700190<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>
191<p class="toc_element">
192 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193<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>
194<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</a></code></p>
196<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>
197<p class="toc_element">
198 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199<p class="firstline">Updates an instance's network interface. This method follows PATCH semantics.</p>
200<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202<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 -0400203<h3>Method Details</h3>
204<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 <pre>Adds an access config to an instance&#x27;s network interface.
John Asmuth614db982014-04-24 15:46:26 -0400207
208Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000209 project: string, Project ID for this request. (required)
210 zone: string, The name of the zone for this request. (required)
211 instance: string, The instance name for this request. (required)
212 networkInterface: string, The name of the network interface to add to this instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700213 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400214 The object takes the form of:
215
Bu Sun Kim65020912020-05-20 12:08:20 -0700216{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
217 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
218 &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.
219 &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.
220 &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 -0700221 #
222 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
223 #
224 # 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 -0700225 &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.
226 &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.
227 &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 -0400228}
229
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700230 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.
231
232For 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.
233
234The 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 -0400235
236Returns:
237 An object of the form:
238
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 { # Represents an Operation resource.
240 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 # Google Compute Engine has three Operation resources:
242 #
243 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
244 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
246 #
247 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700248 # - For global operations, use the `globalOperations` resource.
249 # - For regional operations, use the `regionOperations` resource.
250 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700252 # 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 -0700253 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
254 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
255 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
256 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
257 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
258 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400259 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
261 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
262 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400263 },
264 ],
265 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 &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`.
267 &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.
268 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
269 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
270 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
271 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
272 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
273 &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.
274 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
275 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
276 &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.
277 &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`.
278 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
279 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
280 &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.
281 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
282 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
283 {
284 &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.
285 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
286 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
287 {
288 &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).
289 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
290 },
291 ],
292 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
293 },
294 ],
295 &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 -0400296 }</pre>
297</div>
298
299<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
301 <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.
302
303Args:
304 project: string, Project ID for this request. (required)
305 zone: string, The name of the zone for this request. (required)
306 instance: string, The instance name for this request. (required)
307 body: object, The request body.
308 The object takes the form of:
309
310{
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 &quot;resourcePolicies&quot;: [ # Resource policies to be added to this instance.
312 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700313 ],
314 }
315
316 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.
317
318For 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.
319
320The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
321
322Returns:
323 An object of the form:
324
325 { # Represents an Operation resource.
326 #
327 # Google Compute Engine has three Operation resources:
328 #
329 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
330 #
331 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
332 #
333 # Operations can be global, regional or zonal.
334 # - For global operations, use the `globalOperations` resource.
335 # - For regional operations, use the `regionOperations` resource.
336 # - For zonal operations, use the `zonalOperations` resource.
337 #
338 # 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 -0700339 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
340 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
341 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
342 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
343 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
344 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700345 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700346 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
347 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
348 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 },
350 ],
351 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 &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`.
353 &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.
354 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
355 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
356 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
357 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
358 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
359 &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.
360 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
361 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
362 &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.
363 &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`.
364 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
365 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
366 &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.
367 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
368 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
369 {
370 &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.
371 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
372 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
373 {
374 &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).
375 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
376 },
377 ],
378 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
379 },
380 ],
381 &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 -0700382 }</pre>
383</div>
384
385<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700387 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
John Asmuth614db982014-04-24 15:46:26 -0400388
389Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000390 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 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 -0700392
Dan O'Mearadd494642020-05-01 07:42:23 -0700393For 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 -0700394
Dan O'Mearadd494642020-05-01 07:42:23 -0700395You 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 -0800396
Bu Sun Kim65020912020-05-20 12:08:20 -0700397To 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 -0700398 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 -0700399 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`)
400 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
401
402You 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.
403
404Currently, only sorting by `name` or `creationTimestamp desc` is supported.
405 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.
John Asmuth614db982014-04-24 15:46:26 -0400406
407Returns:
408 An object of the form:
409
410 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700411 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
412 &quot;items&quot;: { # An object that contains a list of instances scoped by zone.
413 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of instances.
414 &quot;instances&quot;: [ # [Output Only] A list of instances contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 { # Represents an Instance resource.
416 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700417 # 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 -0700418 &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.
419 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
420 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
421 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
422 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
423 &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 -0400424 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700425 &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).
426 &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.
427 &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.
428 #
429 # 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.
430 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700431 #
432 # 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.
433 #
434 # 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.
435 #
436 # 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.
437 #
438 # 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 -0700439 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
440 &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.
441 &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.
442 &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 -0700443 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700444 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
445 &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.
446 { # Guest OS features.
447 &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.
448 },
449 ],
450 &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.
451 &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 +0000452 #
453 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
454 #
455 # 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 -0700456 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
457 &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.
458 &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.
459 &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 +0000460 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
461 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000463 # 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:
464 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
465 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700466 # - 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 -0700467 &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.
468 &quot;a_key&quot;: &quot;A String&quot;,
469 },
470 &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.
471 &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.
472 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700473 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700474 &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 -0700475 #
476 # 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:
477 # projects/debian-cloud/global/images/family/debian-9
478 #
479 #
480 # Alternatively, use a specific version of a public operating system image:
481 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
482 #
483 #
484 # To create a disk with a custom image that you created, specify the image name in the following format:
485 # global/images/my-custom-image
486 #
487 #
488 # 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:
489 # global/images/family/my-image-family
490 #
491 #
492 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
494 #
495 # 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.
496 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
497 &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.
498 &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.
499 &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.
500 },
501 &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.
502 #
503 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
504 # global/snapshots/my-backup
505 #
506 #
507 # If the source snapshot is deleted later, this field will not be set.
508 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
509 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
510 &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.
511 &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.
512 &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 -0700513 },
John Asmuth614db982014-04-24 15:46:26 -0400514 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &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.
516 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
517 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
518 &quot;A String&quot;,
519 ],
520 &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.
521 &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
522 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -0700523 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
525 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700526 },
527 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700528 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -0700529 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
531 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700532 },
533 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -0700535 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700536 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
537 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700538 },
539 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 &quot;pk&quot;: { # The Platform Key (PK).
541 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
542 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700543 },
544 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700545 &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 -0800546 #
547 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
548 #
549 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 &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 -0700551 },
John Asmuth614db982014-04-24 15:46:26 -0400552 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700553 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
554 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
555 },
556 &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.
557 #
558 # To see the latest fingerprint, make get() request to the instance.
559 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
560 { # A specification of the type and number of accelerator cards attached to the instance.
561 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
562 &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.
563 },
564 ],
565 &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.
566 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
567 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
568 &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.
569 #
570 # To see the latest fingerprint, make get() request to the instance.
571 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
572 &quot;a_key&quot;: &quot;A String&quot;,
573 },
574 &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:
575 # zones/us-central1-f/machineTypes/n1-standard-1
576 #
577 #
578 # 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):
579 # zones/zone/machineTypes/custom-CPUS-MEMORY
580 #
581 #
582 # For example: zones/us-central1-f/machineTypes/custom-4-5120
583 #
584 # For a full list of restrictions, read the Specifications for custom machine types.
585 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
586 &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.
587 #
588 # To see the latest fingerprint, make a get() request to retrieve the resource.
589 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
590 {
591 &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.
592 &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).
593 },
594 ],
595 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
596 },
597 &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;.
598 &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.
599 &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.
600 { # A network interface resource attached to an instance.
601 &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.
602 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
603 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
604 &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.
605 &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.
606 &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.
607 #
608 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
609 #
610 # 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.
611 &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.
612 &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.
613 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
614 },
615 ],
616 &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.
617 { # An alias IP range attached to an instance&#x27;s network interface.
618 &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).
619 &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.
620 },
621 ],
622 &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 -0700623 &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 -0700624 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
625 &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.
626 &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.
627 #
628 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
629 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
630 # - projects/project/global/networks/network
631 # - global/networks/default
632 &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.
633 &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:
634 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
635 # - regions/region/subnetworks/subnetwork
636 },
637 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700638 &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 -0700639 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
640 &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.
641 &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.
642 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
643 &quot;A String&quot;,
644 ],
645 },
646 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
647 &quot;A String&quot;,
648 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700649 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 &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.
651 #
652 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
653 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
654 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
655 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
656 &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.
657 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
658 &quot;A String&quot;,
659 ],
660 },
661 ],
662 &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 -0700663 &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 -0700664 },
665 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
666 &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.
667 #
668 # 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.
669 { # A service account.
670 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
671 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
672 &quot;A String&quot;,
673 ],
674 },
675 ],
676 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
677 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
678 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
679 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
680 },
681 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
682 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
683 },
684 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700685 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
687 &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.
688 &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.
689 #
690 # To see the latest fingerprint, make get() request to the instance.
691 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
692 &quot;A String&quot;,
693 ],
694 },
695 &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 -0400696 },
697 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
699 &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.
700 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
701 # &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 -0400702 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700703 &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).
704 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
John Asmuth614db982014-04-24 15:46:26 -0400705 },
706 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700707 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
John Asmuth614db982014-04-24 15:46:26 -0400708 },
709 },
710 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 &quot;kind&quot;: &quot;compute#instanceAggregatedList&quot;, # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
712 &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.
713 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
714 &quot;warning&quot;: { # [Output Only] Informational warning message.
715 &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.
716 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
717 # &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 -0700718 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &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).
720 &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 -0700721 },
722 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 &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 -0700724 },
John Asmuth614db982014-04-24 15:46:26 -0400725 }</pre>
726</div>
727
728<div class="method">
729 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
730 <pre>Retrieves the next page of results.
731
732Args:
733 previous_request: The request for the previous page. (required)
734 previous_response: The response from the request for the previous page. (required)
735
736Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700737 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400738 page. Returns None if there are no more items in the collection.
739 </pre>
740</div>
741
742<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700743 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400744 <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 -0400745
746Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000747 project: string, Project ID for this request. (required)
748 zone: string, The name of the zone for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800749 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700750 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400751 The object takes the form of:
752
753{ # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 &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).
755 &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.
756 &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.
757 #
758 # 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.
759 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700760 #
761 # 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.
762 #
763 # 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.
764 #
765 # 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.
766 #
767 # 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 -0700768 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
769 &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.
770 &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.
771 &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 -0700772 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
774 &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.
775 { # Guest OS features.
776 &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.
777 },
778 ],
779 &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.
780 &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 +0000781 #
782 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
783 #
784 # 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 -0700785 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
786 &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.
787 &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.
788 &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 +0000789 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
790 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700791 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000792 # 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:
793 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
794 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700795 # - 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 -0700796 &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.
797 &quot;a_key&quot;: &quot;A String&quot;,
798 },
799 &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.
800 &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.
801 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700802 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700803 &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 -0700804 #
805 # 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:
806 # projects/debian-cloud/global/images/family/debian-9
807 #
808 #
809 # Alternatively, use a specific version of a public operating system image:
810 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
811 #
812 #
813 # To create a disk with a custom image that you created, specify the image name in the following format:
814 # global/images/my-custom-image
815 #
816 #
817 # 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:
818 # global/images/family/my-image-family
819 #
820 #
821 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700822 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
823 #
824 # 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.
825 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
826 &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.
827 &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.
828 &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.
829 },
830 &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.
831 #
832 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
833 # global/snapshots/my-backup
834 #
835 #
836 # If the source snapshot is deleted later, this field will not be set.
837 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
838 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
839 &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.
840 &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.
841 &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 -0700842 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700843 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700844 &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.
845 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
846 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
847 &quot;A String&quot;,
848 ],
849 &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.
850 &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
851 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -0700852 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700853 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
854 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700855 },
856 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -0700858 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
860 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 },
862 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700863 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -0700864 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
866 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700867 },
868 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;pk&quot;: { # The Platform Key (PK).
870 &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;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 -0800875 #
876 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
877 #
878 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700879 &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 -0700880}
John Asmuth614db982014-04-24 15:46:26 -0400881
Bu Sun Kim65020912020-05-20 12:08:20 -0700882 forceAttach: boolean, Whether to force attach the disk even if it&#x27;s currently attached to another instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883 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.
884
885For 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.
886
887The 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 -0400888
889Returns:
890 An object of the form:
891
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700892 { # Represents an Operation resource.
893 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700894 # Google Compute Engine has three Operation resources:
895 #
896 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
897 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700898 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
899 #
900 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700901 # - For global operations, use the `globalOperations` resource.
902 # - For regional operations, use the `regionOperations` resource.
903 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700905 # 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 -0700906 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
907 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
908 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
909 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
910 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
911 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400912 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700913 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
914 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
915 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400916 },
917 ],
918 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700919 &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`.
920 &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.
921 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
922 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
923 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
924 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
925 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
926 &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.
927 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
928 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
929 &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.
930 &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`.
931 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
932 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
933 &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.
934 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
935 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
936 {
937 &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.
938 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
939 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
940 {
941 &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).
942 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
943 },
944 ],
945 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
946 },
947 ],
948 &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 -0400949 }</pre>
950</div>
951
952<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700953 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800954 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
John Asmuth614db982014-04-24 15:46:26 -0400955
956Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000957 project: string, Project ID for this request. (required)
958 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400959 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700960 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.
961
962For 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.
963
964The 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 -0400965
966Returns:
967 An object of the form:
968
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700969 { # Represents an Operation resource.
970 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700971 # Google Compute Engine has three Operation resources:
972 #
973 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
974 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
976 #
977 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700978 # - For global operations, use the `globalOperations` resource.
979 # - For regional operations, use the `regionOperations` resource.
980 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700981 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700982 # 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 -0700983 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
984 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
985 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
986 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
987 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
988 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400989 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700990 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
991 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
992 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400993 },
994 ],
995 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700996 &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`.
997 &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.
998 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
999 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1000 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1001 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1002 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1003 &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.
1004 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1005 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1006 &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.
1007 &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`.
1008 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1009 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1010 &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.
1011 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1012 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1013 {
1014 &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.
1015 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1016 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1017 {
1018 &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).
1019 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1020 },
1021 ],
1022 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1023 },
1024 ],
1025 &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 -04001026 }</pre>
1027</div>
1028
1029<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001030 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001031 <pre>Deletes an access config from an instance&#x27;s network interface.
John Asmuth614db982014-04-24 15:46:26 -04001032
1033Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001034 project: string, Project ID for this request. (required)
1035 zone: string, The name of the zone for this request. (required)
1036 instance: string, The instance name for this request. (required)
1037 accessConfig: string, The name of the access config to delete. (required)
1038 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001039 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1040
1041For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1042
1043The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04001044
1045Returns:
1046 An object of the form:
1047
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001048 { # Represents an Operation resource.
1049 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001050 # Google Compute Engine has three Operation resources:
1051 #
1052 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1053 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1055 #
1056 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001057 # - For global operations, use the `globalOperations` resource.
1058 # - For regional operations, use the `regionOperations` resource.
1059 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001060 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001061 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001062 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1063 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1064 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1065 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1066 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1067 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001068 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1070 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1071 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04001072 },
1073 ],
1074 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001075 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1076 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1077 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1078 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1079 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1080 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1081 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1082 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1083 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1084 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1085 &quot;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.
1086 &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`.
1087 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1088 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1089 &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.
1090 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1091 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1092 {
1093 &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.
1094 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1095 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1096 {
1097 &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).
1098 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1099 },
1100 ],
1101 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1102 },
1103 ],
1104 &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 -04001105 }</pre>
1106</div>
1107
1108<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001109 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001110 <pre>Detaches a disk from an instance.
1111
1112Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001113 project: string, Project ID for this request. (required)
1114 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001115 instance: string, Instance name for this request. (required)
1116 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)
1117 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.
1118
1119For 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.
1120
1121The 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 -04001122
1123Returns:
1124 An object of the form:
1125
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001126 { # Represents an Operation resource.
1127 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001128 # Google Compute Engine has three Operation resources:
1129 #
1130 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1131 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001132 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1133 #
1134 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001135 # - For global operations, use the `globalOperations` resource.
1136 # - For regional operations, use the `regionOperations` resource.
1137 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001138 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001139 # 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 -07001140 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1141 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1142 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1143 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1144 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1145 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001146 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001147 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1148 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1149 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04001150 },
1151 ],
1152 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001153 &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`.
1154 &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.
1155 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1156 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1157 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1158 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1159 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1160 &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.
1161 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1162 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1163 &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.
1164 &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`.
1165 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1166 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1167 &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.
1168 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1169 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1170 {
1171 &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.
1172 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1173 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1174 {
1175 &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).
1176 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1177 },
1178 ],
1179 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1180 },
1181 ],
1182 &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 -04001183 }</pre>
1184</div>
1185
1186<div class="method">
1187 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001188 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -04001189
1190Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001191 project: string, Project ID for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001192 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001193 instance: string, Name of the instance resource to return. (required)
1194
1195Returns:
1196 An object of the form:
1197
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001198 { # Represents an Instance resource.
1199 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001200 # 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 -07001201 &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.
1202 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1203 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1204 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1205 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1206 &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 -04001207 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 &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).
1209 &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.
1210 &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.
1211 #
1212 # 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.
1213 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001214 #
1215 # 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.
1216 #
1217 # 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.
1218 #
1219 # 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.
1220 #
1221 # 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 -07001222 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1223 &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.
1224 &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.
1225 &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 -07001226 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001227 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1228 &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.
1229 { # Guest OS features.
1230 &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.
1231 },
1232 ],
1233 &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.
1234 &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 +00001235 #
1236 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1237 #
1238 # 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 -07001239 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1240 &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.
1241 &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.
1242 &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 +00001243 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1244 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001245 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001246 # 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:
1247 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1248 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001249 # - 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 -07001250 &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.
1251 &quot;a_key&quot;: &quot;A String&quot;,
1252 },
1253 &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.
1254 &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.
1255 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001256 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001257 &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 -07001258 #
1259 # 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:
1260 # projects/debian-cloud/global/images/family/debian-9
1261 #
1262 #
1263 # Alternatively, use a specific version of a public operating system image:
1264 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1265 #
1266 #
1267 # To create a disk with a custom image that you created, specify the image name in the following format:
1268 # global/images/my-custom-image
1269 #
1270 #
1271 # 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:
1272 # global/images/family/my-image-family
1273 #
1274 #
1275 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001276 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1277 #
1278 # 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.
1279 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1280 &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.
1281 &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.
1282 &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.
1283 },
1284 &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.
1285 #
1286 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1287 # global/snapshots/my-backup
1288 #
1289 #
1290 # If the source snapshot is deleted later, this field will not be set.
1291 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1292 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1293 &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.
1294 &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.
1295 &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 -07001296 },
John Asmuth614db982014-04-24 15:46:26 -04001297 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001298 &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.
1299 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1300 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1301 &quot;A String&quot;,
1302 ],
1303 &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.
1304 &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
1305 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07001306 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001307 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1308 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001309 },
1310 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001311 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07001312 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001313 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1314 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001315 },
1316 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001317 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07001318 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001319 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1320 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001321 },
1322 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001323 &quot;pk&quot;: { # The Platform Key (PK).
1324 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1325 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001326 },
1327 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001328 &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 -08001329 #
1330 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1331 #
1332 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001333 &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 -07001334 },
John Asmuth614db982014-04-24 15:46:26 -04001335 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001336 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1337 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1338 },
1339 &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.
1340 #
1341 # To see the latest fingerprint, make get() request to the instance.
1342 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1343 { # A specification of the type and number of accelerator cards attached to the instance.
1344 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1345 &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.
1346 },
1347 ],
1348 &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.
1349 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1350 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1351 &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.
1352 #
1353 # To see the latest fingerprint, make get() request to the instance.
1354 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1355 &quot;a_key&quot;: &quot;A String&quot;,
1356 },
1357 &quot;machineType&quot;: &quot;A String&quot;, # Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
1358 # zones/us-central1-f/machineTypes/n1-standard-1
1359 #
1360 #
1361 # To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
1362 # zones/zone/machineTypes/custom-CPUS-MEMORY
1363 #
1364 #
1365 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1366 #
1367 # For a full list of restrictions, read the Specifications for custom machine types.
1368 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1369 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
1370 #
1371 # To see the latest fingerprint, make a get() request to retrieve the resource.
1372 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1373 {
1374 &quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
1375 &quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
1376 },
1377 ],
1378 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1379 },
1380 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: &quot;Intel Haswell&quot; or minCpuPlatform: &quot;Intel Sandy Bridge&quot;.
1381 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1382 &quot;networkInterfaces&quot;: [ # An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance.
1383 { # A network interface resource attached to an instance.
1384 &quot;accessConfigs&quot;: [ # An array of configurations for this interface. Currently, only one access config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access.
1385 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1386 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1387 &quot;name&quot;: &quot;A String&quot;, # The name of this access configuration. The default and recommended name is External NAT, but you can use any arbitrary string, such as My external IP or Network Access.
1388 &quot;natIP&quot;: &quot;A String&quot;, # An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance.
1389 &quot;networkTier&quot;: &quot;A String&quot;, # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1390 #
1391 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1392 #
1393 # If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP.
1394 &quot;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.
1395 &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.
1396 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1397 },
1398 ],
1399 &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.
1400 { # An alias IP range attached to an instance&#x27;s network interface.
1401 &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).
1402 &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.
1403 },
1404 ],
1405 &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 -07001406 &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 -07001407 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1408 &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.
1409 &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.
1410 #
1411 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1412 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1413 # - projects/project/global/networks/network
1414 # - global/networks/default
1415 &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.
1416 &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:
1417 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1418 # - regions/region/subnetworks/subnetwork
1419 },
1420 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001421 &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 -07001422 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1423 &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.
1424 &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.
1425 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1426 &quot;A String&quot;,
1427 ],
1428 },
1429 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
1430 &quot;A String&quot;,
1431 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001432 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001433 &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.
1434 #
1435 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1436 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1437 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1438 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1439 &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.
1440 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1441 &quot;A String&quot;,
1442 ],
1443 },
1444 ],
1445 &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 -07001446 &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 -07001447 },
1448 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1449 &quot;serviceAccounts&quot;: [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
1450 #
1451 # Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information.
1452 { # A service account.
1453 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1454 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1455 &quot;A String&quot;,
1456 ],
1457 },
1458 ],
1459 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1460 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1461 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1462 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1463 },
1464 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
1465 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1466 },
1467 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001468 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07001469 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
1470 &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.
1471 &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.
1472 #
1473 # To see the latest fingerprint, make get() request to the instance.
1474 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1475 &quot;A String&quot;,
1476 ],
1477 },
1478 &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 -07001479 }</pre>
1480</div>
1481
1482<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001483 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001484 <pre>Returns the specified guest attributes entry.
1485
1486Args:
1487 project: string, Project ID for this request. (required)
1488 zone: string, The name of the zone for this request. (required)
1489 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001490 queryPath: string, Specifies the guest attributes path to be queried.
Bu Sun Kim65020912020-05-20 12:08:20 -07001491 variableKey: string, Specifies the key for the guest attributes entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492
1493Returns:
1494 An object of the form:
1495
1496 { # A guest attributes entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001497 &quot;kind&quot;: &quot;compute#guestAttributes&quot;, # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
1498 &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;)
1499 &quot;queryValue&quot;: { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
1500 &quot;items&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001501 { # A guest attributes namespace/key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001502 &quot;key&quot;: &quot;A String&quot;, # Key for the guest attribute entry.
1503 &quot;namespace&quot;: &quot;A String&quot;, # Namespace for the guest attribute entry.
1504 &quot;value&quot;: &quot;A String&quot;, # Value for the guest attribute entry.
John Asmuth614db982014-04-24 15:46:26 -04001505 },
1506 ],
John Asmuth614db982014-04-24 15:46:26 -04001507 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001508 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1509 &quot;variableKey&quot;: &quot;A String&quot;, # The key to search for.
1510 &quot;variableValue&quot;: &quot;A String&quot;, # [Output Only] The value found for the requested key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001511 }</pre>
1512</div>
1513
1514<div class="method">
1515 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
1516 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
1517
1518Args:
1519 project: string, Project ID for this request. (required)
1520 zone: string, The name of the zone for this request. (required)
1521 resource: string, Name or id of the resource for this request. (required)
1522
1523Returns:
1524 An object of the form:
1525
Dan O'Mearadd494642020-05-01 07:42:23 -07001526 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001527 #
1528 #
1529 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001530 # 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 -07001531 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001532 # 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 -07001533 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001534 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001535 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001536 # { &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 -07001537 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001538 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001539 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001540 # 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 -07001541 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001542 # 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 -07001543 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001544 { # 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.
1545 #
1546 # 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.
1547 #
1548 # Example Policy with multiple AuditConfigs:
1549 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001550 # { &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 -07001551 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001552 # 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 -07001553 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001554 { # Provides the configuration for logging a type of permissions. Example:
1555 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001556 # { &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 -07001557 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001558 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1559 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1560 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001561 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001562 &quot;ignoreChildExemptions&quot;: True or False,
1563 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001564 },
1565 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001566 &quot;exemptedMembers&quot;: [
1567 &quot;A String&quot;,
1568 ],
1569 &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 -07001570 },
1571 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001572 &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 -07001573 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001574 &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.
1575 #
1576 # If the condition evaluates to `true`, then this binding applies to the current request.
1577 #
1578 # 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.
1579 #
1580 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1581 #
1582 # Example (Comparison):
1583 #
1584 # 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;
1585 #
1586 # Example (Equality):
1587 #
1588 # 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;
1589 #
1590 # Example (Logic):
1591 #
1592 # 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;
1593 #
1594 # Example (Data Manipulation):
1595 #
1596 # 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;
1597 #
1598 # 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.
1599 &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.
1600 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1601 &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.
1602 &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.
1603 },
1604 &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 -07001605 #
1606 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1607 #
1608 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1609 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001610 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001611 #
1612 #
1613 #
1614 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1615 #
1616 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1617 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001618 # * `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.
1619 #
1620 # * `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.
1621 #
1622 # * `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.
1623 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001624 #
1625 #
1626 # * `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 -07001627 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001628 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001629 &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 -07001630 },
1631 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001632 &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.
1633 #
1634 # **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.
1635 &quot;iamOwned&quot;: True or False,
1636 &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.
1637 { # A rule to be applied in a Policy.
1638 &quot;action&quot;: &quot;A String&quot;, # Required
1639 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1640 { # A condition to be met.
1641 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1642 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1643 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1644 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1645 &quot;values&quot;: [ # The objects of the condition.
1646 &quot;A String&quot;,
1647 ],
1648 },
1649 ],
1650 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1651 &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.
1652 &quot;A String&quot;,
1653 ],
1654 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1655 { # Specifies what kind of log the caller must write
1656 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1657 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1658 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1659 },
1660 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1661 },
1662 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1663 #
1664 # 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.
1665 #
1666 # Field names correspond to IAM request parameters and field values are their respective values.
1667 #
1668 # 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.
1669 #
1670 # 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]}
1671 &quot;customFields&quot;: [ # Custom fields.
1672 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1673 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1674 &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.
1675 },
1676 ],
1677 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1678 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1679 },
1680 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1681 &quot;logMode&quot;: &quot;A String&quot;,
1682 },
1683 },
1684 ],
1685 &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.
1686 &quot;A String&quot;,
1687 ],
1688 &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.
1689 &quot;A String&quot;,
1690 ],
1691 },
1692 ],
1693 &quot;version&quot;: 42, # Specifies the format of the policy.
1694 #
1695 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1696 #
1697 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1698 #
1699 # * 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
1700 #
1701 # **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.
1702 #
1703 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1704 #
1705 # 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 -04001706 }</pre>
1707</div>
1708
1709<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001710 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001711 <pre>Returns the last 1 MB of serial port output from the specified instance.
John Asmuth614db982014-04-24 15:46:26 -04001712
1713Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001714 project: string, Project ID for this request. (required)
1715 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001716 instance: string, Name of the instance scoping this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001717 port: integer, Specifies which COM or serial port to retrieve data from.
Bu Sun Kim65020912020-05-20 12:08:20 -07001718 start: string, Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.
John Asmuth614db982014-04-24 15:46:26 -04001719
1720Returns:
1721 An object of the form:
1722
Bu Sun Kim65020912020-05-20 12:08:20 -07001723 { # An instance&#x27;s serial console output.
1724 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The contents of the console output.
1725 &quot;kind&quot;: &quot;compute#serialPortOutput&quot;, # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
1726 &quot;next&quot;: &quot;A String&quot;, # [Output Only] The position of the next byte of content from the serial console output. Use this value in the next request as the start parameter.
1727 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1728 &quot;start&quot;: &quot;A String&quot;, # The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.
John Asmuth614db982014-04-24 15:46:26 -04001729 }</pre>
1730</div>
1731
1732<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001733 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
1734 <pre>Returns the Shielded Instance Identity of an instance
1735
1736Args:
1737 project: string, Project ID for this request. (required)
1738 zone: string, The name of the zone for this request. (required)
1739 instance: string, Name or id of the instance scoping this request. (required)
1740
1741Returns:
1742 An object of the form:
1743
1744 { # A shielded Instance identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001745 &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.
1746 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
1747 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001748 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001749 &quot;kind&quot;: &quot;compute#shieldedInstanceIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
1750 &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.
1751 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
1752 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001753 },
1754 }</pre>
1755</div>
1756
1757<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001758 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001759 <pre>Creates an instance resource in the specified project using the data included in the request.
1760
1761Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001762 project: string, Project ID for this request. (required)
1763 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001764 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04001765 The object takes the form of:
1766
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001767{ # Represents an Instance resource.
1768 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001769 # 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 -07001770 &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.
1771 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1772 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1773 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1774 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1775 &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 -04001776 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001777 &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).
1778 &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.
1779 &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.
1780 #
1781 # 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.
1782 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001783 #
1784 # 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.
1785 #
1786 # 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.
1787 #
1788 # 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.
1789 #
1790 # 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 -07001791 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1792 &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.
1793 &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.
1794 &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 -07001795 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001796 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1797 &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.
1798 { # Guest OS features.
1799 &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.
1800 },
1801 ],
1802 &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.
1803 &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 +00001804 #
1805 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1806 #
1807 # 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 -07001808 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1809 &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.
1810 &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.
1811 &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 +00001812 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1813 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001814 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001815 # 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:
1816 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1817 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001818 # - 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 -07001819 &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.
1820 &quot;a_key&quot;: &quot;A String&quot;,
1821 },
1822 &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.
1823 &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.
1824 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001825 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001826 &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 -07001827 #
1828 # 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:
1829 # projects/debian-cloud/global/images/family/debian-9
1830 #
1831 #
1832 # Alternatively, use a specific version of a public operating system image:
1833 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1834 #
1835 #
1836 # To create a disk with a custom image that you created, specify the image name in the following format:
1837 # global/images/my-custom-image
1838 #
1839 #
1840 # 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:
1841 # global/images/family/my-image-family
1842 #
1843 #
1844 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001845 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
1846 #
1847 # 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.
1848 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1849 &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.
1850 &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.
1851 &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.
1852 },
1853 &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.
1854 #
1855 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1856 # global/snapshots/my-backup
1857 #
1858 #
1859 # If the source snapshot is deleted later, this field will not be set.
1860 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1861 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1862 &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.
1863 &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.
1864 &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 -07001865 },
John Asmuth614db982014-04-24 15:46:26 -04001866 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001867 &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.
1868 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1869 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1870 &quot;A String&quot;,
1871 ],
1872 &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.
1873 &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
1874 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07001875 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001876 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1877 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001878 },
1879 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001880 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07001881 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001882 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1883 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001884 },
1885 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001886 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07001887 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001888 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1889 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001890 },
1891 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001892 &quot;pk&quot;: { # The Platform Key (PK).
1893 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1894 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001895 },
1896 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001897 &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 -08001898 #
1899 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1900 #
1901 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001902 &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 -07001903 },
John Asmuth614db982014-04-24 15:46:26 -04001904 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001905 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1906 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1907 },
1908 &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.
1909 #
1910 # To see the latest fingerprint, make get() request to the instance.
1911 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1912 { # A specification of the type and number of accelerator cards attached to the instance.
1913 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1914 &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.
1915 },
1916 ],
1917 &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.
1918 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1919 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1920 &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.
1921 #
1922 # To see the latest fingerprint, make get() request to the instance.
1923 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1924 &quot;a_key&quot;: &quot;A String&quot;,
1925 },
1926 &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:
1927 # zones/us-central1-f/machineTypes/n1-standard-1
1928 #
1929 #
1930 # 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):
1931 # zones/zone/machineTypes/custom-CPUS-MEMORY
1932 #
1933 #
1934 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1935 #
1936 # For a full list of restrictions, read the Specifications for custom machine types.
1937 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1938 &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.
1939 #
1940 # To see the latest fingerprint, make a get() request to retrieve the resource.
1941 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1942 {
1943 &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.
1944 &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).
1945 },
1946 ],
1947 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1948 },
1949 &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;.
1950 &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.
1951 &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.
1952 { # A network interface resource attached to an instance.
1953 &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.
1954 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1955 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1956 &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.
1957 &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.
1958 &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.
1959 #
1960 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1961 #
1962 # 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.
1963 &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.
1964 &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.
1965 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1966 },
1967 ],
1968 &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.
1969 { # An alias IP range attached to an instance&#x27;s network interface.
1970 &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).
1971 &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.
1972 },
1973 ],
1974 &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 -07001975 &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 -07001976 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1977 &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.
1978 &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.
1979 #
1980 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1981 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1982 # - projects/project/global/networks/network
1983 # - global/networks/default
1984 &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.
1985 &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:
1986 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1987 # - regions/region/subnetworks/subnetwork
1988 },
1989 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001990 &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 -07001991 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1992 &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.
1993 &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.
1994 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1995 &quot;A String&quot;,
1996 ],
1997 },
1998 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
1999 &quot;A String&quot;,
2000 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002001 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002002 &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.
2003 #
2004 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
2005 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2006 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2007 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2008 &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.
2009 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2010 &quot;A String&quot;,
2011 ],
2012 },
2013 ],
2014 &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 -07002015 &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 -07002016 },
2017 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2018 &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.
2019 #
2020 # 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.
2021 { # A service account.
2022 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2023 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2024 &quot;A String&quot;,
2025 ],
2026 },
2027 ],
2028 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2029 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2030 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2031 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2032 },
2033 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2034 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2035 },
2036 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002037 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07002038 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2039 &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.
2040 &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.
2041 #
2042 # To see the latest fingerprint, make get() request to the instance.
2043 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2044 &quot;A String&quot;,
2045 ],
2046 },
2047 &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 -04002048}
2049
Bu Sun Kim65020912020-05-20 12:08:20 -07002050 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.
2051
2052For 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.
2053
2054The 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 -07002055 sourceInstanceTemplate: string, Specifies instance template to create the instance.
2056
2057This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2058- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
2059- projects/project/global/instanceTemplates/instanceTemplate
2060- global/instanceTemplates/instanceTemplate
John Asmuth614db982014-04-24 15:46:26 -04002061
2062Returns:
2063 An object of the form:
2064
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002065 { # Represents an Operation resource.
2066 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002067 # Google Compute Engine has three Operation resources:
2068 #
2069 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2070 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002071 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2072 #
2073 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002074 # - For global operations, use the `globalOperations` resource.
2075 # - For regional operations, use the `regionOperations` resource.
2076 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002077 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002078 # 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 -07002079 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2080 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2081 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2082 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2083 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2084 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002085 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002086 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2087 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2088 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04002089 },
2090 ],
2091 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002092 &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`.
2093 &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.
2094 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2095 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2096 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2097 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2098 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2099 &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.
2100 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2101 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2102 &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.
2103 &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`.
2104 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2105 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2106 &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.
2107 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2108 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2109 {
2110 &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.
2111 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2112 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2113 {
2114 &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).
2115 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2116 },
2117 ],
2118 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2119 },
2120 ],
2121 &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 -04002122 }</pre>
2123</div>
2124
2125<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002126 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002127 <pre>Retrieves the list of instances contained within the specified zone.
John Asmuth614db982014-04-24 15:46:26 -04002128
2129Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002130 project: string, Project ID for this request. (required)
2131 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002132 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 -07002133
Dan O'Mearadd494642020-05-01 07:42:23 -07002134For 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 -07002135
Dan O'Mearadd494642020-05-01 07:42:23 -07002136You 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 -08002137
Bu Sun Kim65020912020-05-20 12:08:20 -07002138To 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) ```
2139 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`)
2140 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2141
2142You 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.
2143
2144Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2145 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.
John Asmuth614db982014-04-24 15:46:26 -04002146
2147Returns:
2148 An object of the form:
2149
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002150 { # Contains a list of instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002151 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2152 &quot;items&quot;: [ # A list of Instance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002153 { # Represents an Instance resource.
2154 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002155 # 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 -07002156 &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.
2157 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
2158 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2159 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
2160 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2161 &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 -04002162 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002163 &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).
2164 &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.
2165 &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.
2166 #
2167 # 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.
2168 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002169 #
2170 # 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.
2171 #
2172 # 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.
2173 #
2174 # 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.
2175 #
2176 # 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 -07002177 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2178 &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.
2179 &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.
2180 &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 -07002181 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002182 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
2183 &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.
2184 { # Guest OS features.
2185 &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.
2186 },
2187 ],
2188 &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.
2189 &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 +00002190 #
2191 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2192 #
2193 # 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 -07002194 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
2195 &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.
2196 &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.
2197 &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 +00002198 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2199 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002200 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002201 # 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:
2202 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2203 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002204 # - 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 -07002205 &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.
2206 &quot;a_key&quot;: &quot;A String&quot;,
2207 },
2208 &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.
2209 &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.
2210 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002211 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002212 &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 -07002213 #
2214 # 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:
2215 # projects/debian-cloud/global/images/family/debian-9
2216 #
2217 #
2218 # Alternatively, use a specific version of a public operating system image:
2219 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
2220 #
2221 #
2222 # To create a disk with a custom image that you created, specify the image name in the following format:
2223 # global/images/my-custom-image
2224 #
2225 #
2226 # 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:
2227 # global/images/family/my-image-family
2228 #
2229 #
2230 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07002231 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
2232 #
2233 # 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.
2234 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2235 &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.
2236 &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.
2237 &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.
2238 },
2239 &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.
2240 #
2241 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2242 # global/snapshots/my-backup
2243 #
2244 #
2245 # If the source snapshot is deleted later, this field will not be set.
2246 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2247 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2248 &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.
2249 &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.
2250 &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 -07002251 },
John Asmuth614db982014-04-24 15:46:26 -04002252 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002253 &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.
2254 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2255 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
2256 &quot;A String&quot;,
2257 ],
2258 &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.
2259 &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
2260 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07002261 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002262 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2263 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002264 },
2265 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002266 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07002267 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002268 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2269 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002270 },
2271 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002272 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07002273 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002274 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2275 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002276 },
2277 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002278 &quot;pk&quot;: { # The Platform Key (PK).
2279 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2280 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002281 },
2282 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002283 &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 -08002284 #
2285 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2286 #
2287 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002288 &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 -07002289 },
John Asmuth614db982014-04-24 15:46:26 -04002290 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002291 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2292 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
2293 },
2294 &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.
2295 #
2296 # To see the latest fingerprint, make get() request to the instance.
2297 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2298 { # A specification of the type and number of accelerator cards attached to the instance.
2299 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2300 &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.
2301 },
2302 ],
2303 &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.
2304 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2305 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2306 &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.
2307 #
2308 # To see the latest fingerprint, make get() request to the instance.
2309 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2310 &quot;a_key&quot;: &quot;A String&quot;,
2311 },
2312 &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:
2313 # zones/us-central1-f/machineTypes/n1-standard-1
2314 #
2315 #
2316 # 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):
2317 # zones/zone/machineTypes/custom-CPUS-MEMORY
2318 #
2319 #
2320 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2321 #
2322 # For a full list of restrictions, read the Specifications for custom machine types.
2323 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2324 &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.
2325 #
2326 # To see the latest fingerprint, make a get() request to retrieve the resource.
2327 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2328 {
2329 &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.
2330 &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).
2331 },
2332 ],
2333 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2334 },
2335 &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;.
2336 &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.
2337 &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.
2338 { # A network interface resource attached to an instance.
2339 &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.
2340 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2341 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2342 &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.
2343 &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.
2344 &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.
2345 #
2346 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2347 #
2348 # 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.
2349 &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.
2350 &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.
2351 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2352 },
2353 ],
2354 &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.
2355 { # An alias IP range attached to an instance&#x27;s network interface.
2356 &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).
2357 &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.
2358 },
2359 ],
2360 &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 -07002361 &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 -07002362 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2363 &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.
2364 &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.
2365 #
2366 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2367 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2368 # - projects/project/global/networks/network
2369 # - global/networks/default
2370 &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.
2371 &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:
2372 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2373 # - regions/region/subnetworks/subnetwork
2374 },
2375 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002376 &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 -07002377 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2378 &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.
2379 &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.
2380 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2381 &quot;A String&quot;,
2382 ],
2383 },
2384 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2385 &quot;A String&quot;,
2386 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002387 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002388 &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.
2389 #
2390 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
2391 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2392 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2393 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2394 &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.
2395 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2396 &quot;A String&quot;,
2397 ],
2398 },
2399 ],
2400 &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 -07002401 &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 -07002402 },
2403 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2404 &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.
2405 #
2406 # 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.
2407 { # A service account.
2408 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2409 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2410 &quot;A String&quot;,
2411 ],
2412 },
2413 ],
2414 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2415 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2416 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2417 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2418 },
2419 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2420 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2421 },
2422 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002423 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07002424 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2425 &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.
2426 &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.
2427 #
2428 # To see the latest fingerprint, make get() request to the instance.
2429 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2430 &quot;A String&quot;,
2431 ],
2432 },
2433 &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 -04002434 },
2435 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002436 &quot;kind&quot;: &quot;compute#instanceList&quot;, # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
2437 &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.
2438 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2439 &quot;warning&quot;: { # [Output Only] Informational warning message.
2440 &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.
2441 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2442 # &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 -07002443 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002444 &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).
2445 &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 -07002446 },
2447 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002448 &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 -07002449 },
John Asmuth614db982014-04-24 15:46:26 -04002450 }</pre>
2451</div>
2452
2453<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002454 <code class="details" id="listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002455 <pre>Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed instance group, the referrers list includes the managed instance group. For more information, read Viewing Referrers to VM Instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002456
2457Args:
2458 project: string, Project ID for this request. (required)
2459 zone: string, The name of the zone for this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07002460 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 -07002461 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 -07002462
Dan O'Mearadd494642020-05-01 07:42:23 -07002463For 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 -07002464
Dan O'Mearadd494642020-05-01 07:42:23 -07002465You 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 -07002466
Bu Sun Kim65020912020-05-20 12:08:20 -07002467To 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 -07002468 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 -07002469 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2470
2471You 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.
2472
2473Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07002474 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002475
2476Returns:
2477 An object of the form:
2478
2479 { # Contains a list of instance referrers.
Bu Sun Kim65020912020-05-20 12:08:20 -07002480 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2481 &quot;items&quot;: [ # A list of Reference resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002482 { # Represents a reference to a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002483 &quot;kind&quot;: &quot;compute#reference&quot;, # [Output Only] Type of the resource. Always compute#reference for references.
2484 &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 -07002485 # - MEMBER_OF
Bu Sun Kim65020912020-05-20 12:08:20 -07002486 &quot;referrer&quot;: &quot;A String&quot;, # URL of the resource which refers to the target.
2487 &quot;target&quot;: &quot;A String&quot;, # URL of the resource to which this reference points.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002488 },
2489 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002490 &quot;kind&quot;: &quot;compute#instanceListReferrers&quot;, # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
2491 &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.
2492 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2493 &quot;warning&quot;: { # [Output Only] Informational warning message.
2494 &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.
2495 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2496 # &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 -07002497 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002498 &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).
2499 &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 -07002500 },
2501 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002502 &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 -07002503 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002504 }</pre>
2505</div>
2506
2507<div class="method">
2508 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
2509 <pre>Retrieves the next page of results.
2510
2511Args:
2512 previous_request: The request for the previous page. (required)
2513 previous_response: The response from the request for the previous page. (required)
2514
2515Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002516 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002517 page. Returns None if there are no more items in the collection.
2518 </pre>
2519</div>
2520
2521<div class="method">
John Asmuth614db982014-04-24 15:46:26 -04002522 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2523 <pre>Retrieves the next page of results.
2524
2525Args:
2526 previous_request: The request for the previous page. (required)
2527 previous_response: The response from the request for the previous page. (required)
2528
2529Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002530 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04002531 page. Returns None if there are no more items in the collection.
2532 </pre>
2533</div>
2534
2535<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002536 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
2537 <pre>Removes resource policies from an instance.
2538
2539Args:
2540 project: string, Project ID for this request. (required)
2541 zone: string, The name of the zone for this request. (required)
2542 instance: string, The instance name for this request. (required)
2543 body: object, The request body.
2544 The object takes the form of:
2545
2546{
Bu Sun Kim65020912020-05-20 12:08:20 -07002547 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this instance.
2548 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002549 ],
2550 }
2551
2552 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.
2553
2554For 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.
2555
2556The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2557
2558Returns:
2559 An object of the form:
2560
2561 { # Represents an Operation resource.
2562 #
2563 # Google Compute Engine has three Operation resources:
2564 #
2565 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2566 #
2567 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2568 #
2569 # Operations can be global, regional or zonal.
2570 # - For global operations, use the `globalOperations` resource.
2571 # - For regional operations, use the `regionOperations` resource.
2572 # - For zonal operations, use the `zonalOperations` resource.
2573 #
2574 # 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 -07002575 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2576 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2577 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2578 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2579 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2580 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002581 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002582 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2583 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2584 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07002585 },
2586 ],
2587 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002588 &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`.
2589 &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.
2590 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2591 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2592 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2593 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2594 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2595 &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.
2596 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2597 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2598 &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.
2599 &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`.
2600 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2601 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2602 &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.
2603 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2604 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2605 {
2606 &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.
2607 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2608 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2609 {
2610 &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).
2611 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2612 },
2613 ],
2614 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2615 },
2616 ],
2617 &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 -07002618 }</pre>
2619</div>
2620
2621<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002622 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
2623 <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 -04002624
2625Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002626 project: string, Project ID for this request. (required)
2627 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04002628 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002629 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.
2630
2631For 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.
2632
2633The 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 -04002634
2635Returns:
2636 An object of the form:
2637
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002638 { # Represents an Operation resource.
2639 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002640 # Google Compute Engine has three Operation resources:
2641 #
2642 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2643 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002644 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2645 #
2646 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002647 # - For global operations, use the `globalOperations` resource.
2648 # - For regional operations, use the `regionOperations` resource.
2649 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002650 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002651 # 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 -07002652 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2653 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2654 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2655 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2656 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2657 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002658 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002659 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2660 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2661 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04002662 },
2663 ],
2664 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002665 &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`.
2666 &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.
2667 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2668 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2669 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2670 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2671 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2672 &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.
2673 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2674 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2675 &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.
2676 &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`.
2677 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2678 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2679 &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.
2680 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2681 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2682 {
2683 &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.
2684 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2685 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2686 {
2687 &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).
2688 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2689 },
2690 ],
2691 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2692 },
2693 ],
2694 &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 -04002695 }</pre>
2696</div>
2697
2698<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002699 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
2700 <pre>Sets deletion protection on the instance.
2701
2702Args:
2703 project: string, Project ID for this request. (required)
2704 zone: string, The name of the zone for this request. (required)
2705 resource: string, Name or id of the resource for this request. (required)
2706 deletionProtection: boolean, Whether the resource should be protected against deletion.
2707 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.
2708
2709For 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.
2710
2711The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2712
2713Returns:
2714 An object of the form:
2715
2716 { # Represents an Operation resource.
2717 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002718 # Google Compute Engine has three Operation resources:
2719 #
2720 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2721 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002722 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2723 #
2724 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002725 # - For global operations, use the `globalOperations` resource.
2726 # - For regional operations, use the `regionOperations` resource.
2727 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002728 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002729 # 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 -07002730 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2731 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2732 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2733 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2734 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2735 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002736 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002737 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2738 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2739 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002740 },
2741 ],
2742 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002743 &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`.
2744 &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.
2745 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2746 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2747 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2748 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2749 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2750 &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.
2751 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2752 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2753 &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.
2754 &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`.
2755 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2756 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2757 &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.
2758 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2759 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2760 {
2761 &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.
2762 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2763 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2764 {
2765 &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).
2766 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2767 },
2768 ],
2769 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2770 },
2771 ],
2772 &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 -07002773 }</pre>
2774</div>
2775
2776<div class="method">
2777 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002778 <pre>Sets the auto-delete flag for a disk attached to an instance.
John Asmuth614db982014-04-24 15:46:26 -04002779
2780Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002781 project: string, Project ID for this request. (required)
2782 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002783 instance: string, The instance name for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04002784 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002785 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)
2786 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.
2787
2788For 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.
2789
2790The 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 -04002791
2792Returns:
2793 An object of the form:
2794
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002795 { # Represents an Operation resource.
2796 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002797 # Google Compute Engine has three Operation resources:
2798 #
2799 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2800 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002801 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2802 #
2803 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002804 # - For global operations, use the `globalOperations` resource.
2805 # - For regional operations, use the `regionOperations` resource.
2806 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002807 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002808 # 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 -07002809 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2810 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2811 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2812 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2813 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2814 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002815 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002816 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2817 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2818 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04002819 },
2820 ],
2821 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002822 &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`.
2823 &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.
2824 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2825 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2826 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2827 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2828 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2829 &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.
2830 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2831 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2832 &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.
2833 &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`.
2834 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2835 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2836 &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.
2837 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2838 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2839 {
2840 &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.
2841 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2842 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2843 {
2844 &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).
2845 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2846 },
2847 ],
2848 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2849 },
2850 ],
2851 &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 -08002852 }</pre>
2853</div>
2854
2855<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002856 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002857 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
2858
2859Args:
2860 project: string, Project ID for this request. (required)
2861 zone: string, The name of the zone for this request. (required)
2862 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002863 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002864 The object takes the form of:
2865
2866{
Bu Sun Kim65020912020-05-20 12:08:20 -07002867 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
2868 { # Associates `members` with a `role`.
2869 &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.
2870 #
2871 # If the condition evaluates to `true`, then this binding applies to the current request.
2872 #
2873 # 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.
2874 #
2875 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2876 #
2877 # Example (Comparison):
2878 #
2879 # 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;
2880 #
2881 # Example (Equality):
2882 #
2883 # 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;
2884 #
2885 # Example (Logic):
2886 #
2887 # 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;
2888 #
2889 # Example (Data Manipulation):
2890 #
2891 # 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;
2892 #
2893 # 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.
2894 &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.
2895 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2896 &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.
2897 &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.
2898 },
2899 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2900 #
2901 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2902 #
2903 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2904 #
2905 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
2906 #
2907 #
2908 #
2909 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2910 #
2911 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2912 #
2913 # * `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.
2914 #
2915 # * `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.
2916 #
2917 # * `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.
2918 #
2919 #
2920 #
2921 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2922 &quot;A String&quot;,
2923 ],
2924 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2925 },
2926 ],
2927 &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.
2928 &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 -07002929 #
2930 #
2931 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002932 # 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 -07002933 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002934 # 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 -07002935 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002936 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002937 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002938 # { &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 -07002939 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002940 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002941 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002942 # 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 -07002943 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002944 # 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 -07002945 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002946 { # 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.
2947 #
2948 # 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.
2949 #
2950 # Example Policy with multiple AuditConfigs:
2951 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002952 # { &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 -07002953 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002954 # 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 -07002955 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002956 { # Provides the configuration for logging a type of permissions. Example:
2957 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002958 # { &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 -07002959 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002960 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
2961 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2962 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002963 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002964 &quot;ignoreChildExemptions&quot;: True or False,
2965 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002966 },
2967 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002968 &quot;exemptedMembers&quot;: [
2969 &quot;A String&quot;,
2970 ],
2971 &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 -07002972 },
2973 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002974 &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 -07002975 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002976 &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.
2977 #
2978 # If the condition evaluates to `true`, then this binding applies to the current request.
2979 #
2980 # 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.
2981 #
2982 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2983 #
2984 # Example (Comparison):
2985 #
2986 # 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;
2987 #
2988 # Example (Equality):
2989 #
2990 # 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;
2991 #
2992 # Example (Logic):
2993 #
2994 # 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;
2995 #
2996 # Example (Data Manipulation):
2997 #
2998 # 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;
2999 #
3000 # 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.
3001 &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.
3002 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
3003 &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.
3004 &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.
3005 },
3006 &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 -07003007 #
3008 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3009 #
3010 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3011 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003012 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003013 #
3014 #
3015 #
3016 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3017 #
3018 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3019 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003020 # * `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.
3021 #
3022 # * `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.
3023 #
3024 # * `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.
3025 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003026 #
3027 #
3028 # * `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 -07003029 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003030 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003031 &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 -07003032 },
3033 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003034 &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.
3035 #
3036 # **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.
3037 &quot;iamOwned&quot;: True or False,
3038 &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.
3039 { # A rule to be applied in a Policy.
3040 &quot;action&quot;: &quot;A String&quot;, # Required
3041 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3042 { # A condition to be met.
3043 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
3044 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
3045 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
3046 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3047 &quot;values&quot;: [ # The objects of the condition.
3048 &quot;A String&quot;,
3049 ],
3050 },
3051 ],
3052 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
3053 &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.
3054 &quot;A String&quot;,
3055 ],
3056 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3057 { # Specifies what kind of log the caller must write
3058 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
3059 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3060 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
3061 },
3062 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
3063 },
3064 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
3065 #
3066 # 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.
3067 #
3068 # Field names correspond to IAM request parameters and field values are their respective values.
3069 #
3070 # 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.
3071 #
3072 # 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]}
3073 &quot;customFields&quot;: [ # Custom fields.
3074 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3075 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
3076 &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.
3077 },
3078 ],
3079 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
3080 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
3081 },
3082 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
3083 &quot;logMode&quot;: &quot;A String&quot;,
3084 },
3085 },
3086 ],
3087 &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.
3088 &quot;A String&quot;,
3089 ],
3090 &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.
3091 &quot;A String&quot;,
3092 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003093 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003094 ],
3095 &quot;version&quot;: 42, # Specifies the format of the policy.
3096 #
3097 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3098 #
3099 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3100 #
3101 # * 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
3102 #
3103 # **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.
3104 #
3105 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
3106 #
3107 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3108 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003109 }
3110
3111
3112Returns:
3113 An object of the form:
3114
Dan O'Mearadd494642020-05-01 07:42:23 -07003115 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003116 #
3117 #
3118 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003119 # 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 -07003120 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003121 # 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 -07003122 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003123 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003124 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003125 # { &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 -07003126 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003127 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003128 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003129 # 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 -07003130 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003131 # 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 -07003132 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003133 { # 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.
3134 #
3135 # 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.
3136 #
3137 # Example Policy with multiple AuditConfigs:
3138 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003139 # { &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 -07003140 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003141 # 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 -07003142 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003143 { # Provides the configuration for logging a type of permissions. Example:
3144 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003145 # { &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 -07003146 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003147 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
3148 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3149 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003150 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003151 &quot;ignoreChildExemptions&quot;: True or False,
3152 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003153 },
3154 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003155 &quot;exemptedMembers&quot;: [
3156 &quot;A String&quot;,
3157 ],
3158 &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 -07003159 },
3160 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003161 &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 -07003162 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003163 &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.
3164 #
3165 # If the condition evaluates to `true`, then this binding applies to the current request.
3166 #
3167 # 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.
3168 #
3169 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3170 #
3171 # Example (Comparison):
3172 #
3173 # 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;
3174 #
3175 # Example (Equality):
3176 #
3177 # 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;
3178 #
3179 # Example (Logic):
3180 #
3181 # 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;
3182 #
3183 # Example (Data Manipulation):
3184 #
3185 # 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;
3186 #
3187 # 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.
3188 &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.
3189 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
3190 &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.
3191 &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.
3192 },
3193 &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 -07003194 #
3195 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3196 #
3197 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3198 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003199 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003200 #
3201 #
3202 #
3203 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3204 #
3205 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3206 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003207 # * `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.
3208 #
3209 # * `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.
3210 #
3211 # * `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.
3212 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003213 #
3214 #
3215 # * `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 -07003216 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003217 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003218 &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 -07003219 },
3220 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003221 &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.
3222 #
3223 # **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.
3224 &quot;iamOwned&quot;: True or False,
3225 &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.
3226 { # A rule to be applied in a Policy.
3227 &quot;action&quot;: &quot;A String&quot;, # Required
3228 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3229 { # A condition to be met.
3230 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
3231 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
3232 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
3233 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3234 &quot;values&quot;: [ # The objects of the condition.
3235 &quot;A String&quot;,
3236 ],
3237 },
3238 ],
3239 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
3240 &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.
3241 &quot;A String&quot;,
3242 ],
3243 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3244 { # Specifies what kind of log the caller must write
3245 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
3246 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3247 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
3248 },
3249 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
3250 },
3251 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
3252 #
3253 # 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.
3254 #
3255 # Field names correspond to IAM request parameters and field values are their respective values.
3256 #
3257 # 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.
3258 #
3259 # 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]}
3260 &quot;customFields&quot;: [ # Custom fields.
3261 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3262 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
3263 &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.
3264 },
3265 ],
3266 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
3267 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
3268 },
3269 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
3270 &quot;logMode&quot;: &quot;A String&quot;,
3271 },
3272 },
3273 ],
3274 &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.
3275 &quot;A String&quot;,
3276 ],
3277 &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.
3278 &quot;A String&quot;,
3279 ],
3280 },
3281 ],
3282 &quot;version&quot;: 42, # Specifies the format of the policy.
3283 #
3284 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3285 #
3286 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3287 #
3288 # * 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
3289 #
3290 # **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.
3291 #
3292 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
3293 #
3294 # 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 -07003295 }</pre>
3296</div>
3297
3298<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003299 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003300 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003301
3302Args:
3303 project: string, Project ID for this request. (required)
3304 zone: string, The name of the zone for this request. (required)
3305 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003306 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003307 The object takes the form of:
3308
3309{
Bu Sun Kim65020912020-05-20 12:08:20 -07003310 &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.
3311 &quot;labels&quot;: {
3312 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003313 },
3314 }
3315
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003316 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.
3317
3318For 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.
3319
3320The 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 -04003321
3322Returns:
3323 An object of the form:
3324
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003325 { # Represents an Operation resource.
3326 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003327 # Google Compute Engine has three Operation resources:
3328 #
3329 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3330 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003331 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3332 #
3333 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003334 # - For global operations, use the `globalOperations` resource.
3335 # - For regional operations, use the `regionOperations` resource.
3336 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003337 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003338 # 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 -07003339 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3340 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3341 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3342 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3343 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3344 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003345 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003346 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3347 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3348 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003349 },
3350 ],
3351 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003352 &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`.
3353 &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.
3354 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3355 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3356 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3357 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3358 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3359 &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.
3360 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3361 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3362 &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.
3363 &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`.
3364 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3365 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3366 &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.
3367 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3368 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3369 {
3370 &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.
3371 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3372 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3373 {
3374 &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).
3375 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3376 },
3377 ],
3378 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3379 },
3380 ],
3381 &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 -04003382 }</pre>
3383</div>
3384
3385<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003386 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003387 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
3388
3389Args:
3390 project: string, Project ID for this request. (required)
3391 zone: string, The name of the zone for this request. (required)
3392 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003393 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003394 The object takes the form of:
3395
3396{
Bu Sun Kim65020912020-05-20 12:08:20 -07003397 &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 -07003398 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003399 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
3400 &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 -07003401 },
3402 ],
3403 }
3404
3405 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.
3406
3407For 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.
3408
3409The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3410
3411Returns:
3412 An object of the form:
3413
3414 { # Represents an Operation resource.
3415 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003416 # Google Compute Engine has three Operation resources:
3417 #
3418 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3419 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003420 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3421 #
3422 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003423 # - For global operations, use the `globalOperations` resource.
3424 # - For regional operations, use the `regionOperations` resource.
3425 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003426 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003427 # 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 -07003428 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3429 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3430 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3431 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3432 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3433 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003434 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003435 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3436 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3437 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003438 },
3439 ],
3440 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003441 &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`.
3442 &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.
3443 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3444 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3445 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3446 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3447 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3448 &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.
3449 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3450 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3451 &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.
3452 &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`.
3453 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3454 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3455 &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.
3456 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3457 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3458 {
3459 &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.
3460 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3461 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3462 {
3463 &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).
3464 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3465 },
3466 ],
3467 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3468 },
3469 ],
3470 &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 -07003471 }</pre>
3472</div>
3473
3474<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003475 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003476 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
3477
3478Args:
3479 project: string, Project ID for this request. (required)
3480 zone: string, The name of the zone for this request. (required)
3481 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003482 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003483 The object takes the form of:
3484
3485{
Bu Sun Kim65020912020-05-20 12:08:20 -07003486 &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 -08003487 }
3488
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003489 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.
3490
3491For 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.
3492
3493The 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 -08003494
3495Returns:
3496 An object of the form:
3497
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003498 { # Represents an Operation resource.
3499 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003500 # Google Compute Engine has three Operation resources:
3501 #
3502 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3503 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003504 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3505 #
3506 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003507 # - For global operations, use the `globalOperations` resource.
3508 # - For regional operations, use the `regionOperations` resource.
3509 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003510 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003511 # 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 -07003512 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3513 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3514 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3515 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3516 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3517 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003518 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003519 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3520 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3521 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003522 },
3523 ],
3524 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003525 &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`.
3526 &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.
3527 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3528 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3529 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3530 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3531 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3532 &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.
3533 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3534 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3535 &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.
3536 &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`.
3537 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3538 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3539 &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.
3540 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3541 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3542 {
3543 &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.
3544 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3545 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3546 {
3547 &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).
3548 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3549 },
3550 ],
3551 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3552 },
3553 ],
3554 &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 -04003555 }</pre>
3556</div>
3557
3558<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003559 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003560 <pre>Sets metadata for the specified instance to the data included in the request.
3561
3562Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003563 project: string, Project ID for this request. (required)
3564 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04003565 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003566 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04003567 The object takes the form of:
3568
3569{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07003570 &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 -07003571 #
3572 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003573 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3574 {
3575 &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.
3576 &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).
3577 },
3578 ],
3579 &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 -04003580}
3581
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003582 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.
3583
3584For 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.
3585
3586The 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 -04003587
3588Returns:
3589 An object of the form:
3590
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003591 { # Represents an Operation resource.
3592 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003593 # Google Compute Engine has three Operation resources:
3594 #
3595 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3596 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003597 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3598 #
3599 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003600 # - For global operations, use the `globalOperations` resource.
3601 # - For regional operations, use the `regionOperations` resource.
3602 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003603 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003604 # 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 -07003605 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3606 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3607 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3608 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3609 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3610 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003611 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003612 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3613 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3614 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04003615 },
3616 ],
3617 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003618 &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`.
3619 &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.
3620 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3621 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3622 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3623 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3624 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3625 &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.
3626 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3627 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3628 &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.
3629 &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`.
3630 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3631 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3632 &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.
3633 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3634 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3635 {
3636 &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.
3637 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3638 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3639 {
3640 &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).
3641 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3642 },
3643 ],
3644 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3645 },
3646 ],
3647 &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 -04003648 }</pre>
3649</div>
3650
3651<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003652 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003653 <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.
3654
3655Args:
3656 project: string, Project ID for this request. (required)
3657 zone: string, The name of the zone for this request. (required)
3658 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003659 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003660 The object takes the form of:
3661
3662{
Bu Sun Kim65020912020-05-20 12:08:20 -07003663 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform this instance should be started at.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003664 }
3665
3666 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.
3667
3668For 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.
3669
3670The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3671
3672Returns:
3673 An object of the form:
3674
3675 { # Represents an Operation resource.
3676 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003677 # Google Compute Engine has three Operation resources:
3678 #
3679 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3680 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003681 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3682 #
3683 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003684 # - For global operations, use the `globalOperations` resource.
3685 # - For regional operations, use the `regionOperations` resource.
3686 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003687 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003688 # 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 -07003689 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3690 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3691 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3692 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3693 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3694 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003695 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003696 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3697 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3698 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003699 },
3700 ],
3701 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003702 &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`.
3703 &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.
3704 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3705 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3706 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3707 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3708 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3709 &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.
3710 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3711 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3712 &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.
3713 &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`.
3714 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3715 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3716 &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.
3717 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3718 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3719 {
3720 &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.
3721 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3722 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3723 {
3724 &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).
3725 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3726 },
3727 ],
3728 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3729 },
3730 ],
3731 &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 -07003732 }</pre>
3733</div>
3734
3735<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003736 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003737 <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 -04003738
3739Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003740 project: string, Project ID for this request. (required)
3741 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003742 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003743 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04003744 The object takes the form of:
3745
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003746{ # Sets the scheduling options for an Instance. NextID: 12
Bu Sun Kim65020912020-05-20 12:08:20 -07003747 &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 -04003748 #
3749 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Bu Sun Kim65020912020-05-20 12:08:20 -07003750 &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 -07003751 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Bu Sun Kim65020912020-05-20 12:08:20 -07003752 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3753 &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.
3754 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
3755 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003756 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003757 },
3758 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003759 &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 -07003760 &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 -04003761}
3762
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003763 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.
3764
3765For 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.
3766
3767The 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 -04003768
3769Returns:
3770 An object of the form:
3771
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003772 { # Represents an Operation resource.
3773 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003774 # Google Compute Engine has three Operation resources:
3775 #
3776 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3777 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003778 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3779 #
3780 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003781 # - For global operations, use the `globalOperations` resource.
3782 # - For regional operations, use the `regionOperations` resource.
3783 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003784 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003785 # 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 -07003786 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3787 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3788 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3789 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3790 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3791 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003792 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003793 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3794 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3795 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003796 },
3797 ],
3798 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003799 &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`.
3800 &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.
3801 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3802 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3803 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3804 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3805 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3806 &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.
3807 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3808 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3809 &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.
3810 &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`.
3811 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3812 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3813 &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.
3814 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3815 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3816 {
3817 &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.
3818 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3819 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3820 {
3821 &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).
3822 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3823 },
3824 ],
3825 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3826 },
3827 ],
3828 &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 -04003829 }</pre>
3830</div>
3831
3832<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003833 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003834 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
3835
3836Args:
3837 project: string, Project ID for this request. (required)
3838 zone: string, The name of the zone for this request. (required)
3839 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003840 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003841 The object takes the form of:
3842
3843{
Bu Sun Kim65020912020-05-20 12:08:20 -07003844 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
3845 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
3846 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003847 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003848 }
3849
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003850 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.
3851
3852For 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.
3853
3854The 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 -04003855
3856Returns:
3857 An object of the form:
3858
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003859 { # Represents an Operation resource.
3860 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003861 # Google Compute Engine has three Operation resources:
3862 #
3863 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3864 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003865 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3866 #
3867 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003868 # - For global operations, use the `globalOperations` resource.
3869 # - For regional operations, use the `regionOperations` resource.
3870 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003871 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003872 # 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 -07003873 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3874 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3875 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3876 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3877 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3878 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003879 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003880 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3881 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3882 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04003883 },
3884 ],
3885 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003886 &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`.
3887 &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.
3888 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3889 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3890 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3891 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3892 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3893 &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.
3894 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3895 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3896 &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.
3897 &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`.
3898 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3899 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3900 &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.
3901 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3902 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3903 {
3904 &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.
3905 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3906 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3907 {
3908 &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).
3909 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3910 },
3911 ],
3912 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3913 },
3914 ],
3915 &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 -04003916 }</pre>
3917</div>
3918
3919<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003920 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003921 <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.
3922
3923Args:
3924 project: string, Project ID for this request. (required)
3925 zone: string, The name of the zone for this request. (required)
3926 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003927 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003928 The object takes the form of:
3929
3930{ # The policy describes the baseline against which Instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07003931 &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 -07003932}
John Asmuth614db982014-04-24 15:46:26 -04003933
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003934 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.
3935
3936For 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.
3937
3938The 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 -04003939
3940Returns:
3941 An object of the form:
3942
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003943 { # Represents an Operation resource.
3944 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003945 # Google Compute Engine has three Operation resources:
3946 #
3947 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3948 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003949 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3950 #
3951 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003952 # - For global operations, use the `globalOperations` resource.
3953 # - For regional operations, use the `regionOperations` resource.
3954 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003955 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003956 # 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 -07003957 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3958 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3959 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3960 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3961 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3962 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003963 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003964 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3965 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3966 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04003967 },
3968 ],
3969 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003970 &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`.
3971 &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.
3972 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3973 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3974 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3975 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3976 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3977 &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.
3978 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3979 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3980 &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.
3981 &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`.
3982 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3983 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3984 &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.
3985 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3986 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3987 {
3988 &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.
3989 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3990 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3991 {
3992 &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).
3993 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3994 },
3995 ],
3996 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3997 },
3998 ],
3999 &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.
4000 }</pre>
4001</div>
4002
4003<div class="method">
4004 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
4005 <pre>Sets network tags for the specified instance to the data included in the request.
4006
4007Args:
4008 project: string, Project ID for this request. (required)
4009 zone: string, The name of the zone for this request. (required)
4010 instance: string, Name of the instance scoping this request. (required)
4011 body: object, The request body.
4012 The object takes the form of:
4013
4014{ # A set of instance tags.
4015 &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.
4016 #
4017 # To see the latest fingerprint, make get() request to the instance.
4018 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4019 &quot;A String&quot;,
4020 ],
4021}
4022
4023 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.
4024
4025For 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.
4026
4027The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4028
4029Returns:
4030 An object of the form:
4031
4032 { # Represents an Operation resource.
4033 #
4034 # Google Compute Engine has three Operation resources:
4035 #
4036 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4037 #
4038 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4039 #
4040 # Operations can be global, regional or zonal.
4041 # - For global operations, use the `globalOperations` resource.
4042 # - For regional operations, use the `regionOperations` resource.
4043 # - For zonal operations, use the `zonalOperations` resource.
4044 #
4045 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4046 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4047 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4048 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4049 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4050 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4051 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
4052 {
4053 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4054 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4055 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4056 },
4057 ],
4058 },
4059 &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`.
4060 &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.
4061 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4062 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4063 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4064 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4065 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4066 &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.
4067 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4068 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4069 &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.
4070 &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`.
4071 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4072 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4073 &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.
4074 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4075 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4076 {
4077 &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.
4078 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4079 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4080 {
4081 &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).
4082 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4083 },
4084 ],
4085 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4086 },
4087 ],
4088 &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 -08004089 }</pre>
4090</div>
4091
4092<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004093 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
4094 <pre>Simulates a maintenance event on the instance.
4095
4096Args:
4097 project: string, Project ID for this request. (required)
4098 zone: string, The name of the zone for this request. (required)
4099 instance: string, Name of the instance scoping this request. (required)
4100
4101Returns:
4102 An object of the form:
4103
4104 { # Represents an Operation resource.
4105 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004106 # Google Compute Engine has three Operation resources:
4107 #
4108 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4109 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004110 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4111 #
4112 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004113 # - For global operations, use the `globalOperations` resource.
4114 # - For regional operations, use the `regionOperations` resource.
4115 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004116 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004117 # 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 -07004118 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4119 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4120 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4121 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4122 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4123 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004124 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004125 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4126 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4127 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004128 },
4129 ],
4130 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004131 &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`.
4132 &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.
4133 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4134 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4135 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4136 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4137 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4138 &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.
4139 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4140 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4141 &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.
4142 &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`.
4143 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4144 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4145 &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.
4146 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4147 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4148 {
4149 &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.
4150 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4151 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4152 {
4153 &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).
4154 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4155 },
4156 ],
4157 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4158 },
4159 ],
4160 &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 -07004161 }</pre>
4162</div>
4163
4164<div class="method">
4165 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
4166 <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 -08004167
4168Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004169 project: string, Project ID for this request. (required)
4170 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08004171 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004172 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.
4173
4174For 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.
4175
4176The 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 -08004177
4178Returns:
4179 An object of the form:
4180
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004181 { # Represents an Operation resource.
4182 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004183 # Google Compute Engine has three Operation resources:
4184 #
4185 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4186 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004187 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4188 #
4189 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004190 # - For global operations, use the `globalOperations` resource.
4191 # - For regional operations, use the `regionOperations` resource.
4192 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004193 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004194 # 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 -07004195 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4196 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4197 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4198 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4199 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4200 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citroe633be12015-03-02 13:40:36 -08004201 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004202 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4203 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4204 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citroe633be12015-03-02 13:40:36 -08004205 },
4206 ],
4207 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004208 &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`.
4209 &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.
4210 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4211 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4212 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4213 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4214 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4215 &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.
4216 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4217 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4218 &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.
4219 &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`.
4220 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4221 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4222 &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.
4223 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4224 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4225 {
4226 &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.
4227 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4228 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4229 {
4230 &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).
4231 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4232 },
4233 ],
4234 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4235 },
4236 ],
4237 &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 -08004238 }</pre>
4239</div>
4240
4241<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004242 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004243 <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 -07004244
4245Args:
4246 project: string, Project ID for this request. (required)
4247 zone: string, The name of the zone for this request. (required)
4248 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004249 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004250 The object takes the form of:
4251
4252{
Bu Sun Kim65020912020-05-20 12:08:20 -07004253 &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 -07004254 #
4255 # In order to start the instance, the disk url and its corresponding key must be provided.
4256 #
4257 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
4258 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004259 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
4260 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4261 &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.
4262 &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.
4263 &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 -07004264 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004265 &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 -07004266 },
4267 ],
4268 }
4269
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004270 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.
4271
4272For 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.
4273
4274The 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 -07004275
4276Returns:
4277 An object of the form:
4278
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004279 { # Represents an Operation resource.
4280 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004281 # Google Compute Engine has three Operation resources:
4282 #
4283 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4284 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004285 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4286 #
4287 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004288 # - For global operations, use the `globalOperations` resource.
4289 # - For regional operations, use the `regionOperations` resource.
4290 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004291 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004292 # 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 -07004293 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4294 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4295 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4296 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4297 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4298 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004299 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004300 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4301 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4302 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004303 },
4304 ],
4305 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004306 &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`.
4307 &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.
4308 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4309 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4310 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4311 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4312 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4313 &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.
4314 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4315 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4316 &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.
4317 &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`.
4318 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4319 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4320 &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.
4321 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4322 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4323 {
4324 &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.
4325 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4326 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4327 {
4328 &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).
4329 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4330 },
4331 ],
4332 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4333 },
4334 ],
4335 &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 -07004336 }</pre>
4337</div>
4338
4339<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004340 <code class="details" id="stop">stop(project, zone, instance, requestId=None)</code>
4341 <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 -08004342
4343Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004344 project: string, Project ID for this request. (required)
4345 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004346 instance: string, Name of the instance resource to stop. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004347 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.
4348
4349For 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.
4350
4351The 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 -08004352
4353Returns:
4354 An object of the form:
4355
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004356 { # Represents an Operation resource.
4357 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004358 # Google Compute Engine has three Operation resources:
4359 #
4360 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4361 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004362 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4363 #
4364 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004365 # - For global operations, use the `globalOperations` resource.
4366 # - For regional operations, use the `regionOperations` resource.
4367 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004368 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004369 # 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 -07004370 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4371 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4372 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4373 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4374 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4375 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004376 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004377 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4378 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4379 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004380 },
4381 ],
4382 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004383 &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`.
4384 &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.
4385 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4386 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4387 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4388 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4389 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4390 &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.
4391 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4392 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4393 &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.
4394 &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`.
4395 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4396 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4397 &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.
4398 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4399 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4400 {
4401 &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.
4402 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4403 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4404 {
4405 &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).
4406 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4407 },
4408 ],
4409 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4410 },
4411 ],
4412 &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 -07004413 }</pre>
4414</div>
4415
4416<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004417 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004418 <pre>Returns permissions that a caller has on the specified resource.
4419
4420Args:
4421 project: string, Project ID for this request. (required)
4422 zone: string, The name of the zone for this request. (required)
4423 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004424 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004425 The object takes the form of:
4426
4427{
Bu Sun Kim65020912020-05-20 12:08:20 -07004428 &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.
4429 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004430 ],
4431 }
4432
4433
4434Returns:
4435 An object of the form:
4436
4437 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004438 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
4439 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004440 ],
4441 }</pre>
4442</div>
4443
4444<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07004445 <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 -07004446 <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.
4447
4448Args:
4449 project: string, Project ID for this request. (required)
4450 zone: string, The name of the zone for this request. (required)
4451 instance: string, Name of the instance resource to update. (required)
4452 body: object, The request body.
4453 The object takes the form of:
4454
4455{ # Represents an Instance resource.
4456 #
4457 # 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 -07004458 &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.
4459 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
4460 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4461 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
4462 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4463 &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 -07004464 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004465 &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).
4466 &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.
4467 &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.
4468 #
4469 # 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.
4470 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
Dan O'Mearadd494642020-05-01 07:42:23 -07004471 #
4472 # 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.
4473 #
4474 # 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.
4475 #
4476 # 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.
4477 #
4478 # 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 -07004479 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4480 &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.
4481 &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.
4482 &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 -07004483 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004484 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
4485 &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.
4486 { # Guest OS features.
4487 &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.
4488 },
4489 ],
4490 &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.
4491 &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 -07004492 #
4493 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
4494 #
4495 # 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 -07004496 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
4497 &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.
4498 &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.
4499 &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 -07004500 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
4501 #
4502 #
4503 # 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:
4504 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
4505 # - projects/project/zones/zone/diskTypes/diskType
4506 # - 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 -07004507 &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.
4508 &quot;a_key&quot;: &quot;A String&quot;,
4509 },
4510 &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.
4511 &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.
4512 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07004513 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004514 &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 -07004515 #
4516 # 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:
4517 # projects/debian-cloud/global/images/family/debian-9
4518 #
4519 #
4520 # Alternatively, use a specific version of a public operating system image:
4521 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
4522 #
4523 #
4524 # To create a disk with a custom image that you created, specify the image name in the following format:
4525 # global/images/my-custom-image
4526 #
4527 #
4528 # 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:
4529 # global/images/family/my-image-family
4530 #
4531 #
4532 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07004533 &quot;sourceImageEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
4534 #
4535 # 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.
4536 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4537 &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.
4538 &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.
4539 &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.
4540 },
4541 &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.
4542 #
4543 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
4544 # global/snapshots/my-backup
4545 #
4546 #
4547 # If the source snapshot is deleted later, this field will not be set.
4548 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
4549 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4550 &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.
4551 &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.
4552 &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 -07004553 },
4554 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004555 &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.
4556 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
4557 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
4558 &quot;A String&quot;,
4559 ],
4560 &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.
4561 &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
4562 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07004563 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004564 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4565 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004566 },
4567 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004568 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07004569 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004570 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4571 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004572 },
4573 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004574 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07004575 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004576 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4577 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004578 },
4579 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004580 &quot;pk&quot;: { # The Platform Key (PK).
4581 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4582 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004583 },
4584 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004585 &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 -07004586 #
4587 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
4588 #
4589 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07004590 &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 -07004591 },
4592 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004593 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
4594 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
4595 },
4596 &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.
4597 #
4598 # To see the latest fingerprint, make get() request to the instance.
4599 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
4600 { # A specification of the type and number of accelerator cards attached to the instance.
4601 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
4602 &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.
4603 },
4604 ],
4605 &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.
4606 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4607 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
4608 &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.
4609 #
4610 # To see the latest fingerprint, make get() request to the instance.
4611 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
4612 &quot;a_key&quot;: &quot;A String&quot;,
4613 },
4614 &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:
4615 # zones/us-central1-f/machineTypes/n1-standard-1
4616 #
4617 #
4618 # 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):
4619 # zones/zone/machineTypes/custom-CPUS-MEMORY
4620 #
4621 #
4622 # For example: zones/us-central1-f/machineTypes/custom-4-5120
4623 #
4624 # For a full list of restrictions, read the Specifications for custom machine types.
4625 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
4626 &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.
4627 #
4628 # To see the latest fingerprint, make a get() request to retrieve the resource.
4629 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4630 {
4631 &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.
4632 &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).
4633 },
4634 ],
4635 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
4636 },
4637 &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;.
4638 &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.
4639 &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.
4640 { # A network interface resource attached to an instance.
4641 &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.
4642 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
4643 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4644 &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.
4645 &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.
4646 &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.
4647 #
4648 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4649 #
4650 # 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.
4651 &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.
4652 &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.
4653 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
4654 },
4655 ],
4656 &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.
4657 { # An alias IP range attached to an instance&#x27;s network interface.
4658 &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).
4659 &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.
4660 },
4661 ],
4662 &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 -07004663 &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 -07004664 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
4665 &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.
4666 &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.
4667 #
4668 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
4669 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
4670 # - projects/project/global/networks/network
4671 # - global/networks/default
4672 &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.
4673 &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:
4674 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
4675 # - regions/region/subnetworks/subnetwork
4676 },
4677 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004678 &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 -07004679 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
4680 &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.
4681 &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.
4682 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
4683 &quot;A String&quot;,
4684 ],
4685 },
4686 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
4687 &quot;A String&quot;,
4688 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004689 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 12 # Sets the scheduling options for this instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07004690 &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.
4691 #
4692 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
4693 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
4694 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
4695 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
4696 &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.
4697 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
4698 &quot;A String&quot;,
4699 ],
4700 },
4701 ],
4702 &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 -07004703 &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 -07004704 },
4705 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
4706 &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.
4707 #
4708 # 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.
4709 { # A service account.
4710 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
4711 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
4712 &quot;A String&quot;,
4713 ],
4714 },
4715 ],
4716 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
4717 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
4718 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
4719 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
4720 },
4721 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
4722 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
4723 },
4724 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004725 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED.
Bu Sun Kim65020912020-05-20 12:08:20 -07004726 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
4727 &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.
4728 &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.
4729 #
4730 # To see the latest fingerprint, make get() request to the instance.
4731 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4732 &quot;A String&quot;,
4733 ],
4734 },
4735 &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 -07004736}
4737
4738 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.
4739 Allowed values
4740 INVALID -
4741 NO_EFFECT -
4742 REFRESH -
4743 RESTART -
Bu Sun Kim65020912020-05-20 12:08:20 -07004744 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.
4745 Allowed values
4746 INVALID -
4747 NO_EFFECT -
4748 REFRESH -
4749 RESTART -
Dan O'Mearadd494642020-05-01 07:42:23 -07004750 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.
4751
4752For 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.
4753
4754The 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 -07004755
4756Returns:
4757 An object of the form:
4758
4759 { # Represents an Operation resource.
4760 #
4761 # Google Compute Engine has three Operation resources:
4762 #
4763 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4764 #
4765 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4766 #
4767 # Operations can be global, regional or zonal.
4768 # - For global operations, use the `globalOperations` resource.
4769 # - For regional operations, use the `regionOperations` resource.
4770 # - For zonal operations, use the `zonalOperations` resource.
4771 #
4772 # 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 -07004773 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4774 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4775 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4776 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4777 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4778 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004779 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004780 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4781 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4782 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07004783 },
4784 ],
4785 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004786 &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`.
4787 &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.
4788 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4789 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4790 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4791 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4792 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4793 &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.
4794 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4795 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4796 &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.
4797 &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`.
4798 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4799 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4800 &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.
4801 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4802 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4803 {
4804 &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.
4805 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4806 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4807 {
4808 &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).
4809 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4810 },
4811 ],
4812 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4813 },
4814 ],
4815 &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 -07004816 }</pre>
4817</div>
4818
4819<div class="method">
4820 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07004821 <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 -07004822
4823Args:
4824 project: string, Project ID for this request. (required)
4825 zone: string, The name of the zone for this request. (required)
4826 instance: string, The instance name for this request. (required)
4827 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004828 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004829 The object takes the form of:
4830
Bu Sun Kim65020912020-05-20 12:08:20 -07004831{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
4832 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4833 &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.
4834 &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.
4835 &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 -07004836 #
4837 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4838 #
4839 # 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 -07004840 &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.
4841 &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.
4842 &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 -07004843}
4844
4845 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.
4846
4847For 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.
4848
4849The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4850
4851Returns:
4852 An object of the form:
4853
4854 { # Represents an Operation resource.
4855 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004856 # Google Compute Engine has three Operation resources:
4857 #
4858 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4859 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004860 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4861 #
4862 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004863 # - For global operations, use the `globalOperations` resource.
4864 # - For regional operations, use the `regionOperations` resource.
4865 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004866 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004867 # 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 -07004868 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4869 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4870 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4871 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4872 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4873 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004874 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004875 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4876 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4877 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004878 },
4879 ],
4880 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004881 &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`.
4882 &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.
4883 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4884 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4885 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4886 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4887 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4888 &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.
4889 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4890 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4891 &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.
4892 &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`.
4893 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4894 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4895 &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.
4896 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4897 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4898 {
4899 &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.
4900 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4901 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4902 {
4903 &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).
4904 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4905 },
4906 ],
4907 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4908 },
4909 ],
4910 &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 -07004911 }</pre>
4912</div>
4913
4914<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004915 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
4916 <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.
4917
4918Args:
4919 project: string, Project ID for this request. (required)
4920 zone: string, The name of the zone for this request. (required)
4921 instance: string, Name of the instance scoping this request. (required)
4922 body: object, The request body.
4923 The object takes the form of:
4924
4925{ # A set of Display Device options
Bu Sun Kim65020912020-05-20 12:08:20 -07004926 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07004927}
4928
4929 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.
4930
4931For 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.
4932
4933The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4934
4935Returns:
4936 An object of the form:
4937
4938 { # Represents an Operation resource.
4939 #
4940 # Google Compute Engine has three Operation resources:
4941 #
4942 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4943 #
4944 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4945 #
4946 # Operations can be global, regional or zonal.
4947 # - For global operations, use the `globalOperations` resource.
4948 # - For regional operations, use the `regionOperations` resource.
4949 # - For zonal operations, use the `zonalOperations` resource.
4950 #
4951 # 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 -07004952 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4953 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4954 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4955 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4956 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4957 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004958 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004959 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4960 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4961 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07004962 },
4963 ],
4964 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004965 &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`.
4966 &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.
4967 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4968 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4969 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4970 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4971 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4972 &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.
4973 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4974 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4975 &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.
4976 &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`.
4977 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4978 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4979 &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.
4980 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4981 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4982 {
4983 &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.
4984 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4985 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4986 {
4987 &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).
4988 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4989 },
4990 ],
4991 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4992 },
4993 ],
4994 &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 -07004995 }</pre>
4996</div>
4997
4998<div class="method">
4999 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07005000 <pre>Updates an instance&#x27;s network interface. This method follows PATCH semantics.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005001
5002Args:
5003 project: string, Project ID for this request. (required)
5004 zone: string, The name of the zone for this request. (required)
5005 instance: string, The instance name for this request. (required)
5006 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005007 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005008 The object takes the form of:
5009
5010{ # A network interface resource attached to an instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005011 &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.
5012 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
5013 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5014 &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.
5015 &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.
5016 &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.
5017 #
5018 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5019 #
5020 # 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.
5021 &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.
5022 &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.
5023 &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 -07005024 },
5025 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005026 &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.
5027 { # An alias IP range attached to an instance&#x27;s network interface.
5028 &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).
5029 &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.
5030 },
5031 ],
5032 &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 -07005033 &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 -07005034 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
5035 &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.
5036 &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 -07005037 #
5038 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
5039 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5040 # - projects/project/global/networks/network
5041 # - global/networks/default
Bu Sun Kim65020912020-05-20 12:08:20 -07005042 &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.
5043 &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 -07005044 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
5045 # - regions/region/subnetworks/subnetwork
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005046}
5047
5048 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.
5049
5050For 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.
5051
5052The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5053
5054Returns:
5055 An object of the form:
5056
5057 { # Represents an Operation resource.
5058 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005059 # Google Compute Engine has three Operation resources:
5060 #
5061 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5062 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005063 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5064 #
5065 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005066 # - For global operations, use the `globalOperations` resource.
5067 # - For regional operations, use the `regionOperations` resource.
5068 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005069 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005070 # 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 -07005071 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5072 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5073 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5074 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5075 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5076 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005077 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005078 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5079 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5080 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005081 },
5082 ],
5083 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005084 &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`.
5085 &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.
5086 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5087 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5088 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5089 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5090 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5091 &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.
5092 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5093 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5094 &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.
5095 &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`.
5096 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5097 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5098 &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.
5099 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5100 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5101 {
5102 &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.
5103 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5104 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5105 {
5106 &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).
5107 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5108 },
5109 ],
5110 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5111 },
5112 ],
5113 &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 -07005114 }</pre>
5115</div>
5116
5117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005118 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005119 <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.
5120
5121Args:
5122 project: string, Project ID for this request. (required)
5123 zone: string, The name of the zone for this request. (required)
5124 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005125 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005126 The object takes the form of:
5127
5128{ # A set of Shielded Instance options.
Bu Sun Kim65020912020-05-20 12:08:20 -07005129 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
5130 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
5131 &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 -07005132}
5133
5134 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.
5135
5136For 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.
5137
5138The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5139
5140Returns:
5141 An object of the form:
5142
5143 { # Represents an Operation resource.
5144 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005145 # Google Compute Engine has three Operation resources:
5146 #
5147 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5148 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005149 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5150 #
5151 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005152 # - For global operations, use the `globalOperations` resource.
5153 # - For regional operations, use the `regionOperations` resource.
5154 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005155 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005156 # 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 -07005157 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5158 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5159 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5160 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5161 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5162 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citroe633be12015-03-02 13:40:36 -08005163 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005164 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5165 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5166 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citroe633be12015-03-02 13:40:36 -08005167 },
5168 ],
5169 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005170 &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`.
5171 &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.
5172 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5173 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5174 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5175 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5176 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5177 &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.
5178 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5179 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5180 &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.
5181 &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`.
5182 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5183 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5184 &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.
5185 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5186 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5187 {
5188 &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.
5189 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5190 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5191 {
5192 &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).
5193 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5194 },
5195 ],
5196 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5197 },
5198 ],
5199 &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 -04005200 }</pre>
5201</div>
5202
5203</body></html>