blob: 6587bdd9640cd055bee22e4a0a8d725a00341074 [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 Kim715bd7f2019-06-14 16:50:42 -0700124<p class="firstline">Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.</p>
125<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>
John Asmuth614db982014-04-24 15:46:26 -0400163<p class="firstline">Sets an instance's scheduling options.</p>
164<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.
623 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
624 &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.
625 &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.
626 #
627 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
628 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
629 # - projects/project/global/networks/network
630 # - global/networks/default
631 &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.
632 &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:
633 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
634 # - regions/region/subnetworks/subnetwork
635 },
636 ],
637 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
638 &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.
639 &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.
640 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
641 &quot;A String&quot;,
642 ],
643 },
644 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
645 &quot;A String&quot;,
646 ],
647 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
648 &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.
649 #
650 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
651 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
652 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
653 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
654 &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.
655 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
656 &quot;A String&quot;,
657 ],
658 },
659 ],
660 &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.
661 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
662 },
663 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
664 &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.
665 #
666 # 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.
667 { # A service account.
668 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
669 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
670 &quot;A String&quot;,
671 ],
672 },
673 ],
674 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
675 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
676 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
677 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
678 },
679 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
680 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
681 },
682 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
683 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
684 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
685 &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.
686 &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.
687 #
688 # To see the latest fingerprint, make get() request to the instance.
689 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
690 &quot;A String&quot;,
691 ],
692 },
693 &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 -0400694 },
695 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700696 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
697 &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.
698 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
699 # &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 -0400700 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700701 &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).
702 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
John Asmuth614db982014-04-24 15:46:26 -0400703 },
704 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700705 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
John Asmuth614db982014-04-24 15:46:26 -0400706 },
707 },
708 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700709 &quot;kind&quot;: &quot;compute#instanceAggregatedList&quot;, # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
710 &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.
711 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
712 &quot;warning&quot;: { # [Output Only] Informational warning message.
713 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
714 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
715 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
718 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719 },
720 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700721 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 },
John Asmuth614db982014-04-24 15:46:26 -0400723 }</pre>
724</div>
725
726<div class="method">
727 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
728 <pre>Retrieves the next page of results.
729
730Args:
731 previous_request: The request for the previous page. (required)
732 previous_response: The response from the request for the previous page. (required)
733
734Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -0400736 page. Returns None if there are no more items in the collection.
737 </pre>
738</div>
739
740<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700741 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400742 <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 -0400743
744Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000745 project: string, Project ID for this request. (required)
746 zone: string, The name of the zone for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800747 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700748 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400749 The object takes the form of:
750
751{ # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700752 &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).
753 &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.
754 &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.
755 #
756 # 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.
757 &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 -0700758 #
759 # 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.
760 #
761 # 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.
762 #
763 # 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.
764 #
765 # 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 -0700766 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
767 &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.
768 &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.
769 &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 -0700770 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700771 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
772 &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.
773 { # Guest OS features.
774 &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.
775 },
776 ],
777 &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.
778 &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 +0000779 #
780 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
781 #
782 # 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 -0700783 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
784 &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.
785 &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.
786 &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 +0000787 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
788 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700789 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000790 # 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:
791 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
792 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700793 # - 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 -0700794 &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.
795 &quot;a_key&quot;: &quot;A String&quot;,
796 },
797 &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.
798 &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.
799 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700800 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 &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 -0700802 #
803 # 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:
804 # projects/debian-cloud/global/images/family/debian-9
805 #
806 #
807 # Alternatively, use a specific version of a public operating system image:
808 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
809 #
810 #
811 # To create a disk with a custom image that you created, specify the image name in the following format:
812 # global/images/my-custom-image
813 #
814 #
815 # 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:
816 # global/images/family/my-image-family
817 #
818 #
819 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -0700820 &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.
821 #
822 # 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.
823 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
824 &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.
825 &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.
826 &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.
827 },
828 &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.
829 #
830 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
831 # global/snapshots/my-backup
832 #
833 #
834 # If the source snapshot is deleted later, this field will not be set.
835 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
836 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
837 &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.
838 &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.
839 &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 -0700840 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700841 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700842 &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.
843 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
844 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
845 &quot;A String&quot;,
846 ],
847 &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.
848 &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
849 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -0700850 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
852 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700853 },
854 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700855 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -0700856 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700857 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
858 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700859 },
860 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700861 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -0700862 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700863 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
864 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700865 },
866 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700867 &quot;pk&quot;: { # The Platform Key (PK).
868 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
869 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -0700870 },
871 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700872 &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 -0800873 #
874 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
875 #
876 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -0700877 &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 -0700878}
John Asmuth614db982014-04-24 15:46:26 -0400879
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 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 -0700881 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.
882
883For 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.
884
885The 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 -0400886
887Returns:
888 An object of the form:
889
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700890 { # Represents an Operation resource.
891 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700892 # Google Compute Engine has three Operation resources:
893 #
894 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
895 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
897 #
898 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700899 # - For global operations, use the `globalOperations` resource.
900 # - For regional operations, use the `regionOperations` resource.
901 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 # 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 -0700904 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
905 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
906 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
907 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
908 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
909 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400910 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
912 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
913 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400914 },
915 ],
916 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700917 &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`.
918 &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.
919 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
920 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
921 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
922 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
923 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
924 &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.
925 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
926 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
927 &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.
928 &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`.
929 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
930 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
931 &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.
932 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
933 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
934 {
935 &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.
936 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
937 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
938 {
939 &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).
940 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
941 },
942 ],
943 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
944 },
945 ],
946 &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 -0400947 }</pre>
948</div>
949
950<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700951 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800952 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
John Asmuth614db982014-04-24 15:46:26 -0400953
954Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000955 project: string, Project ID for this request. (required)
956 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400957 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 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.
959
960For 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.
961
962The 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 -0400963
964Returns:
965 An object of the form:
966
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967 { # Represents an Operation resource.
968 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700969 # Google Compute Engine has three Operation resources:
970 #
971 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
972 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
974 #
975 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 # - For global operations, use the `globalOperations` resource.
977 # - For regional operations, use the `regionOperations` resource.
978 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700980 # 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 -0700981 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
982 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
983 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
984 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
985 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
986 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400987 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700988 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
989 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
990 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -0400991 },
992 ],
993 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700994 &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`.
995 &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.
996 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
997 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
998 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
999 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1000 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1001 &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.
1002 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1003 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1004 &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.
1005 &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`.
1006 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1007 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1008 &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.
1009 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1010 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1011 {
1012 &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.
1013 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1014 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1015 {
1016 &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).
1017 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1018 },
1019 ],
1020 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1021 },
1022 ],
1023 &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 -04001024 }</pre>
1025</div>
1026
1027<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001028 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001029 <pre>Deletes an access config from an instance&#x27;s network interface.
John Asmuth614db982014-04-24 15:46:26 -04001030
1031Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001032 project: string, Project ID for this request. (required)
1033 zone: string, The name of the zone for this request. (required)
1034 instance: string, The instance name for this request. (required)
1035 accessConfig: string, The name of the access config to delete. (required)
1036 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001037 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.
1038
1039For 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.
1040
1041The 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 -04001042
1043Returns:
1044 An object of the form:
1045
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 { # Represents an Operation resource.
1047 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001048 # Google Compute Engine has three Operation resources:
1049 #
1050 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1051 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1053 #
1054 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001055 # - For global operations, use the `globalOperations` resource.
1056 # - For regional operations, use the `regionOperations` resource.
1057 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001059 # 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 -07001060 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1061 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1062 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1063 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1064 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1065 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001066 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001067 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1068 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1069 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04001070 },
1071 ],
1072 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001073 &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`.
1074 &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.
1075 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1076 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1077 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1078 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1079 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1080 &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.
1081 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1082 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1083 &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.
1084 &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`.
1085 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1086 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1087 &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.
1088 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1089 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1090 {
1091 &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.
1092 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1093 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1094 {
1095 &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).
1096 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1097 },
1098 ],
1099 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1100 },
1101 ],
1102 &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 -04001103 }</pre>
1104</div>
1105
1106<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001108 <pre>Detaches a disk from an instance.
1109
1110Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001111 project: string, Project ID for this request. (required)
1112 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001113 instance: string, Instance name for this request. (required)
1114 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)
1115 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.
1116
1117For 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.
1118
1119The 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 -04001120
1121Returns:
1122 An object of the form:
1123
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001124 { # Represents an Operation resource.
1125 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001126 # Google Compute Engine has three Operation resources:
1127 #
1128 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1129 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001130 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1131 #
1132 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001133 # - For global operations, use the `globalOperations` resource.
1134 # - For regional operations, use the `regionOperations` resource.
1135 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001136 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001137 # 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 -07001138 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1139 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1140 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1141 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1142 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1143 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001144 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1146 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1147 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04001148 },
1149 ],
1150 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001151 &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`.
1152 &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.
1153 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1154 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1155 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1156 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1157 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1158 &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.
1159 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1160 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1161 &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.
1162 &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`.
1163 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1164 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1165 &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.
1166 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1167 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1168 {
1169 &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.
1170 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1171 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1172 {
1173 &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).
1174 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1175 },
1176 ],
1177 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1178 },
1179 ],
1180 &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 -04001181 }</pre>
1182</div>
1183
1184<div class="method">
1185 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001186 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -04001187
1188Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001189 project: string, Project ID for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001190 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001191 instance: string, Name of the instance resource to return. (required)
1192
1193Returns:
1194 An object of the form:
1195
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001196 { # Represents an Instance resource.
1197 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001198 # 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 -07001199 &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.
1200 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1201 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1202 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1203 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1204 &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 -04001205 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001206 &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).
1207 &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.
1208 &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.
1209 #
1210 # 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.
1211 &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 -07001212 #
1213 # 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.
1214 #
1215 # 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.
1216 #
1217 # 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.
1218 #
1219 # 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 -07001220 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1221 &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.
1222 &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.
1223 &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 -07001224 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001225 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1226 &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.
1227 { # Guest OS features.
1228 &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.
1229 },
1230 ],
1231 &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.
1232 &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 +00001233 #
1234 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1235 #
1236 # 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 -07001237 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1238 &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.
1239 &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.
1240 &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 +00001241 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1242 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001243 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001244 # 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:
1245 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1246 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001247 # - 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 -07001248 &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.
1249 &quot;a_key&quot;: &quot;A String&quot;,
1250 },
1251 &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.
1252 &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.
1253 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001254 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001255 &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 -07001256 #
1257 # 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:
1258 # projects/debian-cloud/global/images/family/debian-9
1259 #
1260 #
1261 # Alternatively, use a specific version of a public operating system image:
1262 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1263 #
1264 #
1265 # To create a disk with a custom image that you created, specify the image name in the following format:
1266 # global/images/my-custom-image
1267 #
1268 #
1269 # 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:
1270 # global/images/family/my-image-family
1271 #
1272 #
1273 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001274 &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.
1275 #
1276 # 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.
1277 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1278 &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.
1279 &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.
1280 &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.
1281 },
1282 &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.
1283 #
1284 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1285 # global/snapshots/my-backup
1286 #
1287 #
1288 # If the source snapshot is deleted later, this field will not be set.
1289 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1290 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1291 &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.
1292 &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.
1293 &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 -07001294 },
John Asmuth614db982014-04-24 15:46:26 -04001295 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001296 &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.
1297 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1298 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1299 &quot;A String&quot;,
1300 ],
1301 &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.
1302 &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
1303 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07001304 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001305 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1306 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001307 },
1308 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001309 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07001310 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001311 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1312 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001313 },
1314 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001315 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07001316 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001317 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1318 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001319 },
1320 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001321 &quot;pk&quot;: { # The Platform Key (PK).
1322 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1323 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001324 },
1325 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001326 &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 -08001327 #
1328 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1329 #
1330 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001331 &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 -07001332 },
John Asmuth614db982014-04-24 15:46:26 -04001333 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001334 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1335 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1336 },
1337 &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.
1338 #
1339 # To see the latest fingerprint, make get() request to the instance.
1340 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1341 { # A specification of the type and number of accelerator cards attached to the instance.
1342 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1343 &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.
1344 },
1345 ],
1346 &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.
1347 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1348 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1349 &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.
1350 #
1351 # To see the latest fingerprint, make get() request to the instance.
1352 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1353 &quot;a_key&quot;: &quot;A String&quot;,
1354 },
1355 &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:
1356 # zones/us-central1-f/machineTypes/n1-standard-1
1357 #
1358 #
1359 # 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):
1360 # zones/zone/machineTypes/custom-CPUS-MEMORY
1361 #
1362 #
1363 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1364 #
1365 # For a full list of restrictions, read the Specifications for custom machine types.
1366 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1367 &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.
1368 #
1369 # To see the latest fingerprint, make a get() request to retrieve the resource.
1370 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1371 {
1372 &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.
1373 &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).
1374 },
1375 ],
1376 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1377 },
1378 &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;.
1379 &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.
1380 &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.
1381 { # A network interface resource attached to an instance.
1382 &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.
1383 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1384 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1385 &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.
1386 &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.
1387 &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.
1388 #
1389 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1390 #
1391 # 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.
1392 &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.
1393 &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.
1394 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1395 },
1396 ],
1397 &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.
1398 { # An alias IP range attached to an instance&#x27;s network interface.
1399 &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).
1400 &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.
1401 },
1402 ],
1403 &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.
1404 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1405 &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.
1406 &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.
1407 #
1408 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1409 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1410 # - projects/project/global/networks/network
1411 # - global/networks/default
1412 &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.
1413 &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:
1414 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1415 # - regions/region/subnetworks/subnetwork
1416 },
1417 ],
1418 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1419 &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.
1420 &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.
1421 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1422 &quot;A String&quot;,
1423 ],
1424 },
1425 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
1426 &quot;A String&quot;,
1427 ],
1428 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
1429 &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.
1430 #
1431 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1432 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1433 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1434 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
1435 &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.
1436 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
1437 &quot;A String&quot;,
1438 ],
1439 },
1440 ],
1441 &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.
1442 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
1443 },
1444 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1445 &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.
1446 #
1447 # 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.
1448 { # A service account.
1449 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
1450 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
1451 &quot;A String&quot;,
1452 ],
1453 },
1454 ],
1455 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
1456 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
1457 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
1458 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
1459 },
1460 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
1461 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
1462 },
1463 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
1464 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
1465 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
1466 &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.
1467 &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.
1468 #
1469 # To see the latest fingerprint, make get() request to the instance.
1470 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1471 &quot;A String&quot;,
1472 ],
1473 },
1474 &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 -07001475 }</pre>
1476</div>
1477
1478<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001479 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, queryPath=None, variableKey=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001480 <pre>Returns the specified guest attributes entry.
1481
1482Args:
1483 project: string, Project ID for this request. (required)
1484 zone: string, The name of the zone for this request. (required)
1485 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486 queryPath: string, Specifies the guest attributes path to be queried.
Bu Sun Kim65020912020-05-20 12:08:20 -07001487 variableKey: string, Specifies the key for the guest attributes entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001488
1489Returns:
1490 An object of the form:
1491
1492 { # A guest attributes entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001493 &quot;kind&quot;: &quot;compute#guestAttributes&quot;, # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
1494 &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;)
1495 &quot;queryValue&quot;: { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
1496 &quot;items&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001497 { # A guest attributes namespace/key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001498 &quot;key&quot;: &quot;A String&quot;, # Key for the guest attribute entry.
1499 &quot;namespace&quot;: &quot;A String&quot;, # Namespace for the guest attribute entry.
1500 &quot;value&quot;: &quot;A String&quot;, # Value for the guest attribute entry.
John Asmuth614db982014-04-24 15:46:26 -04001501 },
1502 ],
John Asmuth614db982014-04-24 15:46:26 -04001503 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001504 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1505 &quot;variableKey&quot;: &quot;A String&quot;, # The key to search for.
1506 &quot;variableValue&quot;: &quot;A String&quot;, # [Output Only] The value found for the requested key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001507 }</pre>
1508</div>
1509
1510<div class="method">
1511 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
1512 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
1513
1514Args:
1515 project: string, Project ID for this request. (required)
1516 zone: string, The name of the zone for this request. (required)
1517 resource: string, Name or id of the resource for this request. (required)
1518
1519Returns:
1520 An object of the form:
1521
Dan O'Mearadd494642020-05-01 07:42:23 -07001522 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001523 #
1524 #
1525 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001526 # 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 -07001527 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001528 # 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 -07001529 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001530 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001531 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001532 # { &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 -07001533 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001534 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001535 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001536 # 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 -07001537 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001538 # 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 -07001539 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001540 { # 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.
1541 #
1542 # 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.
1543 #
1544 # Example Policy with multiple AuditConfigs:
1545 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001546 # { &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 -07001547 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001548 # 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 -07001549 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001550 { # Provides the configuration for logging a type of permissions. Example:
1551 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001552 # { &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 -07001553 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001554 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1555 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1556 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001557 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001558 &quot;ignoreChildExemptions&quot;: True or False,
1559 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001560 },
1561 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001562 &quot;exemptedMembers&quot;: [
1563 &quot;A String&quot;,
1564 ],
1565 &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 -07001566 },
1567 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001568 &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 -07001569 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001570 &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.
1571 #
1572 # If the condition evaluates to `true`, then this binding applies to the current request.
1573 #
1574 # 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.
1575 #
1576 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1577 #
1578 # Example (Comparison):
1579 #
1580 # 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;
1581 #
1582 # Example (Equality):
1583 #
1584 # 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;
1585 #
1586 # Example (Logic):
1587 #
1588 # 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;
1589 #
1590 # Example (Data Manipulation):
1591 #
1592 # 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;
1593 #
1594 # 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.
1595 &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.
1596 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1597 &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.
1598 &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.
1599 },
1600 &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 -07001601 #
1602 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1603 #
1604 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1605 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001606 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001607 #
1608 #
1609 #
1610 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1611 #
1612 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1613 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001614 # * `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.
1615 #
1616 # * `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.
1617 #
1618 # * `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.
1619 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001620 #
1621 #
1622 # * `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 -07001623 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001624 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001625 &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 -07001626 },
1627 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001628 &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.
1629 #
1630 # **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.
1631 &quot;iamOwned&quot;: True or False,
1632 &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.
1633 { # A rule to be applied in a Policy.
1634 &quot;action&quot;: &quot;A String&quot;, # Required
1635 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1636 { # A condition to be met.
1637 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1638 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1639 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1640 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1641 &quot;values&quot;: [ # The objects of the condition.
1642 &quot;A String&quot;,
1643 ],
1644 },
1645 ],
1646 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1647 &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.
1648 &quot;A String&quot;,
1649 ],
1650 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1651 { # Specifies what kind of log the caller must write
1652 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1653 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1654 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1655 },
1656 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1657 },
1658 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1659 #
1660 # 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.
1661 #
1662 # Field names correspond to IAM request parameters and field values are their respective values.
1663 #
1664 # 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.
1665 #
1666 # 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]}
1667 &quot;customFields&quot;: [ # Custom fields.
1668 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1669 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1670 &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.
1671 },
1672 ],
1673 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1674 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1675 },
1676 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1677 &quot;logMode&quot;: &quot;A String&quot;,
1678 },
1679 },
1680 ],
1681 &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.
1682 &quot;A String&quot;,
1683 ],
1684 &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.
1685 &quot;A String&quot;,
1686 ],
1687 },
1688 ],
1689 &quot;version&quot;: 42, # Specifies the format of the policy.
1690 #
1691 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1692 #
1693 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1694 #
1695 # * 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
1696 #
1697 # **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.
1698 #
1699 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1700 #
1701 # 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 -04001702 }</pre>
1703</div>
1704
1705<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001706 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, port=None, start=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001707 <pre>Returns the last 1 MB of serial port output from the specified instance.
John Asmuth614db982014-04-24 15:46:26 -04001708
1709Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001710 project: string, Project ID for this request. (required)
1711 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001712 instance: string, Name of the instance scoping this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001713 port: integer, Specifies which COM or serial port to retrieve data from.
Bu Sun Kim65020912020-05-20 12:08:20 -07001714 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 -04001715
1716Returns:
1717 An object of the form:
1718
Bu Sun Kim65020912020-05-20 12:08:20 -07001719 { # An instance&#x27;s serial console output.
1720 &quot;contents&quot;: &quot;A String&quot;, # [Output Only] The contents of the console output.
1721 &quot;kind&quot;: &quot;compute#serialPortOutput&quot;, # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
1722 &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.
1723 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1724 &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 -04001725 }</pre>
1726</div>
1727
1728<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001729 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
1730 <pre>Returns the Shielded Instance Identity of an instance
1731
1732Args:
1733 project: string, Project ID for this request. (required)
1734 zone: string, The name of the zone for this request. (required)
1735 instance: string, Name or id of the instance scoping this request. (required)
1736
1737Returns:
1738 An object of the form:
1739
1740 { # A shielded Instance identity entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07001741 &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.
1742 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
1743 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001744 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001745 &quot;kind&quot;: &quot;compute#shieldedInstanceIdentity&quot;, # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
1746 &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.
1747 &quot;ekCert&quot;: &quot;A String&quot;, # A PEM-encoded X.509 certificate. This field can be empty.
1748 &quot;ekPub&quot;: &quot;A String&quot;, # A PEM-encoded public key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001749 },
1750 }</pre>
1751</div>
1752
1753<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001754 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, sourceInstanceTemplate=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001755 <pre>Creates an instance resource in the specified project using the data included in the request.
1756
1757Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001758 project: string, Project ID for this request. (required)
1759 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001760 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04001761 The object takes the form of:
1762
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001763{ # Represents an Instance resource.
1764 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001765 # 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 -07001766 &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.
1767 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
1768 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1769 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
1770 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1771 &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 -04001772 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001773 &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).
1774 &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.
1775 &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.
1776 #
1777 # 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.
1778 &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 -07001779 #
1780 # 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.
1781 #
1782 # 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.
1783 #
1784 # 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.
1785 #
1786 # 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 -07001787 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1788 &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.
1789 &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.
1790 &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 -07001791 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001792 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
1793 &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.
1794 { # Guest OS features.
1795 &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.
1796 },
1797 ],
1798 &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.
1799 &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 +00001800 #
1801 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1802 #
1803 # 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 -07001804 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
1805 &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.
1806 &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.
1807 &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 +00001808 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1809 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001810 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001811 # 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:
1812 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1813 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001814 # - 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 -07001815 &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.
1816 &quot;a_key&quot;: &quot;A String&quot;,
1817 },
1818 &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.
1819 &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.
1820 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001821 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001822 &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 -07001823 #
1824 # 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:
1825 # projects/debian-cloud/global/images/family/debian-9
1826 #
1827 #
1828 # Alternatively, use a specific version of a public operating system image:
1829 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1830 #
1831 #
1832 # To create a disk with a custom image that you created, specify the image name in the following format:
1833 # global/images/my-custom-image
1834 #
1835 #
1836 # 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:
1837 # global/images/family/my-image-family
1838 #
1839 #
1840 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07001841 &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.
1842 #
1843 # 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.
1844 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1845 &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.
1846 &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.
1847 &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.
1848 },
1849 &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.
1850 #
1851 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1852 # global/snapshots/my-backup
1853 #
1854 #
1855 # If the source snapshot is deleted later, this field will not be set.
1856 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1857 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
1858 &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.
1859 &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.
1860 &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 -07001861 },
John Asmuth614db982014-04-24 15:46:26 -04001862 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001863 &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.
1864 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1865 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
1866 &quot;A String&quot;,
1867 ],
1868 &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.
1869 &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
1870 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07001871 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001872 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1873 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001874 },
1875 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001876 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07001877 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001878 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1879 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001880 },
1881 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001882 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07001883 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001884 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1885 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001886 },
1887 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001888 &quot;pk&quot;: { # The Platform Key (PK).
1889 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
1890 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001891 },
1892 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001893 &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 -08001894 #
1895 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1896 #
1897 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07001898 &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 -07001899 },
John Asmuth614db982014-04-24 15:46:26 -04001900 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001901 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
1902 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
1903 },
1904 &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.
1905 #
1906 # To see the latest fingerprint, make get() request to the instance.
1907 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
1908 { # A specification of the type and number of accelerator cards attached to the instance.
1909 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
1910 &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.
1911 },
1912 ],
1913 &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.
1914 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1915 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
1916 &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.
1917 #
1918 # To see the latest fingerprint, make get() request to the instance.
1919 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
1920 &quot;a_key&quot;: &quot;A String&quot;,
1921 },
1922 &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:
1923 # zones/us-central1-f/machineTypes/n1-standard-1
1924 #
1925 #
1926 # 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):
1927 # zones/zone/machineTypes/custom-CPUS-MEMORY
1928 #
1929 #
1930 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1931 #
1932 # For a full list of restrictions, read the Specifications for custom machine types.
1933 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1934 &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.
1935 #
1936 # To see the latest fingerprint, make a get() request to retrieve the resource.
1937 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1938 {
1939 &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.
1940 &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).
1941 },
1942 ],
1943 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
1944 },
1945 &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;.
1946 &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.
1947 &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.
1948 { # A network interface resource attached to an instance.
1949 &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.
1950 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
1951 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1952 &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.
1953 &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.
1954 &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.
1955 #
1956 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1957 #
1958 # 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.
1959 &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.
1960 &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.
1961 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1962 },
1963 ],
1964 &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.
1965 { # An alias IP range attached to an instance&#x27;s network interface.
1966 &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).
1967 &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.
1968 },
1969 ],
1970 &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.
1971 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1972 &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.
1973 &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.
1974 #
1975 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1976 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1977 # - projects/project/global/networks/network
1978 # - global/networks/default
1979 &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.
1980 &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:
1981 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1982 # - regions/region/subnetworks/subnetwork
1983 },
1984 ],
1985 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1986 &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.
1987 &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.
1988 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
1989 &quot;A String&quot;,
1990 ],
1991 },
1992 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
1993 &quot;A String&quot;,
1994 ],
1995 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
1996 &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.
1997 #
1998 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1999 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2000 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2001 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2002 &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.
2003 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2004 &quot;A String&quot;,
2005 ],
2006 },
2007 ],
2008 &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.
2009 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
2010 },
2011 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2012 &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.
2013 #
2014 # 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.
2015 { # A service account.
2016 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2017 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2018 &quot;A String&quot;,
2019 ],
2020 },
2021 ],
2022 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2023 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2024 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2025 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2026 },
2027 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2028 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2029 },
2030 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
2031 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
2032 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2033 &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.
2034 &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.
2035 #
2036 # To see the latest fingerprint, make get() request to the instance.
2037 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2038 &quot;A String&quot;,
2039 ],
2040 },
2041 &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 -04002042}
2043
Bu Sun Kim65020912020-05-20 12:08:20 -07002044 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.
2045
2046For 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.
2047
2048The 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 -07002049 sourceInstanceTemplate: string, Specifies instance template to create the instance.
2050
2051This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2052- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
2053- projects/project/global/instanceTemplates/instanceTemplate
2054- global/instanceTemplates/instanceTemplate
John Asmuth614db982014-04-24 15:46:26 -04002055
2056Returns:
2057 An object of the form:
2058
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002059 { # Represents an Operation resource.
2060 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002061 # Google Compute Engine has three Operation resources:
2062 #
2063 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2064 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002065 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2066 #
2067 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002068 # - For global operations, use the `globalOperations` resource.
2069 # - For regional operations, use the `regionOperations` resource.
2070 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002071 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002072 # 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 -07002073 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2074 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2075 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2076 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2077 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2078 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002079 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002080 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2081 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2082 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04002083 },
2084 ],
2085 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002086 &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`.
2087 &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.
2088 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2089 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2090 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2091 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2092 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2093 &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.
2094 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2095 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2096 &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.
2097 &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`.
2098 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2099 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2100 &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.
2101 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2102 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2103 {
2104 &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.
2105 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2106 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2107 {
2108 &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).
2109 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2110 },
2111 ],
2112 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2113 },
2114 ],
2115 &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 -04002116 }</pre>
2117</div>
2118
2119<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002120 <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 -08002121 <pre>Retrieves the list of instances contained within the specified zone.
John Asmuth614db982014-04-24 15:46:26 -04002122
2123Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002124 project: string, Project ID for this request. (required)
2125 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002126 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 -07002127
Dan O'Mearadd494642020-05-01 07:42:23 -07002128For 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 -07002129
Dan O'Mearadd494642020-05-01 07:42:23 -07002130You 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 -08002131
Bu Sun Kim65020912020-05-20 12:08:20 -07002132To 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) ```
2133 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`)
2134 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2135
2136You 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.
2137
2138Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2139 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 -04002140
2141Returns:
2142 An object of the form:
2143
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002144 { # Contains a list of instances.
Bu Sun Kim65020912020-05-20 12:08:20 -07002145 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2146 &quot;items&quot;: [ # A list of Instance resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002147 { # Represents an Instance resource.
2148 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002149 # 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 -07002150 &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.
2151 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
2152 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2153 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
2154 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2155 &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 -04002156 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002157 &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).
2158 &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.
2159 &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.
2160 #
2161 # 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.
2162 &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 -07002163 #
2164 # 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.
2165 #
2166 # 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.
2167 #
2168 # 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.
2169 #
2170 # 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 -07002171 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2172 &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.
2173 &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.
2174 &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 -07002175 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002176 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
2177 &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.
2178 { # Guest OS features.
2179 &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.
2180 },
2181 ],
2182 &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.
2183 &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 +00002184 #
2185 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2186 #
2187 # 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 -07002188 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
2189 &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.
2190 &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.
2191 &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 +00002192 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2193 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002194 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002195 # 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:
2196 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2197 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002198 # - 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 -07002199 &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.
2200 &quot;a_key&quot;: &quot;A String&quot;,
2201 },
2202 &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.
2203 &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.
2204 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002205 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002206 &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 -07002207 #
2208 # 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:
2209 # projects/debian-cloud/global/images/family/debian-9
2210 #
2211 #
2212 # Alternatively, use a specific version of a public operating system image:
2213 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
2214 #
2215 #
2216 # To create a disk with a custom image that you created, specify the image name in the following format:
2217 # global/images/my-custom-image
2218 #
2219 #
2220 # 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:
2221 # global/images/family/my-image-family
2222 #
2223 #
2224 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07002225 &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.
2226 #
2227 # 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.
2228 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2229 &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.
2230 &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.
2231 &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.
2232 },
2233 &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.
2234 #
2235 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2236 # global/snapshots/my-backup
2237 #
2238 #
2239 # If the source snapshot is deleted later, this field will not be set.
2240 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2241 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
2242 &quot;kmsKeyServiceAccount&quot;: &quot;A String&quot;, # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2243 &quot;rawKey&quot;: &quot;A String&quot;, # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2244 &quot;sha256&quot;: &quot;A String&quot;, # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002245 },
John Asmuth614db982014-04-24 15:46:26 -04002246 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 &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.
2248 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2249 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
2250 &quot;A String&quot;,
2251 ],
2252 &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.
2253 &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
2254 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07002255 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002256 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2257 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002258 },
2259 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002260 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
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;keks&quot;: [ # The Key Exchange Key (KEK).
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;pk&quot;: { # The Platform Key (PK).
2273 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
2274 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07002275 },
2276 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002277 &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 -08002278 #
2279 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2280 #
2281 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07002282 &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 -07002283 },
John Asmuth614db982014-04-24 15:46:26 -04002284 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002285 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
2286 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
2287 },
2288 &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.
2289 #
2290 # To see the latest fingerprint, make get() request to the instance.
2291 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
2292 { # A specification of the type and number of accelerator cards attached to the instance.
2293 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
2294 &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.
2295 },
2296 ],
2297 &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.
2298 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2299 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
2300 &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.
2301 #
2302 # To see the latest fingerprint, make get() request to the instance.
2303 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
2304 &quot;a_key&quot;: &quot;A String&quot;,
2305 },
2306 &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:
2307 # zones/us-central1-f/machineTypes/n1-standard-1
2308 #
2309 #
2310 # 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):
2311 # zones/zone/machineTypes/custom-CPUS-MEMORY
2312 #
2313 #
2314 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2315 #
2316 # For a full list of restrictions, read the Specifications for custom machine types.
2317 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2318 &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.
2319 #
2320 # To see the latest fingerprint, make a get() request to retrieve the resource.
2321 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2322 {
2323 &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.
2324 &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).
2325 },
2326 ],
2327 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
2328 },
2329 &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;.
2330 &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.
2331 &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.
2332 { # A network interface resource attached to an instance.
2333 &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.
2334 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
2335 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2336 &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.
2337 &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.
2338 &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.
2339 #
2340 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2341 #
2342 # 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.
2343 &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.
2344 &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.
2345 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2346 },
2347 ],
2348 &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.
2349 { # An alias IP range attached to an instance&#x27;s network interface.
2350 &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).
2351 &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.
2352 },
2353 ],
2354 &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.
2355 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2356 &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.
2357 &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.
2358 #
2359 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2360 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2361 # - projects/project/global/networks/network
2362 # - global/networks/default
2363 &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.
2364 &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:
2365 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2366 # - regions/region/subnetworks/subnetwork
2367 },
2368 ],
2369 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2370 &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.
2371 &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.
2372 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
2373 &quot;A String&quot;,
2374 ],
2375 },
2376 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
2377 &quot;A String&quot;,
2378 ],
2379 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
2380 &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.
2381 #
2382 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
2383 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
2384 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
2385 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
2386 &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.
2387 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
2388 &quot;A String&quot;,
2389 ],
2390 },
2391 ],
2392 &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.
2393 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
2394 },
2395 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2396 &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.
2397 #
2398 # 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.
2399 { # A service account.
2400 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
2401 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
2402 &quot;A String&quot;,
2403 ],
2404 },
2405 ],
2406 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
2407 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
2408 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
2409 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
2410 },
2411 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
2412 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
2413 },
2414 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
2415 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
2416 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
2417 &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.
2418 &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.
2419 #
2420 # To see the latest fingerprint, make get() request to the instance.
2421 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2422 &quot;A String&quot;,
2423 ],
2424 },
2425 &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 -04002426 },
2427 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002428 &quot;kind&quot;: &quot;compute#instanceList&quot;, # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
2429 &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.
2430 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2431 &quot;warning&quot;: { # [Output Only] Informational warning message.
2432 &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.
2433 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2434 # &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 -07002435 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002436 &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).
2437 &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 -07002438 },
2439 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002440 &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 -07002441 },
John Asmuth614db982014-04-24 15:46:26 -04002442 }</pre>
2443</div>
2444
2445<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07002446 <code class="details" id="listReferrers">listReferrers(project, zone, instance, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002447 <pre>Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.
2448
2449Args:
2450 project: string, Project ID for this request. (required)
2451 zone: string, The name of the zone for this request. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -07002452 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 -07002453 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 -07002454
Dan O'Mearadd494642020-05-01 07:42:23 -07002455For 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 -07002456
Dan O'Mearadd494642020-05-01 07:42:23 -07002457You 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 -07002458
Bu Sun Kim65020912020-05-20 12:08:20 -07002459To 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 -07002460 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 -07002461 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2462
2463You 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.
2464
2465Currently, only sorting by `name` or `creationTimestamp desc` is supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07002466 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 -07002467
2468Returns:
2469 An object of the form:
2470
2471 { # Contains a list of instance referrers.
Bu Sun Kim65020912020-05-20 12:08:20 -07002472 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2473 &quot;items&quot;: [ # A list of Reference resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002474 { # Represents a reference to a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002475 &quot;kind&quot;: &quot;compute#reference&quot;, # [Output Only] Type of the resource. Always compute#reference for references.
2476 &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 -07002477 # - MEMBER_OF
Bu Sun Kim65020912020-05-20 12:08:20 -07002478 &quot;referrer&quot;: &quot;A String&quot;, # URL of the resource which refers to the target.
2479 &quot;target&quot;: &quot;A String&quot;, # URL of the resource to which this reference points.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002480 },
2481 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002482 &quot;kind&quot;: &quot;compute#instanceListReferrers&quot;, # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
2483 &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.
2484 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
2485 &quot;warning&quot;: { # [Output Only] Informational warning message.
2486 &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.
2487 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2488 # &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 -07002489 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002490 &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).
2491 &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 -07002492 },
2493 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002494 &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 -07002495 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002496 }</pre>
2497</div>
2498
2499<div class="method">
2500 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
2501 <pre>Retrieves the next page of results.
2502
2503Args:
2504 previous_request: The request for the previous page. (required)
2505 previous_response: The response from the request for the previous page. (required)
2506
2507Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002508 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002509 page. Returns None if there are no more items in the collection.
2510 </pre>
2511</div>
2512
2513<div class="method">
John Asmuth614db982014-04-24 15:46:26 -04002514 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2515 <pre>Retrieves the next page of results.
2516
2517Args:
2518 previous_request: The request for the previous page. (required)
2519 previous_response: The response from the request for the previous page. (required)
2520
2521Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002522 A request object that you can call &#x27;execute()&#x27; on to request the next
John Asmuth614db982014-04-24 15:46:26 -04002523 page. Returns None if there are no more items in the collection.
2524 </pre>
2525</div>
2526
2527<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002528 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
2529 <pre>Removes resource policies from an instance.
2530
2531Args:
2532 project: string, Project ID for this request. (required)
2533 zone: string, The name of the zone for this request. (required)
2534 instance: string, The instance name for this request. (required)
2535 body: object, The request body.
2536 The object takes the form of:
2537
2538{
Bu Sun Kim65020912020-05-20 12:08:20 -07002539 &quot;resourcePolicies&quot;: [ # Resource policies to be removed from this instance.
2540 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002541 ],
2542 }
2543
2544 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.
2545
2546For 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.
2547
2548The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2549
2550Returns:
2551 An object of the form:
2552
2553 { # Represents an Operation resource.
2554 #
2555 # Google Compute Engine has three Operation resources:
2556 #
2557 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2558 #
2559 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2560 #
2561 # Operations can be global, regional or zonal.
2562 # - For global operations, use the `globalOperations` resource.
2563 # - For regional operations, use the `regionOperations` resource.
2564 # - For zonal operations, use the `zonalOperations` resource.
2565 #
2566 # 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 -07002567 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2568 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2569 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2570 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2571 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2572 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002573 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002574 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2575 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2576 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07002577 },
2578 ],
2579 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002580 &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`.
2581 &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.
2582 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2583 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2584 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2585 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2586 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2587 &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.
2588 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2589 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2590 &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.
2591 &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`.
2592 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2593 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2594 &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.
2595 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2596 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2597 {
2598 &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.
2599 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2600 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2601 {
2602 &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).
2603 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2604 },
2605 ],
2606 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2607 },
2608 ],
2609 &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 -07002610 }</pre>
2611</div>
2612
2613<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002614 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
2615 <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 -04002616
2617Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002618 project: string, Project ID for this request. (required)
2619 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04002620 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002621 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2622
2623For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2624
2625The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04002626
2627Returns:
2628 An object of the form:
2629
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002630 { # Represents an Operation resource.
2631 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002632 # Google Compute Engine has three Operation resources:
2633 #
2634 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2635 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002636 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2637 #
2638 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002639 # - For global operations, use the `globalOperations` resource.
2640 # - For regional operations, use the `regionOperations` resource.
2641 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002642 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002643 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002644 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2645 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2646 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2647 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2648 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2649 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002650 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002651 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2652 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2653 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04002654 },
2655 ],
2656 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002657 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2658 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
2659 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2660 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2661 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2662 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2663 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2664 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
2665 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2666 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2667 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2668 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2669 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2670 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2671 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
2672 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2673 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2674 {
2675 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2676 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2677 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2678 {
2679 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2680 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2681 },
2682 ],
2683 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2684 },
2685 ],
2686 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
John Asmuth614db982014-04-24 15:46:26 -04002687 }</pre>
2688</div>
2689
2690<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002691 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
2692 <pre>Sets deletion protection on the instance.
2693
2694Args:
2695 project: string, Project ID for this request. (required)
2696 zone: string, The name of the zone for this request. (required)
2697 resource: string, Name or id of the resource for this request. (required)
2698 deletionProtection: boolean, Whether the resource should be protected against deletion.
2699 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.
2700
2701For 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.
2702
2703The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2704
2705Returns:
2706 An object of the form:
2707
2708 { # Represents an Operation resource.
2709 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002710 # Google Compute Engine has three Operation resources:
2711 #
2712 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2713 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002714 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2715 #
2716 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002717 # - For global operations, use the `globalOperations` resource.
2718 # - For regional operations, use the `regionOperations` resource.
2719 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002720 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002721 # 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 -07002722 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2723 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2724 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2725 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2726 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2727 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002728 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002729 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2730 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2731 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002732 },
2733 ],
2734 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002735 &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`.
2736 &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.
2737 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2738 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2739 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2740 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2741 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2742 &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.
2743 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2744 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2745 &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.
2746 &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`.
2747 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2748 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2749 &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.
2750 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2751 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2752 {
2753 &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.
2754 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2755 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2756 {
2757 &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).
2758 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2759 },
2760 ],
2761 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2762 },
2763 ],
2764 &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 -07002765 }</pre>
2766</div>
2767
2768<div class="method">
2769 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002770 <pre>Sets the auto-delete flag for a disk attached to an instance.
John Asmuth614db982014-04-24 15:46:26 -04002771
2772Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002773 project: string, Project ID for this request. (required)
2774 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002775 instance: string, The instance name for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04002776 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002777 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)
2778 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.
2779
2780For 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.
2781
2782The 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 -04002783
2784Returns:
2785 An object of the form:
2786
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002787 { # Represents an Operation resource.
2788 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002789 # Google Compute Engine has three Operation resources:
2790 #
2791 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2792 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002793 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2794 #
2795 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002796 # - For global operations, use the `globalOperations` resource.
2797 # - For regional operations, use the `regionOperations` resource.
2798 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002799 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002800 # 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 -07002801 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2802 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2803 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2804 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2805 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2806 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002807 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002808 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2809 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2810 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04002811 },
2812 ],
2813 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002814 &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`.
2815 &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.
2816 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2817 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2818 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2819 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2820 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2821 &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.
2822 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2823 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2824 &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.
2825 &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`.
2826 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2827 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2828 &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.
2829 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2830 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2831 {
2832 &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.
2833 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2834 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2835 {
2836 &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).
2837 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2838 },
2839 ],
2840 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2841 },
2842 ],
2843 &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 -08002844 }</pre>
2845</div>
2846
2847<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002848 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002849 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
2850
2851Args:
2852 project: string, Project ID for this request. (required)
2853 zone: string, The name of the zone for this request. (required)
2854 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002855 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002856 The object takes the form of:
2857
2858{
Bu Sun Kim65020912020-05-20 12:08:20 -07002859 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
2860 { # Associates `members` with a `role`.
2861 &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.
2862 #
2863 # If the condition evaluates to `true`, then this binding applies to the current request.
2864 #
2865 # 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.
2866 #
2867 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2868 #
2869 # Example (Comparison):
2870 #
2871 # 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;
2872 #
2873 # Example (Equality):
2874 #
2875 # 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;
2876 #
2877 # Example (Logic):
2878 #
2879 # 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;
2880 #
2881 # Example (Data Manipulation):
2882 #
2883 # 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;
2884 #
2885 # 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.
2886 &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.
2887 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2888 &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.
2889 &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.
2890 },
2891 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2892 #
2893 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2894 #
2895 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2896 #
2897 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
2898 #
2899 #
2900 #
2901 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2902 #
2903 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2904 #
2905 # * `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.
2906 #
2907 # * `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.
2908 #
2909 # * `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.
2910 #
2911 #
2912 #
2913 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2914 &quot;A String&quot;,
2915 ],
2916 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2917 },
2918 ],
2919 &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.
2920 &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 -07002921 #
2922 #
2923 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002924 # 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 -07002925 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002926 # 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 -07002927 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002928 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002929 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002930 # { &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 -07002931 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002932 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002933 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002934 # 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 -07002935 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002936 # 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 -07002937 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002938 { # 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.
2939 #
2940 # 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.
2941 #
2942 # Example Policy with multiple AuditConfigs:
2943 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002944 # { &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 -07002945 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002946 # 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 -07002947 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002948 { # Provides the configuration for logging a type of permissions. Example:
2949 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002950 # { &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 -07002951 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002952 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
2953 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2954 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002955 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002956 &quot;ignoreChildExemptions&quot;: True or False,
2957 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002958 },
2959 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002960 &quot;exemptedMembers&quot;: [
2961 &quot;A String&quot;,
2962 ],
2963 &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 -07002964 },
2965 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002966 &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 -07002967 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002968 &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.
2969 #
2970 # If the condition evaluates to `true`, then this binding applies to the current request.
2971 #
2972 # 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.
2973 #
2974 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2975 #
2976 # Example (Comparison):
2977 #
2978 # 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;
2979 #
2980 # Example (Equality):
2981 #
2982 # 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;
2983 #
2984 # Example (Logic):
2985 #
2986 # 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;
2987 #
2988 # Example (Data Manipulation):
2989 #
2990 # 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;
2991 #
2992 # 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.
2993 &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.
2994 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
2995 &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.
2996 &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.
2997 },
2998 &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 -07002999 #
3000 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3001 #
3002 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3003 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003004 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003005 #
3006 #
3007 #
3008 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3009 #
3010 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3011 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003012 # * `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.
3013 #
3014 # * `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.
3015 #
3016 # * `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.
3017 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003018 #
3019 #
3020 # * `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 -07003021 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003022 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003023 &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 -07003024 },
3025 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003026 &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.
3027 #
3028 # **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.
3029 &quot;iamOwned&quot;: True or False,
3030 &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.
3031 { # A rule to be applied in a Policy.
3032 &quot;action&quot;: &quot;A String&quot;, # Required
3033 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3034 { # A condition to be met.
3035 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
3036 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
3037 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
3038 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3039 &quot;values&quot;: [ # The objects of the condition.
3040 &quot;A String&quot;,
3041 ],
3042 },
3043 ],
3044 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
3045 &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.
3046 &quot;A String&quot;,
3047 ],
3048 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3049 { # Specifies what kind of log the caller must write
3050 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
3051 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3052 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
3053 },
3054 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
3055 },
3056 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
3057 #
3058 # 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.
3059 #
3060 # Field names correspond to IAM request parameters and field values are their respective values.
3061 #
3062 # 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.
3063 #
3064 # 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]}
3065 &quot;customFields&quot;: [ # Custom fields.
3066 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3067 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
3068 &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.
3069 },
3070 ],
3071 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
3072 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
3073 },
3074 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
3075 &quot;logMode&quot;: &quot;A String&quot;,
3076 },
3077 },
3078 ],
3079 &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.
3080 &quot;A String&quot;,
3081 ],
3082 &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.
3083 &quot;A String&quot;,
3084 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003085 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003086 ],
3087 &quot;version&quot;: 42, # Specifies the format of the policy.
3088 #
3089 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3090 #
3091 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3092 #
3093 # * 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
3094 #
3095 # **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.
3096 #
3097 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
3098 #
3099 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3100 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003101 }
3102
3103
3104Returns:
3105 An object of the form:
3106
Dan O'Mearadd494642020-05-01 07:42:23 -07003107 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003108 #
3109 #
3110 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003111 # 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 -07003112 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003113 # 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 -07003114 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003115 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003116 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003117 # { &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 -07003118 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003119 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003120 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003121 # 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 -07003122 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003123 # 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 -07003124 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003125 { # 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.
3126 #
3127 # 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.
3128 #
3129 # Example Policy with multiple AuditConfigs:
3130 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003131 # { &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 -07003132 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003133 # 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 -07003134 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003135 { # Provides the configuration for logging a type of permissions. Example:
3136 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003137 # { &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 -07003138 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003139 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
3140 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3141 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003142 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003143 &quot;ignoreChildExemptions&quot;: True or False,
3144 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003145 },
3146 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003147 &quot;exemptedMembers&quot;: [
3148 &quot;A String&quot;,
3149 ],
3150 &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 -07003151 },
3152 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003153 &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 -07003154 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003155 &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.
3156 #
3157 # If the condition evaluates to `true`, then this binding applies to the current request.
3158 #
3159 # 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.
3160 #
3161 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3162 #
3163 # Example (Comparison):
3164 #
3165 # 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;
3166 #
3167 # Example (Equality):
3168 #
3169 # 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;
3170 #
3171 # Example (Logic):
3172 #
3173 # 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;
3174 #
3175 # Example (Data Manipulation):
3176 #
3177 # 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;
3178 #
3179 # 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.
3180 &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.
3181 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
3182 &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.
3183 &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.
3184 },
3185 &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 -07003186 #
3187 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3188 #
3189 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3190 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003191 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003192 #
3193 #
3194 #
3195 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3196 #
3197 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3198 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003199 # * `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.
3200 #
3201 # * `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.
3202 #
3203 # * `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.
3204 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003205 #
3206 #
3207 # * `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 -07003208 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003209 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003210 &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 -07003211 },
3212 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003213 &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.
3214 #
3215 # **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.
3216 &quot;iamOwned&quot;: True or False,
3217 &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.
3218 { # A rule to be applied in a Policy.
3219 &quot;action&quot;: &quot;A String&quot;, # Required
3220 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3221 { # A condition to be met.
3222 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
3223 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
3224 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
3225 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3226 &quot;values&quot;: [ # The objects of the condition.
3227 &quot;A String&quot;,
3228 ],
3229 },
3230 ],
3231 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
3232 &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.
3233 &quot;A String&quot;,
3234 ],
3235 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3236 { # Specifies what kind of log the caller must write
3237 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
3238 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3239 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
3240 },
3241 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
3242 },
3243 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
3244 #
3245 # 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.
3246 #
3247 # Field names correspond to IAM request parameters and field values are their respective values.
3248 #
3249 # 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.
3250 #
3251 # 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]}
3252 &quot;customFields&quot;: [ # Custom fields.
3253 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3254 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
3255 &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.
3256 },
3257 ],
3258 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
3259 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
3260 },
3261 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
3262 &quot;logMode&quot;: &quot;A String&quot;,
3263 },
3264 },
3265 ],
3266 &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.
3267 &quot;A String&quot;,
3268 ],
3269 &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.
3270 &quot;A String&quot;,
3271 ],
3272 },
3273 ],
3274 &quot;version&quot;: 42, # Specifies the format of the policy.
3275 #
3276 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3277 #
3278 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3279 #
3280 # * 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
3281 #
3282 # **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.
3283 #
3284 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
3285 #
3286 # 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 -07003287 }</pre>
3288</div>
3289
3290<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003291 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003292 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003293
3294Args:
3295 project: string, Project ID for this request. (required)
3296 zone: string, The name of the zone for this request. (required)
3297 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003298 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003299 The object takes the form of:
3300
3301{
Bu Sun Kim65020912020-05-20 12:08:20 -07003302 &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.
3303 &quot;labels&quot;: {
3304 &quot;a_key&quot;: &quot;A String&quot;,
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003305 },
3306 }
3307
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003308 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.
3309
3310For 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.
3311
3312The 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 -04003313
3314Returns:
3315 An object of the form:
3316
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003317 { # Represents an Operation resource.
3318 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003319 # Google Compute Engine has three Operation resources:
3320 #
3321 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3322 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003323 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3324 #
3325 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003326 # - For global operations, use the `globalOperations` resource.
3327 # - For regional operations, use the `regionOperations` resource.
3328 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003329 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003330 # 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 -07003331 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3332 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3333 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3334 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3335 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3336 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003337 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003338 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3339 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3340 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003341 },
3342 ],
3343 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003344 &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`.
3345 &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.
3346 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3347 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3348 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3349 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3350 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3351 &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.
3352 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3353 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3354 &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.
3355 &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`.
3356 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3357 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3358 &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.
3359 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3360 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3361 {
3362 &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.
3363 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3364 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3365 {
3366 &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).
3367 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3368 },
3369 ],
3370 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3371 },
3372 ],
3373 &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 -04003374 }</pre>
3375</div>
3376
3377<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003378 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003379 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
3380
3381Args:
3382 project: string, Project ID for this request. (required)
3383 zone: string, The name of the zone for this request. (required)
3384 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003385 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003386 The object takes the form of:
3387
3388{
Bu Sun Kim65020912020-05-20 12:08:20 -07003389 &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 -07003390 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003391 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
3392 &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 -07003393 },
3394 ],
3395 }
3396
3397 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.
3398
3399For 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.
3400
3401The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3402
3403Returns:
3404 An object of the form:
3405
3406 { # Represents an Operation resource.
3407 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003408 # Google Compute Engine has three Operation resources:
3409 #
3410 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3411 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003412 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3413 #
3414 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003415 # - For global operations, use the `globalOperations` resource.
3416 # - For regional operations, use the `regionOperations` resource.
3417 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003418 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003419 # 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 -07003420 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3421 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3422 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3423 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3424 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3425 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003426 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003427 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3428 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3429 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003430 },
3431 ],
3432 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003433 &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`.
3434 &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.
3435 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3436 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3437 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3438 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3439 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3440 &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.
3441 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3442 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3443 &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.
3444 &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`.
3445 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3446 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3447 &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.
3448 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3449 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3450 {
3451 &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.
3452 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3453 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3454 {
3455 &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).
3456 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3457 },
3458 ],
3459 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3460 },
3461 ],
3462 &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 -07003463 }</pre>
3464</div>
3465
3466<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003467 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003468 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
3469
3470Args:
3471 project: string, Project ID for this request. (required)
3472 zone: string, The name of the zone for this request. (required)
3473 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003474 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003475 The object takes the form of:
3476
3477{
Bu Sun Kim65020912020-05-20 12:08:20 -07003478 &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 -08003479 }
3480
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003481 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.
3482
3483For 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.
3484
3485The 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 -08003486
3487Returns:
3488 An object of the form:
3489
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003490 { # Represents an Operation resource.
3491 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003492 # Google Compute Engine has three Operation resources:
3493 #
3494 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3495 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003496 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3497 #
3498 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003499 # - For global operations, use the `globalOperations` resource.
3500 # - For regional operations, use the `regionOperations` resource.
3501 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003502 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003503 # 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 -07003504 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3505 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3506 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3507 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3508 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3509 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003510 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003511 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3512 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3513 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003514 },
3515 ],
3516 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003517 &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`.
3518 &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.
3519 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3520 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3521 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3522 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3523 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3524 &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.
3525 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3526 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3527 &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.
3528 &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`.
3529 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3530 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3531 &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.
3532 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3533 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3534 {
3535 &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.
3536 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3537 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3538 {
3539 &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).
3540 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3541 },
3542 ],
3543 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3544 },
3545 ],
3546 &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 -04003547 }</pre>
3548</div>
3549
3550<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003551 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003552 <pre>Sets metadata for the specified instance to the data included in the request.
3553
3554Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003555 project: string, Project ID for this request. (required)
3556 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04003557 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003558 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04003559 The object takes the form of:
3560
3561{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -07003562 &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 -07003563 #
3564 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07003565 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3566 {
3567 &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.
3568 &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).
3569 },
3570 ],
3571 &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 -04003572}
3573
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003574 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.
3575
3576For 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.
3577
3578The 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 -04003579
3580Returns:
3581 An object of the form:
3582
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003583 { # Represents an Operation resource.
3584 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003585 # Google Compute Engine has three Operation resources:
3586 #
3587 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3588 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003589 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3590 #
3591 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003592 # - For global operations, use the `globalOperations` resource.
3593 # - For regional operations, use the `regionOperations` resource.
3594 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003595 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003596 # 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 -07003597 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3598 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3599 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3600 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3601 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3602 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003603 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003604 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3605 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3606 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04003607 },
3608 ],
3609 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003610 &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`.
3611 &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.
3612 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3613 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3614 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3615 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3616 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3617 &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.
3618 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3619 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3620 &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.
3621 &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`.
3622 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3623 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3624 &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.
3625 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3626 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3627 {
3628 &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.
3629 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3630 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3631 {
3632 &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).
3633 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3634 },
3635 ],
3636 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3637 },
3638 ],
3639 &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 -04003640 }</pre>
3641</div>
3642
3643<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003644 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003645 <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.
3646
3647Args:
3648 project: string, Project ID for this request. (required)
3649 zone: string, The name of the zone for this request. (required)
3650 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003651 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003652 The object takes the form of:
3653
3654{
Bu Sun Kim65020912020-05-20 12:08:20 -07003655 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu/platform this instance should be started at.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003656 }
3657
3658 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.
3659
3660For 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.
3661
3662The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3663
3664Returns:
3665 An object of the form:
3666
3667 { # Represents an Operation resource.
3668 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003669 # Google Compute Engine has three Operation resources:
3670 #
3671 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3672 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003673 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3674 #
3675 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003676 # - For global operations, use the `globalOperations` resource.
3677 # - For regional operations, use the `regionOperations` resource.
3678 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003679 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003680 # 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 -07003681 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3682 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3683 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3684 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3685 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3686 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003687 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003688 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3689 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3690 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003691 },
3692 ],
3693 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003694 &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`.
3695 &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.
3696 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3697 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3698 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3699 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3700 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3701 &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.
3702 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3703 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3704 &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.
3705 &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`.
3706 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3707 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3708 &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.
3709 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3710 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3711 {
3712 &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.
3713 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3714 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3715 {
3716 &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).
3717 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3718 },
3719 ],
3720 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3721 },
3722 ],
3723 &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 -07003724 }</pre>
3725</div>
3726
3727<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003728 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07003729 <pre>Sets an instance&#x27;s scheduling options.
John Asmuth614db982014-04-24 15:46:26 -04003730
3731Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003732 project: string, Project ID for this request. (required)
3733 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003734 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003735 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04003736 The object takes the form of:
3737
Bu Sun Kim65020912020-05-20 12:08:20 -07003738{ # Sets the scheduling options for an Instance. NextID: 11
3739 &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 -04003740 #
3741 # 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 -07003742 &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 -07003743 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Bu Sun Kim65020912020-05-20 12:08:20 -07003744 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
3745 &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.
3746 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
3747 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003748 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003749 },
3750 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003751 &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.
3752 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
John Asmuth614db982014-04-24 15:46:26 -04003753}
3754
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003755 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.
3756
3757For 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.
3758
3759The 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 -04003760
3761Returns:
3762 An object of the form:
3763
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003764 { # Represents an Operation resource.
3765 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003766 # Google Compute Engine has three Operation resources:
3767 #
3768 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3769 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003770 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3771 #
3772 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003773 # - For global operations, use the `globalOperations` resource.
3774 # - For regional operations, use the `regionOperations` resource.
3775 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003776 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003777 # 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 -07003778 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3779 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3780 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3781 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3782 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3783 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003784 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003785 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3786 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3787 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003788 },
3789 ],
3790 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003791 &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`.
3792 &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.
3793 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3794 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3795 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3796 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3797 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3798 &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.
3799 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3800 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3801 &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.
3802 &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`.
3803 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3804 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3805 &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.
3806 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3807 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3808 {
3809 &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.
3810 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3811 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3812 {
3813 &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).
3814 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3815 },
3816 ],
3817 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3818 },
3819 ],
3820 &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 -04003821 }</pre>
3822</div>
3823
3824<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003825 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003826 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
3827
3828Args:
3829 project: string, Project ID for this request. (required)
3830 zone: string, The name of the zone for this request. (required)
3831 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003832 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003833 The object takes the form of:
3834
3835{
Bu Sun Kim65020912020-05-20 12:08:20 -07003836 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
3837 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
3838 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003839 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003840 }
3841
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003842 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.
3843
3844For 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.
3845
3846The 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 -04003847
3848Returns:
3849 An object of the form:
3850
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003851 { # Represents an Operation resource.
3852 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003853 # Google Compute Engine has three Operation resources:
3854 #
3855 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3856 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003857 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3858 #
3859 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003860 # - For global operations, use the `globalOperations` resource.
3861 # - For regional operations, use the `regionOperations` resource.
3862 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003863 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003864 # 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 -07003865 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3866 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3867 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3868 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3869 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3870 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003871 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003872 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3873 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3874 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04003875 },
3876 ],
3877 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003878 &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`.
3879 &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.
3880 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3881 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3882 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3883 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3884 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3885 &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.
3886 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3887 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3888 &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.
3889 &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`.
3890 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3891 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3892 &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.
3893 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3894 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3895 {
3896 &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.
3897 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3898 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3899 {
3900 &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).
3901 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3902 },
3903 ],
3904 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3905 },
3906 ],
3907 &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 -04003908 }</pre>
3909</div>
3910
3911<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003912 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003913 <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.
3914
3915Args:
3916 project: string, Project ID for this request. (required)
3917 zone: string, The name of the zone for this request. (required)
3918 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003919 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003920 The object takes the form of:
3921
3922{ # The policy describes the baseline against which Instance boot integrity is measured.
Bu Sun Kim65020912020-05-20 12:08:20 -07003923 &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 -07003924}
John Asmuth614db982014-04-24 15:46:26 -04003925
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003926 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.
3927
3928For 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.
3929
3930The 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 -04003931
3932Returns:
3933 An object of the form:
3934
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003935 { # Represents an Operation resource.
3936 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003937 # Google Compute Engine has three Operation resources:
3938 #
3939 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3940 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003941 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3942 #
3943 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003944 # - For global operations, use the `globalOperations` resource.
3945 # - For regional operations, use the `regionOperations` resource.
3946 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003947 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003948 # 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 -07003949 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3950 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3951 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
3952 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3953 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3954 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003955 {
Bu Sun Kim65020912020-05-20 12:08:20 -07003956 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3957 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3958 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
John Asmuth614db982014-04-24 15:46:26 -04003959 },
3960 ],
3961 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003962 &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`.
3963 &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.
3964 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3965 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3966 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3967 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3968 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3969 &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.
3970 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3971 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3972 &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.
3973 &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`.
3974 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
3975 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3976 &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.
3977 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
3978 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3979 {
3980 &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.
3981 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
3982 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
3983 {
3984 &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).
3985 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3986 },
3987 ],
3988 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3989 },
3990 ],
3991 &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.
3992 }</pre>
3993</div>
3994
3995<div class="method">
3996 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
3997 <pre>Sets network tags for the specified instance to the data included in the request.
3998
3999Args:
4000 project: string, Project ID for this request. (required)
4001 zone: string, The name of the zone for this request. (required)
4002 instance: string, Name of the instance scoping this request. (required)
4003 body: object, The request body.
4004 The object takes the form of:
4005
4006{ # A set of instance tags.
4007 &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.
4008 #
4009 # To see the latest fingerprint, make get() request to the instance.
4010 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4011 &quot;A String&quot;,
4012 ],
4013}
4014
4015 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.
4016
4017For 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.
4018
4019The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4020
4021Returns:
4022 An object of the form:
4023
4024 { # Represents an Operation resource.
4025 #
4026 # Google Compute Engine has three Operation resources:
4027 #
4028 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4029 #
4030 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4031 #
4032 # Operations can be global, regional or zonal.
4033 # - For global operations, use the `globalOperations` resource.
4034 # - For regional operations, use the `regionOperations` resource.
4035 # - For zonal operations, use the `zonalOperations` resource.
4036 #
4037 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4038 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4039 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4040 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4041 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4042 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4043 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
4044 {
4045 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4046 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4047 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
4048 },
4049 ],
4050 },
4051 &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`.
4052 &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.
4053 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4054 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4055 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4056 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4057 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4058 &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.
4059 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4060 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4061 &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.
4062 &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`.
4063 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4064 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4065 &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.
4066 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4067 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4068 {
4069 &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.
4070 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4071 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4072 {
4073 &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).
4074 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4075 },
4076 ],
4077 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4078 },
4079 ],
4080 &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 -08004081 }</pre>
4082</div>
4083
4084<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004085 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
4086 <pre>Simulates a maintenance event on the instance.
4087
4088Args:
4089 project: string, Project ID for this request. (required)
4090 zone: string, The name of the zone for this request. (required)
4091 instance: string, Name of the instance scoping this request. (required)
4092
4093Returns:
4094 An object of the form:
4095
4096 { # Represents an Operation resource.
4097 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004098 # Google Compute Engine has three Operation resources:
4099 #
4100 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4101 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004102 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4103 #
4104 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004105 # - For global operations, use the `globalOperations` resource.
4106 # - For regional operations, use the `regionOperations` resource.
4107 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004108 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004109 # 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 -07004110 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4111 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4112 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4113 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4114 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4115 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004116 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004117 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4118 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4119 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004120 },
4121 ],
4122 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004123 &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`.
4124 &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.
4125 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4126 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4127 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4128 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4129 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4130 &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.
4131 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4132 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4133 &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.
4134 &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`.
4135 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4136 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4137 &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.
4138 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4139 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4140 {
4141 &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.
4142 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4143 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4144 {
4145 &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).
4146 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4147 },
4148 ],
4149 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4150 },
4151 ],
4152 &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 -07004153 }</pre>
4154</div>
4155
4156<div class="method">
4157 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
4158 <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 -08004159
4160Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004161 project: string, Project ID for this request. (required)
4162 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08004163 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004164 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.
4165
4166For 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.
4167
4168The 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 -08004169
4170Returns:
4171 An object of the form:
4172
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004173 { # Represents an Operation resource.
4174 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004175 # Google Compute Engine has three Operation resources:
4176 #
4177 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4178 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004179 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4180 #
4181 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004182 # - For global operations, use the `globalOperations` resource.
4183 # - For regional operations, use the `regionOperations` resource.
4184 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004185 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004186 # 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 -07004187 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4188 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4189 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4190 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4191 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4192 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citroe633be12015-03-02 13:40:36 -08004193 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004194 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4195 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4196 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citroe633be12015-03-02 13:40:36 -08004197 },
4198 ],
4199 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004200 &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`.
4201 &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.
4202 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4203 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4204 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4205 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4206 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4207 &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.
4208 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4209 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4210 &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.
4211 &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`.
4212 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4213 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4214 &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.
4215 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4216 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4217 {
4218 &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.
4219 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4220 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4221 {
4222 &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).
4223 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4224 },
4225 ],
4226 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4227 },
4228 ],
4229 &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 -08004230 }</pre>
4231</div>
4232
4233<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004234 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004235 <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 -07004236
4237Args:
4238 project: string, Project ID for this request. (required)
4239 zone: string, The name of the zone for this request. (required)
4240 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004241 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004242 The object takes the form of:
4243
4244{
Bu Sun Kim65020912020-05-20 12:08:20 -07004245 &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 -07004246 #
4247 # In order to start the instance, the disk url and its corresponding key must be provided.
4248 #
4249 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
4250 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004251 &quot;diskEncryptionKey&quot;: { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
4252 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4253 &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.
4254 &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.
4255 &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 -07004256 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004257 &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 -07004258 },
4259 ],
4260 }
4261
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004262 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.
4263
4264For 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.
4265
4266The 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 -07004267
4268Returns:
4269 An object of the form:
4270
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004271 { # Represents an Operation resource.
4272 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004273 # Google Compute Engine has three Operation resources:
4274 #
4275 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4276 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004277 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4278 #
4279 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004280 # - For global operations, use the `globalOperations` resource.
4281 # - For regional operations, use the `regionOperations` resource.
4282 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004283 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004284 # 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 -07004285 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4286 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4287 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4288 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4289 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4290 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004291 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004292 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4293 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4294 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004295 },
4296 ],
4297 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004298 &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`.
4299 &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.
4300 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4301 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4302 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4303 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4304 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4305 &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.
4306 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4307 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4308 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4309 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4310 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4311 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4312 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
4313 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4314 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4315 {
4316 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4317 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4318 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4319 {
4320 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
4321 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4322 },
4323 ],
4324 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4325 },
4326 ],
4327 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004328 }</pre>
4329</div>
4330
4331<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004332 <code class="details" id="stop">stop(project, zone, instance, requestId=None)</code>
4333 <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 -08004334
4335Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004336 project: string, Project ID for this request. (required)
4337 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004338 instance: string, Name of the instance resource to stop. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004339 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.
4340
4341For 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.
4342
4343The 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 -08004344
4345Returns:
4346 An object of the form:
4347
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004348 { # Represents an Operation resource.
4349 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004350 # Google Compute Engine has three Operation resources:
4351 #
4352 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4353 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004354 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4355 #
4356 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004357 # - For global operations, use the `globalOperations` resource.
4358 # - For regional operations, use the `regionOperations` resource.
4359 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004360 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004361 # 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 -07004362 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4363 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4364 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4365 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4366 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4367 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004368 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004369 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4370 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4371 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004372 },
4373 ],
4374 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004375 &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`.
4376 &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.
4377 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4378 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4379 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4380 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4381 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4382 &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.
4383 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4384 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4385 &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.
4386 &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`.
4387 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4388 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4389 &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.
4390 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4391 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4392 {
4393 &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.
4394 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4395 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4396 {
4397 &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).
4398 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4399 },
4400 ],
4401 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4402 },
4403 ],
4404 &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 -07004405 }</pre>
4406</div>
4407
4408<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004409 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004410 <pre>Returns permissions that a caller has on the specified resource.
4411
4412Args:
4413 project: string, Project ID for this request. (required)
4414 zone: string, The name of the zone for this request. (required)
4415 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004416 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004417 The object takes the form of:
4418
4419{
Bu Sun Kim65020912020-05-20 12:08:20 -07004420 &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.
4421 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004422 ],
4423 }
4424
4425
4426Returns:
4427 An object of the form:
4428
4429 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004430 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
4431 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004432 ],
4433 }</pre>
4434</div>
4435
4436<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07004437 <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 -07004438 <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.
4439
4440Args:
4441 project: string, Project ID for this request. (required)
4442 zone: string, The name of the zone for this request. (required)
4443 instance: string, Name of the instance resource to update. (required)
4444 body: object, The request body.
4445 The object takes the form of:
4446
4447{ # Represents an Instance resource.
4448 #
4449 # 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 -07004450 &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.
4451 &quot;cpuPlatform&quot;: &quot;A String&quot;, # [Output Only] The CPU platform used by this instance.
4452 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
4453 &quot;deletionProtection&quot;: True or False, # Whether the resource should be protected against deletion.
4454 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
4455 &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 -07004456 { # An instance-attached disk resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07004457 &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).
4458 &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.
4459 &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.
4460 #
4461 # 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.
4462 &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 -07004463 #
4464 # 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.
4465 #
4466 # 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.
4467 #
4468 # 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.
4469 #
4470 # 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 -07004471 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4472 &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.
4473 &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.
4474 &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 -07004475 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004476 &quot;diskSizeGb&quot;: &quot;A String&quot;, # The size of the disk in GB.
4477 &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.
4478 { # Guest OS features.
4479 &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.
4480 },
4481 ],
4482 &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.
4483 &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 -07004484 #
4485 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
4486 #
4487 # 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 -07004488 &quot;description&quot;: &quot;A String&quot;, # An optional description. Provide this property when creating the disk.
4489 &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.
4490 &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.
4491 &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 -07004492 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
4493 #
4494 #
4495 # 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:
4496 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
4497 # - projects/project/zones/zone/diskTypes/diskType
4498 # - 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 -07004499 &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.
4500 &quot;a_key&quot;: &quot;A String&quot;,
4501 },
4502 &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.
4503 &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.
4504 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07004505 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004506 &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 -07004507 #
4508 # 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:
4509 # projects/debian-cloud/global/images/family/debian-9
4510 #
4511 #
4512 # Alternatively, use a specific version of a public operating system image:
4513 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
4514 #
4515 #
4516 # To create a disk with a custom image that you created, specify the image name in the following format:
4517 # global/images/my-custom-image
4518 #
4519 #
4520 # 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:
4521 # global/images/family/my-image-family
4522 #
4523 #
4524 # If the source image is deleted later, this field will not be set.
Bu Sun Kim65020912020-05-20 12:08:20 -07004525 &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.
4526 #
4527 # 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.
4528 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4529 &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.
4530 &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.
4531 &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.
4532 },
4533 &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.
4534 #
4535 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
4536 # global/snapshots/my-backup
4537 #
4538 #
4539 # If the source snapshot is deleted later, this field will not be set.
4540 &quot;sourceSnapshotEncryptionKey&quot;: { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
4541 &quot;kmsKeyName&quot;: &quot;A String&quot;, # The name of the encryption key that is stored in Google Cloud KMS.
4542 &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.
4543 &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.
4544 &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 -07004545 },
4546 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004547 &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.
4548 &quot;kind&quot;: &quot;compute#attachedDisk&quot;, # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
4549 &quot;licenses&quot;: [ # [Output Only] Any valid publicly visible licenses.
4550 &quot;A String&quot;,
4551 ],
4552 &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.
4553 &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
4554 &quot;dbs&quot;: [ # The Key Database (db).
Dan O'Mearadd494642020-05-01 07:42:23 -07004555 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004556 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4557 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004558 },
4559 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004560 &quot;dbxs&quot;: [ # The forbidden key database (dbx).
Dan O'Mearadd494642020-05-01 07:42:23 -07004561 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004562 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4563 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004564 },
4565 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004566 &quot;keks&quot;: [ # The Key Exchange Key (KEK).
Dan O'Mearadd494642020-05-01 07:42:23 -07004567 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004568 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4569 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004570 },
4571 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004572 &quot;pk&quot;: { # The Platform Key (PK).
4573 &quot;content&quot;: &quot;A String&quot;, # The raw content in the secure keys file.
4574 &quot;fileType&quot;: &quot;A String&quot;, # The file type of source file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004575 },
4576 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004577 &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 -07004578 #
4579 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
4580 #
4581 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Bu Sun Kim65020912020-05-20 12:08:20 -07004582 &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 -07004583 },
4584 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004585 &quot;displayDevice&quot;: { # A set of Display Device options # Enables display device for the instance.
4586 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
4587 },
4588 &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.
4589 #
4590 # To see the latest fingerprint, make get() request to the instance.
4591 &quot;guestAccelerators&quot;: [ # A list of the type and count of accelerator cards attached to the instance.
4592 { # A specification of the type and number of accelerator cards attached to the instance.
4593 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
4594 &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.
4595 },
4596 ],
4597 &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.
4598 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4599 &quot;kind&quot;: &quot;compute#instance&quot;, # [Output Only] Type of the resource. Always compute#instance for instances.
4600 &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.
4601 #
4602 # To see the latest fingerprint, make get() request to the instance.
4603 &quot;labels&quot;: { # Labels to apply to this instance. These can be later modified by the setLabels method.
4604 &quot;a_key&quot;: &quot;A String&quot;,
4605 },
4606 &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:
4607 # zones/us-central1-f/machineTypes/n1-standard-1
4608 #
4609 #
4610 # 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):
4611 # zones/zone/machineTypes/custom-CPUS-MEMORY
4612 #
4613 #
4614 # For example: zones/us-central1-f/machineTypes/custom-4-5120
4615 #
4616 # For a full list of restrictions, read the Specifications for custom machine types.
4617 &quot;metadata&quot;: { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
4618 &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.
4619 #
4620 # To see the latest fingerprint, make a get() request to retrieve the resource.
4621 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4622 {
4623 &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.
4624 &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).
4625 },
4626 ],
4627 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
4628 },
4629 &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;.
4630 &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.
4631 &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.
4632 { # A network interface resource attached to an instance.
4633 &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.
4634 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
4635 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4636 &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.
4637 &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.
4638 &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.
4639 #
4640 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4641 #
4642 # 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.
4643 &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.
4644 &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.
4645 &quot;type&quot;: &quot;ONE_TO_ONE_NAT&quot;, # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
4646 },
4647 ],
4648 &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.
4649 { # An alias IP range attached to an instance&#x27;s network interface.
4650 &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).
4651 &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.
4652 },
4653 ],
4654 &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.
4655 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
4656 &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.
4657 &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.
4658 #
4659 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
4660 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
4661 # - projects/project/global/networks/network
4662 # - global/networks/default
4663 &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.
4664 &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:
4665 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
4666 # - regions/region/subnetworks/subnetwork
4667 },
4668 ],
4669 &quot;reservationAffinity&quot;: { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
4670 &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.
4671 &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.
4672 &quot;values&quot;: [ # Corresponds to the label values of a reservation resource.
4673 &quot;A String&quot;,
4674 ],
4675 },
4676 &quot;resourcePolicies&quot;: [ # Resource policies applied to this instance.
4677 &quot;A String&quot;,
4678 ],
4679 &quot;scheduling&quot;: { # Sets the scheduling options for an Instance. NextID: 11 # Sets the scheduling options for this instance.
4680 &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.
4681 #
4682 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
4683 &quot;nodeAffinities&quot;: [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
4684 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
4685 &quot;key&quot;: &quot;A String&quot;, # Corresponds to the label key of Node resource.
4686 &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.
4687 &quot;values&quot;: [ # Corresponds to the label values of Node resource.
4688 &quot;A String&quot;,
4689 ],
4690 },
4691 ],
4692 &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.
4693 &quot;preemptible&quot;: True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
4694 },
4695 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
4696 &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.
4697 #
4698 # 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.
4699 { # A service account.
4700 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
4701 &quot;scopes&quot;: [ # The list of scopes to be made available for this service account.
4702 &quot;A String&quot;,
4703 ],
4704 },
4705 ],
4706 &quot;shieldedInstanceConfig&quot;: { # A set of Shielded Instance options.
4707 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
4708 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
4709 &quot;enableVtpm&quot;: True or False, # Defines whether the instance has the vTPM enabled. Enabled by default.
4710 },
4711 &quot;shieldedInstanceIntegrityPolicy&quot;: { # The policy describes the baseline against which Instance boot integrity is measured.
4712 &quot;updateAutoLearnPolicy&quot;: True or False, # Updates the integrity policy baseline using the measurements from the VM instance&#x27;s most recent boot.
4713 },
4714 &quot;startRestricted&quot;: True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
4715 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
4716 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable explanation of the status.
4717 &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.
4718 &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.
4719 #
4720 # To see the latest fingerprint, make get() request to the instance.
4721 &quot;items&quot;: [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4722 &quot;A String&quot;,
4723 ],
4724 },
4725 &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 -07004726}
4727
4728 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.
4729 Allowed values
4730 INVALID -
4731 NO_EFFECT -
4732 REFRESH -
4733 RESTART -
Bu Sun Kim65020912020-05-20 12:08:20 -07004734 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.
4735 Allowed values
4736 INVALID -
4737 NO_EFFECT -
4738 REFRESH -
4739 RESTART -
Dan O'Mearadd494642020-05-01 07:42:23 -07004740 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.
4741
4742For 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.
4743
4744The 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 -07004745
4746Returns:
4747 An object of the form:
4748
4749 { # Represents an Operation resource.
4750 #
4751 # Google Compute Engine has three Operation resources:
4752 #
4753 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4754 #
4755 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4756 #
4757 # Operations can be global, regional or zonal.
4758 # - For global operations, use the `globalOperations` resource.
4759 # - For regional operations, use the `regionOperations` resource.
4760 # - For zonal operations, use the `zonalOperations` resource.
4761 #
4762 # 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 -07004763 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4764 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4765 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4766 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4767 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4768 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004769 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004770 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4771 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4772 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07004773 },
4774 ],
4775 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004776 &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`.
4777 &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.
4778 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4779 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4780 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4781 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4782 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4783 &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.
4784 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4785 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4786 &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.
4787 &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`.
4788 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4789 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4790 &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.
4791 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4792 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4793 {
4794 &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.
4795 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4796 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4797 {
4798 &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).
4799 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4800 },
4801 ],
4802 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4803 },
4804 ],
4805 &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 -07004806 }</pre>
4807</div>
4808
4809<div class="method">
4810 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07004811 <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 -07004812
4813Args:
4814 project: string, Project ID for this request. (required)
4815 zone: string, The name of the zone for this request. (required)
4816 instance: string, The instance name for this request. (required)
4817 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004818 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004819 The object takes the form of:
4820
Bu Sun Kim65020912020-05-20 12:08:20 -07004821{ # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
4822 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4823 &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.
4824 &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.
4825 &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 -07004826 #
4827 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4828 #
4829 # 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 -07004830 &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.
4831 &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.
4832 &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 -07004833}
4834
4835 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.
4836
4837For 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.
4838
4839The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4840
4841Returns:
4842 An object of the form:
4843
4844 { # Represents an Operation resource.
4845 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004846 # Google Compute Engine has three Operation resources:
4847 #
4848 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4849 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004850 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4851 #
4852 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004853 # - For global operations, use the `globalOperations` resource.
4854 # - For regional operations, use the `regionOperations` resource.
4855 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004856 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004857 # 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 -07004858 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4859 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4860 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4861 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4862 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4863 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004864 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004865 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4866 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4867 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004868 },
4869 ],
4870 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004871 &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`.
4872 &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.
4873 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4874 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4875 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4876 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4877 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4878 &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.
4879 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4880 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4881 &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.
4882 &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`.
4883 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4884 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4885 &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.
4886 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4887 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4888 {
4889 &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.
4890 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4891 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4892 {
4893 &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).
4894 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4895 },
4896 ],
4897 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4898 },
4899 ],
4900 &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 -07004901 }</pre>
4902</div>
4903
4904<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004905 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
4906 <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.
4907
4908Args:
4909 project: string, Project ID for this request. (required)
4910 zone: string, The name of the zone for this request. (required)
4911 instance: string, Name of the instance scoping this request. (required)
4912 body: object, The request body.
4913 The object takes the form of:
4914
4915{ # A set of Display Device options
Bu Sun Kim65020912020-05-20 12:08:20 -07004916 &quot;enableDisplay&quot;: True or False, # Defines whether the instance has Display enabled.
Dan O'Mearadd494642020-05-01 07:42:23 -07004917}
4918
4919 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.
4920
4921For 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.
4922
4923The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4924
4925Returns:
4926 An object of the form:
4927
4928 { # Represents an Operation resource.
4929 #
4930 # Google Compute Engine has three Operation resources:
4931 #
4932 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4933 #
4934 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4935 #
4936 # Operations can be global, regional or zonal.
4937 # - For global operations, use the `globalOperations` resource.
4938 # - For regional operations, use the `regionOperations` resource.
4939 # - For zonal operations, use the `zonalOperations` resource.
4940 #
4941 # 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 -07004942 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4943 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
4944 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
4945 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4946 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4947 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004948 {
Bu Sun Kim65020912020-05-20 12:08:20 -07004949 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
4950 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4951 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07004952 },
4953 ],
4954 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004955 &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`.
4956 &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.
4957 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4958 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4959 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4960 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
4961 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4962 &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.
4963 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4964 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
4965 &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.
4966 &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`.
4967 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
4968 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4969 &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.
4970 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
4971 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4972 {
4973 &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.
4974 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
4975 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
4976 {
4977 &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).
4978 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
4979 },
4980 ],
4981 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
4982 },
4983 ],
4984 &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 -07004985 }</pre>
4986</div>
4987
4988<div class="method">
4989 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07004990 <pre>Updates an instance&#x27;s network interface. This method follows PATCH semantics.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004991
4992Args:
4993 project: string, Project ID for this request. (required)
4994 zone: string, The name of the zone for this request. (required)
4995 instance: string, The instance name for this request. (required)
4996 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004997 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004998 The object takes the form of:
4999
5000{ # A network interface resource attached to an instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07005001 &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.
5002 { # An access configuration attached to an instance&#x27;s network interface. Only one access config per instance is supported.
5003 &quot;kind&quot;: &quot;compute#accessConfig&quot;, # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5004 &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.
5005 &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.
5006 &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.
5007 #
5008 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5009 #
5010 # 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.
5011 &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.
5012 &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.
5013 &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 -07005014 },
5015 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07005016 &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.
5017 { # An alias IP range attached to an instance&#x27;s network interface.
5018 &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).
5019 &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.
5020 },
5021 ],
5022 &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.
5023 &quot;kind&quot;: &quot;compute#networkInterface&quot;, # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
5024 &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.
5025 &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 -07005026 #
5027 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
5028 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5029 # - projects/project/global/networks/network
5030 # - global/networks/default
Bu Sun Kim65020912020-05-20 12:08:20 -07005031 &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.
5032 &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 -07005033 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
5034 # - regions/region/subnetworks/subnetwork
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005035}
5036
5037 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.
5038
5039For 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.
5040
5041The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5042
5043Returns:
5044 An object of the form:
5045
5046 { # Represents an Operation resource.
5047 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005048 # Google Compute Engine has three Operation resources:
5049 #
5050 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5051 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005052 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5053 #
5054 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005055 # - For global operations, use the `globalOperations` resource.
5056 # - For regional operations, use the `regionOperations` resource.
5057 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005058 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005059 # 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 -07005060 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5061 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5062 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5063 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5064 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5065 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005066 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005067 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5068 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5069 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005070 },
5071 ],
5072 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005073 &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`.
5074 &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.
5075 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5076 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5077 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5078 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5079 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5080 &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.
5081 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5082 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5083 &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.
5084 &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`.
5085 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5086 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5087 &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.
5088 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5089 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5090 {
5091 &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.
5092 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5093 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5094 {
5095 &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).
5096 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5097 },
5098 ],
5099 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5100 },
5101 ],
5102 &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 -07005103 }</pre>
5104</div>
5105
5106<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005107 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005108 <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.
5109
5110Args:
5111 project: string, Project ID for this request. (required)
5112 zone: string, The name of the zone for this request. (required)
5113 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005114 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005115 The object takes the form of:
5116
5117{ # A set of Shielded Instance options.
Bu Sun Kim65020912020-05-20 12:08:20 -07005118 &quot;enableIntegrityMonitoring&quot;: True or False, # Defines whether the instance has integrity monitoring enabled. Enabled by default.
5119 &quot;enableSecureBoot&quot;: True or False, # Defines whether the instance has Secure Boot enabled. Disabled by default.
5120 &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 -07005121}
5122
5123 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.
5124
5125For 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.
5126
5127The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5128
5129Returns:
5130 An object of the form:
5131
5132 { # Represents an Operation resource.
5133 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005134 # Google Compute Engine has three Operation resources:
5135 #
5136 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5137 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005138 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5139 #
5140 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005141 # - For global operations, use the `globalOperations` resource.
5142 # - For regional operations, use the `regionOperations` resource.
5143 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005144 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005145 # 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 -07005146 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5147 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
5148 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
5149 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5150 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5151 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citroe633be12015-03-02 13:40:36 -08005152 {
Bu Sun Kim65020912020-05-20 12:08:20 -07005153 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
5154 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5155 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Craig Citroe633be12015-03-02 13:40:36 -08005156 },
5157 ],
5158 },
Bu Sun Kim65020912020-05-20 12:08:20 -07005159 &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`.
5160 &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.
5161 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5162 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5163 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5164 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
5165 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5166 &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.
5167 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5168 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
5169 &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.
5170 &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`.
5171 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
5172 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5173 &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.
5174 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
5175 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5176 {
5177 &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.
5178 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
5179 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
5180 {
5181 &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).
5182 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
5183 },
5184 ],
5185 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
5186 },
5187 ],
5188 &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 -04005189 }</pre>
5190</div>
5191
5192</body></html>