blob: 82d4c8d5002223e37cd3c79ce3bd5d9df97ece50 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Adds an access config to an instance's network interface.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
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">
84 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Retrieves aggregated list of all of the instances in your project across all regions and zones.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070086<p class="toc_element">
87 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040091<p class="firstline">Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070092<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
95<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</a></code></p>
106<p class="firstline">Returns effective firewalls applied to an interface of the instance.</p>
107<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</a></code></p>
109<p class="firstline">Returns the specified guest attributes entry.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#getScreenshot">getScreenshot(project, zone, instance)</a></code></p>
115<p class="firstline">Returns the screenshot from the specified instance.</p>
116<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700117 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700119<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
121<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
122<p class="toc_element">
123 <code><a href="#getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</a></code></p>
124<p class="firstline">Returns the Shielded VM Identity of an instance</p>
125<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700126 <code><a href="#insert">insert(project, zone, body=None, sourceInstanceTemplate=None, sourceMachineImage=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700127<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
128<p class="toc_element">
129 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
130<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
131<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400132 <code><a href="#listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, maxResults=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133<p class="firstline">Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400134<p class="toc_element">
135 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
136<p class="firstline">Retrieves the next page of results.</p>
137<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700138 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
139<p class="firstline">Retrieves the next page of results.</p>
140<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
142<p class="firstline">Removes resource policies from an instance.</p>
143<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
145<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#resume">resume(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148<p class="firstline">Resumes an instance that was suspended using the instances().suspend method.</p>
149<p class="toc_element">
150 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
151<p class="firstline">Sets deletion protection on the instance.</p>
152<p class="toc_element">
153 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700154<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
155<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#setLabels">setLabels(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400163<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
164<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 <code><a href="#setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700166<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
167<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 <code><a href="#setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700169<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
170<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172<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>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400173<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 <code><a href="#setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700175<p class="firstline">Sets an instance's scheduling options.</p>
176<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400178<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>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800179<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700181<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700182<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 <code><a href="#setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700184<p class="firstline">Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700185<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 <code><a href="#setTags">setTags(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187<p class="firstline">Sets network tags for the specified instance to the data included in the request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700188<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
190<p class="firstline">Simulates a maintenance event on the instance.</p>
191<p class="toc_element">
192 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
193<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
194<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700196<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
197<p class="toc_element">
198 <code><a href="#stop">stop(project, zone, instance, requestId=None)</a></code></p>
199<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>
200<p class="toc_element">
201 <code><a href="#suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
202<p class="firstline">This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700203<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700204 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700205<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700207 <code><a href="#update">update(project, zone, instance, body=None, minimalAction=None, requestId=None, mostDisruptiveAllowedAction=None)</a></code></p>
208<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>
209<p class="toc_element">
210 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211<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>
212<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700213 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214<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>
215<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700216 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217<p class="firstline">Updates an instance's network interface. This method follows PATCH semantics.</p>
218<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220<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>
221<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700222 <code><a href="#updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223<p class="firstline">Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700224<h3>Method Details</h3>
225<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700227 <pre>Adds an access config to an instance's network interface.
228
229Args:
230 project: string, Project ID for this request. (required)
231 zone: string, The name of the zone for this request. (required)
232 instance: string, The instance name for this request. (required)
233 networkInterface: string, The name of the network interface to add to this instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700234 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700235 The object takes the form of:
236
237{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
238 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 "name": "A String", # 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.
240 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
241 #
242 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
243 #
244 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700245 "natIP": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700246 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
247 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
248 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700249}
250
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 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.
252
253For 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.
254
255The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700256
257Returns:
258 An object of the form:
259
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 { # Represents an Operation resource.
261 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700262 # Google Compute Engine has three Operation resources:
263 #
264 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
265 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700266 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
267 #
268 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700269 # - For global operations, use the `globalOperations` resource.
270 # - For regional operations, use the `regionOperations` resource.
271 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700273 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700274 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700275 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400276 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700279 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700280 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
281 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700282 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700283 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700284 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700285 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700286 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
287 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
288 {
289 "message": "A String", # [Output Only] A human-readable description of the warning code.
290 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
291 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
292 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
293 {
294 "value": "A String", # [Output Only] A warning data value corresponding to the key.
295 "key": "A String", # [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).
296 },
297 ],
298 },
299 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700301 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700302 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
303 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700305 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
306 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
307 {
308 "message": "A String", # [Output Only] An optional, human-readable error message.
309 "code": "A String", # [Output Only] The error type identifier for this error.
310 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
311 },
312 ],
313 },
314 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
315 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800316 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700317 }</pre>
318</div>
319
320<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
322 <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.
323
324Args:
325 project: string, Project ID for this request. (required)
326 zone: string, The name of the zone for this request. (required)
327 instance: string, The instance name for this request. (required)
328 body: object, The request body.
329 The object takes the form of:
330
331{
332 "resourcePolicies": [ # Resource policies to be added to this instance.
333 "A String",
334 ],
335 }
336
337 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.
338
339For 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.
340
341The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
342
343Returns:
344 An object of the form:
345
346 { # Represents an Operation resource.
347 #
348 # Google Compute Engine has three Operation resources:
349 #
350 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
351 #
352 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
353 #
354 # Operations can be global, regional or zonal.
355 # - For global operations, use the `globalOperations` resource.
356 # - For regional operations, use the `regionOperations` resource.
357 # - For zonal operations, use the `zonalOperations` resource.
358 #
359 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
360 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
361 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
362 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
363 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
364 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
365 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
366 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
367 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
368 "progress": 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.
369 "httpErrorStatusCode": 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.
370 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
371 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
372 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
373 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
374 {
375 "message": "A String", # [Output Only] A human-readable description of the warning code.
376 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
377 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
378 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
379 {
380 "value": "A String", # [Output Only] A warning data value corresponding to the key.
381 "key": "A String", # [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).
382 },
383 ],
384 },
385 ],
386 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
387 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
388 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
389 "name": "A String", # [Output Only] Name of the operation.
390 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
391 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
392 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
393 {
394 "message": "A String", # [Output Only] An optional, human-readable error message.
395 "code": "A String", # [Output Only] The error type identifier for this error.
396 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
397 },
398 ],
399 },
400 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
401 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
402 "targetLink": "A String", # [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.
403 }</pre>
404</div>
405
406<div class="method">
407 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700409
410Args:
411 project: string, Project ID for this request. (required)
412 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
413
Dan O'Mearadd494642020-05-01 07:42:23 -0700414You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700415
Dan O'Mearadd494642020-05-01 07:42:23 -0700416Currently, only sorting by `name` or `creationTimestamp desc` is supported.
417 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`)
418 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.
419 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700420
Dan O'Mearadd494642020-05-01 07:42:23 -0700421For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700422
Dan O'Mearadd494642020-05-01 07:42:23 -0700423You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700424
Dan O'Mearadd494642020-05-01 07:42:23 -0700425To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
426 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700427
428Returns:
429 An object of the form:
430
431 {
432 "nextPageToken": "A String", # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 "kind": "compute#instanceAggregatedList", # [Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 "items": { # An object that contains a list of instances scoped by zone.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700435 "a_key": { # [Output Only] Name of the scope containing this set of instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 "instances": [ # [Output Only] A list of instances contained in this scope.
437 { # Represents an Instance resource.
438 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700439 # 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 Kim715bd7f2019-06-14 16:50:42 -0700440 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
Dan O'Mearadd494642020-05-01 07:42:23 -0700441 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
442 "values": [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 "A String",
444 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700445 "key": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700446 "consumeReservationType": "A String", # 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.
447 },
448 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400449 { # A specification of the type and number of accelerator cards attached to the instance.
450 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700451 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400452 },
453 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400454 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700455 "a_key": "A String",
456 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700457 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
458 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
459 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700460 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
461 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400463 "automaticRestart": 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.
464 #
465 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -0700466 "nodeAffinities": [ # 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 -0700467 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -0700468 "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 "values": [ # Corresponds to the label values of Node resource.
470 "A String",
471 ],
472 "key": "A String", # Corresponds to the label key of Node resource.
473 },
474 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700475 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400476 "onHostMaintenance": "A String", # 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.
477 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700478 "minCpuPlatform": "A String", # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400479 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
480 #
481 # 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.
482 { # A service account.
483 "scopes": [ # The list of scopes to be made available for this service account.
484 "A String",
485 ],
486 "email": "A String", # Email address of the service account.
487 },
488 ],
489 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
490 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491 "networkInterfaces": [ # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400492 { # A network interface resource attached to an instance.
493 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700494 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400495 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 "subnetworkRangeName": "A String", # 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.
497 "ipCidrRange": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400498 },
499 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700500 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
501 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400502 "accessConfigs": [ # 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.
503 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
504 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 "name": "A String", # 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.
506 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
507 #
508 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
509 #
510 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400511 "natIP": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700512 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
513 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
514 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400515 },
516 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 "networkIP": "A String", # 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.
518 "fingerprint": "A String", # 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.
519 "subnetwork": "A String", # 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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400520 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
521 # - regions/region/subnetworks/subnetwork
Dan O'Mearadd494642020-05-01 07:42:23 -0700522 "network": "A String", # 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.
523 #
524 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
525 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
526 # - projects/project/global/networks/network
527 # - global/networks/default
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400528 },
529 ],
530 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700531 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
532 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
533 },
534 "shieldedInstanceConfig": { # A set of Shielded Instance options.
535 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
536 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
537 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
538 },
539 "zone": "A String", # [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 -0700540 "hostname": "A String", # 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.
541 "sourceMachineImage": "A String", # Source machine image
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
543 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
544 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400545 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
546 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
547 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
548 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700549 "value": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400550 "key": "A String", # 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.
551 },
552 ],
553 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700554 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata'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.
555 #
556 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400557 },
558 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700559 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700560 "canIpForward": 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.
561 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700562 "tags": { # 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 'tags.items' field.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700563 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
564 "A String",
565 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700566 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700567 #
568 # To see the latest fingerprint, make get() request to the instance.
569 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700570 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
571 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
572 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
573 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
574 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
575 #
576 # The key must meet the following requirements before you can provide it to Compute Engine:
577 # - The key is wrapped using a RSA public key certificate provided by Google.
578 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
579 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
580 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
581 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the label'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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700583 #
584 # To see the latest fingerprint, make get() request to the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700585 "resourcePolicies": [ # Resource policies applied to this instance.
586 "A String",
587 ],
588 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
589 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the instance'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.
590 #
591 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400592 "machineType": "A String", # 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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400593 # zones/us-central1-f/machineTypes/n1-standard-1
594 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400595 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596 # 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):
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400597 # zones/zone/machineTypes/custom-CPUS-MEMORY
598 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700599 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400600 # For example: zones/us-central1-f/machineTypes/custom-4-5120
601 #
602 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700603 "shieldedVmConfig": { # A set of Shielded VM options.
604 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
605 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
606 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
607 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400608 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 "name": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700610 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
611 { # An instance-attached disk resource.
612 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
613 #
614 # 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.
615 #
616 # 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.
617 #
618 # 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.
619 #
620 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
621 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700622 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700623 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
624 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
625 #
626 # The key must meet the following requirements before you can provide it to Compute Engine:
627 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700628 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700629 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700631 },
632 "deviceName": "A String", # 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.
633 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700635 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
636 "initializeParams": { # [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.
637 #
638 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
639 #
640 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Dan O'Mearadd494642020-05-01 07:42:23 -0700641 "sourceSnapshot": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700642 #
643 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
644 # global/snapshots/my-backup
645 #
646 #
647 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700648 "diskName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -0700650 "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700651 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
652 "a_key": "A String",
653 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700654 "sourceImageEncryptionKey": { # 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.
655 #
656 # 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.
657 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700658 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700659 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
660 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
661 #
662 # The key must meet the following requirements before you can provide it to Compute Engine:
663 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700664 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700665 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700666 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700667 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700668 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700669 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
670 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700671 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700672 # 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:
673 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
674 # - projects/project/zones/zone/diskTypes/diskType
675 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 "guestOsFeatures": [ # 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.
677 #
678 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
679 { # Guest OS features.
680 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
681 },
682 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700683 "diskSizeGb": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700684 "resourcePolicies": [ # 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.
685 "A String",
686 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700687 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700688 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 # 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:
690 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700691 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700692 #
693 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700694 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700695 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700696 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697 # To create a disk with a custom image that you created, specify the image name in the following format:
698 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700699 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700700 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 # 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:
702 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700703 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800704 #
705 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700706 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
707 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700708 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
710 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
711 #
712 # The key must meet the following requirements before you can provide it to Compute Engine:
713 # - The key is wrapped using a RSA public key certificate provided by Google.
714 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
715 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
716 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
717 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700718 },
719 "autoDelete": 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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700720 "index": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700721 "boot": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700722 "shieldedInstanceInitialState": { # 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
723 "dbxs": [ # The forbidden key database (dbx).
724 {
725 "content": "A String", # The raw content in the secure keys file.
726 "fileType": "A String",
727 },
728 ],
729 "dbs": [ # The Key Database (db).
730 {
731 "content": "A String", # The raw content in the secure keys file.
732 "fileType": "A String",
733 },
734 ],
735 "keks": [ # The Key Exchange Key (KEK).
736 {
737 "content": "A String", # The raw content in the secure keys file.
738 "fileType": "A String",
739 },
740 ],
741 "pk": { # The Platform Key (PK).
742 "content": "A String", # The raw content in the secure keys file.
743 "fileType": "A String",
744 },
745 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 "guestOsFeatures": [ # 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.
747 { # Guest OS features.
748 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
749 },
750 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 "diskSizeGb": "A String", # The size of the disk in GB.
752 "mode": "A String", # 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.
753 "interface": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700754 "licenses": [ # [Output Only] Any valid publicly visible licenses.
755 "A String",
756 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700757 "type": "A String", # 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 -0700758 "source": "A String", # 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 -0800759 #
760 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
761 #
762 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700763 },
764 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400765 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700766 },
767 ],
768 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
769 "message": "A String", # [Output Only] A human-readable description of the warning code.
770 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
771 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
772 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
773 {
774 "value": "A String", # [Output Only] A warning data value corresponding to the key.
775 "key": "A String", # [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).
776 },
777 ],
778 },
779 },
780 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700781 "warning": { # [Output Only] Informational warning message.
782 "message": "A String", # [Output Only] A human-readable description of the warning code.
783 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
784 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
785 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
786 {
787 "value": "A String", # [Output Only] A warning data value corresponding to the key.
788 "key": "A String", # [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).
789 },
790 ],
791 },
792 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700793 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
794 }</pre>
795</div>
796
797<div class="method">
798 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
799 <pre>Retrieves the next page of results.
800
801Args:
802 previous_request: The request for the previous page. (required)
803 previous_response: The response from the request for the previous page. (required)
804
805Returns:
806 A request object that you can call 'execute()' on to request the next
807 page. Returns None if there are no more items in the collection.
808 </pre>
809</div>
810
811<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700812 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400813 <pre>Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700814
815Args:
816 project: string, Project ID for this request. (required)
817 zone: string, The name of the zone for this request. (required)
818 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700819 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700820 The object takes the form of:
821
822{ # An instance-attached disk resource.
823 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
824 #
825 # 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.
826 #
827 # 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.
828 #
829 # 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.
830 #
831 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
832 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700833 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700834 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
835 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
836 #
837 # The key must meet the following requirements before you can provide it to Compute Engine:
838 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700840 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700841 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700842 },
843 "deviceName": "A String", # 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.
844 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700845 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700846 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
847 "initializeParams": { # [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.
848 #
849 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
850 #
851 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Dan O'Mearadd494642020-05-01 07:42:23 -0700852 "sourceSnapshot": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700853 #
854 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
855 # global/snapshots/my-backup
856 #
857 #
858 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700859 "diskName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700860 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700862 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
863 "a_key": "A String",
864 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700865 "sourceImageEncryptionKey": { # 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.
866 #
867 # 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.
868 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700869 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700870 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
871 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
872 #
873 # The key must meet the following requirements before you can provide it to Compute Engine:
874 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700875 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700876 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700877 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700878 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700879 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700880 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
881 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700882 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700883 # 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:
884 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
885 # - projects/project/zones/zone/diskTypes/diskType
886 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700887 "guestOsFeatures": [ # 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.
888 #
889 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
890 { # Guest OS features.
891 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
892 },
893 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700894 "diskSizeGb": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700895 "resourcePolicies": [ # 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.
896 "A String",
897 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700898 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700899 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700900 # 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:
901 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700902 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700903 #
904 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700905 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700906 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700907 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700908 # To create a disk with a custom image that you created, specify the image name in the following format:
909 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700910 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700911 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 # 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:
913 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700914 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800915 #
916 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700917 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
918 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700919 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
921 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
922 #
923 # The key must meet the following requirements before you can provide it to Compute Engine:
924 # - The key is wrapped using a RSA public key certificate provided by Google.
925 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
926 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
927 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
928 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700929 },
930 "autoDelete": 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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 "index": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700932 "boot": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700933 "shieldedInstanceInitialState": { # 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
934 "dbxs": [ # The forbidden key database (dbx).
935 {
936 "content": "A String", # The raw content in the secure keys file.
937 "fileType": "A String",
938 },
939 ],
940 "dbs": [ # The Key Database (db).
941 {
942 "content": "A String", # The raw content in the secure keys file.
943 "fileType": "A String",
944 },
945 ],
946 "keks": [ # The Key Exchange Key (KEK).
947 {
948 "content": "A String", # The raw content in the secure keys file.
949 "fileType": "A String",
950 },
951 ],
952 "pk": { # The Platform Key (PK).
953 "content": "A String", # The raw content in the secure keys file.
954 "fileType": "A String",
955 },
956 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 "guestOsFeatures": [ # 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.
958 { # Guest OS features.
959 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
960 },
961 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700962 "diskSizeGb": "A String", # The size of the disk in GB.
963 "mode": "A String", # 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.
964 "interface": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700965 "licenses": [ # [Output Only] Any valid publicly visible licenses.
966 "A String",
967 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700968 "type": "A String", # 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 -0700969 "source": "A String", # 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 -0800970 #
971 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
972 #
973 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700974}
975
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700976 forceAttach: boolean, Whether to force attach the disk even if it's currently attached to another instance.
977 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.
978
979For 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.
980
981The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700982
983Returns:
984 An object of the form:
985
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700986 { # Represents an Operation resource.
987 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700988 # Google Compute Engine has three Operation resources:
989 #
990 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
991 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700992 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
993 #
994 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700995 # - For global operations, use the `globalOperations` resource.
996 # - For regional operations, use the `regionOperations` resource.
997 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700998 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700999 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001000 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001001 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001002 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001003 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001004 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001005 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1007 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001008 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001009 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001010 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001011 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001012 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1013 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1014 {
1015 "message": "A String", # [Output Only] A human-readable description of the warning code.
1016 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1017 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1018 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1019 {
1020 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1021 "key": "A String", # [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).
1022 },
1023 ],
1024 },
1025 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001026 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001027 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001028 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1029 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001030 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001031 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1032 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1033 {
1034 "message": "A String", # [Output Only] An optional, human-readable error message.
1035 "code": "A String", # [Output Only] The error type identifier for this error.
1036 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1037 },
1038 ],
1039 },
1040 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1041 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001042 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001043 }</pre>
1044</div>
1045
1046<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001047 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001048 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
1049
1050Args:
1051 project: string, Project ID for this request. (required)
1052 zone: string, The name of the zone for this request. (required)
1053 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 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.
1055
1056For 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.
1057
1058The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001059
1060Returns:
1061 An object of the form:
1062
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001063 { # Represents an Operation resource.
1064 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001065 # Google Compute Engine has three Operation resources:
1066 #
1067 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1068 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001069 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1070 #
1071 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001072 # - For global operations, use the `globalOperations` resource.
1073 # - For regional operations, use the `regionOperations` resource.
1074 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001075 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001076 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001077 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001079 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001080 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001081 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001082 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001083 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1084 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001085 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001086 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001087 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001088 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001089 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1090 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1091 {
1092 "message": "A String", # [Output Only] A human-readable description of the warning code.
1093 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1094 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1095 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1096 {
1097 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1098 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1099 },
1100 ],
1101 },
1102 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001103 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001104 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001105 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1106 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001108 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1109 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1110 {
1111 "message": "A String", # [Output Only] An optional, human-readable error message.
1112 "code": "A String", # [Output Only] The error type identifier for this error.
1113 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1114 },
1115 ],
1116 },
1117 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1118 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001119 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001120 }</pre>
1121</div>
1122
1123<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001124 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001125 <pre>Deletes an access config from an instance's network interface.
1126
1127Args:
1128 project: string, Project ID for this request. (required)
1129 zone: string, The name of the zone for this request. (required)
1130 instance: string, The instance name for this request. (required)
1131 accessConfig: string, The name of the access config to delete. (required)
1132 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001133 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.
1134
1135For 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.
1136
1137The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001138
1139Returns:
1140 An object of the form:
1141
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001142 { # Represents an Operation resource.
1143 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001144 # Google Compute Engine has three Operation resources:
1145 #
1146 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1147 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001148 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1149 #
1150 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001151 # - For global operations, use the `globalOperations` resource.
1152 # - For regional operations, use the `regionOperations` resource.
1153 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001154 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001155 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001156 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001157 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001158 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001159 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001160 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001161 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001162 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1163 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001164 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001165 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001166 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001167 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001168 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1169 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1170 {
1171 "message": "A String", # [Output Only] A human-readable description of the warning code.
1172 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1173 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1174 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1175 {
1176 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1177 "key": "A String", # [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).
1178 },
1179 ],
1180 },
1181 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001182 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001183 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001184 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1185 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001186 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001187 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1188 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1189 {
1190 "message": "A String", # [Output Only] An optional, human-readable error message.
1191 "code": "A String", # [Output Only] The error type identifier for this error.
1192 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1193 },
1194 ],
1195 },
1196 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1197 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001198 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001199 }</pre>
1200</div>
1201
1202<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001203 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001204 <pre>Detaches a disk from an instance.
1205
1206Args:
1207 project: string, Project ID for this request. (required)
1208 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001209 instance: string, Instance name for this request. (required)
1210 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)
1211 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.
1212
1213For 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.
1214
1215The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001216
1217Returns:
1218 An object of the form:
1219
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 { # Represents an Operation resource.
1221 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001222 # Google Compute Engine has three Operation resources:
1223 #
1224 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1225 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001226 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1227 #
1228 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001229 # - For global operations, use the `globalOperations` resource.
1230 # - For regional operations, use the `regionOperations` resource.
1231 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001232 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001233 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001234 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001235 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001236 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001237 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001238 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001239 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001240 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1241 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001242 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001243 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001244 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001245 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001246 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1247 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1248 {
1249 "message": "A String", # [Output Only] A human-readable description of the warning code.
1250 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1251 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1252 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1253 {
1254 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1255 "key": "A String", # [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).
1256 },
1257 ],
1258 },
1259 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001260 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001261 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001262 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1263 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001264 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001265 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1266 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1267 {
1268 "message": "A String", # [Output Only] An optional, human-readable error message.
1269 "code": "A String", # [Output Only] The error type identifier for this error.
1270 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1271 },
1272 ],
1273 },
1274 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1275 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001276 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001277 }</pre>
1278</div>
1279
1280<div class="method">
1281 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001282 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001283
1284Args:
1285 project: string, Project ID for this request. (required)
1286 zone: string, The name of the zone for this request. (required)
1287 instance: string, Name of the instance resource to return. (required)
1288
1289Returns:
1290 An object of the form:
1291
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001292 { # Represents an Instance resource.
1293 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001294 # 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 Kim715bd7f2019-06-14 16:50:42 -07001295 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
Dan O'Mearadd494642020-05-01 07:42:23 -07001296 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1297 "values": [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001298 "A String",
1299 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001300 "key": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001301 "consumeReservationType": "A String", # 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.
1302 },
1303 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001304 { # A specification of the type and number of accelerator cards attached to the instance.
1305 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001306 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001307 },
1308 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001309 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001310 "a_key": "A String",
1311 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001312 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
1313 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
1314 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001315 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
1316 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001317 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001318 "automaticRestart": 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.
1319 #
1320 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -07001321 "nodeAffinities": [ # 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 -07001322 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001323 "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001324 "values": [ # Corresponds to the label values of Node resource.
1325 "A String",
1326 ],
1327 "key": "A String", # Corresponds to the label key of Node resource.
1328 },
1329 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001330 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001331 "onHostMaintenance": "A String", # 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.
1332 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001333 "minCpuPlatform": "A String", # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001334 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
1335 #
1336 # 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.
1337 { # A service account.
1338 "scopes": [ # The list of scopes to be made available for this service account.
1339 "A String",
1340 ],
1341 "email": "A String", # Email address of the service account.
1342 },
1343 ],
1344 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1345 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001346 "networkInterfaces": [ # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001347 { # A network interface resource attached to an instance.
1348 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001349 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001350 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001351 "subnetworkRangeName": "A String", # 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.
1352 "ipCidrRange": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001353 },
1354 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001355 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
1356 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001357 "accessConfigs": [ # 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.
1358 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1359 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001360 "name": "A String", # 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.
1361 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1362 #
1363 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1364 #
1365 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001366 "natIP": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001367 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
1368 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1369 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001370 },
1371 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001372 "networkIP": "A String", # 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.
1373 "fingerprint": "A String", # 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.
1374 "subnetwork": "A String", # 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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001375 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1376 # - regions/region/subnetworks/subnetwork
Dan O'Mearadd494642020-05-01 07:42:23 -07001377 "network": "A String", # 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.
1378 #
1379 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1380 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1381 # - projects/project/global/networks/network
1382 # - global/networks/default
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001383 },
1384 ],
1385 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001386 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
1387 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1388 },
1389 "shieldedInstanceConfig": { # A set of Shielded Instance options.
1390 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1391 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1392 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1393 },
1394 "zone": "A String", # [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 -07001395 "hostname": "A String", # 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.
1396 "sourceMachineImage": "A String", # Source machine image
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001397 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
1398 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1399 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001400 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1401 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1402 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1403 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001404 "value": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001405 "key": "A String", # 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.
1406 },
1407 ],
1408 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001409 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata'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.
1410 #
1411 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001412 },
1413 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001414 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001415 "canIpForward": 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.
1416 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001417 "tags": { # 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 'tags.items' field.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001418 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1419 "A String",
1420 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001421 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001422 #
1423 # To see the latest fingerprint, make get() request to the instance.
1424 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001425 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
1426 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1427 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
1428 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1429 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1430 #
1431 # The key must meet the following requirements before you can provide it to Compute Engine:
1432 # - The key is wrapped using a RSA public key certificate provided by Google.
1433 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1434 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1435 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1436 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001437 "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the label'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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001438 #
1439 # To see the latest fingerprint, make get() request to the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07001440 "resourcePolicies": [ # Resource policies applied to this instance.
1441 "A String",
1442 ],
1443 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
1444 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the instance'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.
1445 #
1446 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001447 "machineType": "A String", # 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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001448 # zones/us-central1-f/machineTypes/n1-standard-1
1449 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001450 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001451 # 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):
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001452 # zones/zone/machineTypes/custom-CPUS-MEMORY
1453 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001454 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001455 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1456 #
1457 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001458 "shieldedVmConfig": { # A set of Shielded VM options.
1459 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1460 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1461 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1462 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001463 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001464 "name": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001465 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1466 { # An instance-attached disk resource.
1467 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1468 #
1469 # 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.
1470 #
1471 # 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.
1472 #
1473 # 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.
1474 #
1475 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1476 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001477 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001478 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1479 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1480 #
1481 # The key must meet the following requirements before you can provide it to Compute Engine:
1482 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001483 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001484 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001485 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001486 },
1487 "deviceName": "A String", # 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.
1488 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001489 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001490 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1491 "initializeParams": { # [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.
1492 #
1493 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1494 #
1495 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Dan O'Mearadd494642020-05-01 07:42:23 -07001496 "sourceSnapshot": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001497 #
1498 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1499 # global/snapshots/my-backup
1500 #
1501 #
1502 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001503 "diskName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001504 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07001505 "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001506 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
1507 "a_key": "A String",
1508 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001509 "sourceImageEncryptionKey": { # 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.
1510 #
1511 # 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.
1512 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001513 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001514 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1515 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1516 #
1517 # The key must meet the following requirements before you can provide it to Compute Engine:
1518 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001520 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001521 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001522 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001523 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001524 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1525 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001526 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001527 # 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:
1528 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1529 # - projects/project/zones/zone/diskTypes/diskType
1530 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001531 "guestOsFeatures": [ # 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.
1532 #
1533 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1534 { # Guest OS features.
1535 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1536 },
1537 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001538 "diskSizeGb": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001539 "resourcePolicies": [ # 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.
1540 "A String",
1541 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001542 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001543 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001544 # 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:
1545 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001546 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001547 #
1548 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001549 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001550 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001551 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001552 # To create a disk with a custom image that you created, specify the image name in the following format:
1553 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001554 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001555 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001556 # 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:
1557 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001558 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001559 #
1560 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001561 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1562 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001563 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001564 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1565 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1566 #
1567 # The key must meet the following requirements before you can provide it to Compute Engine:
1568 # - The key is wrapped using a RSA public key certificate provided by Google.
1569 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1570 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1571 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1572 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001573 },
1574 "autoDelete": 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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001575 "index": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001576 "boot": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001577 "shieldedInstanceInitialState": { # 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
1578 "dbxs": [ # The forbidden key database (dbx).
1579 {
1580 "content": "A String", # The raw content in the secure keys file.
1581 "fileType": "A String",
1582 },
1583 ],
1584 "dbs": [ # The Key Database (db).
1585 {
1586 "content": "A String", # The raw content in the secure keys file.
1587 "fileType": "A String",
1588 },
1589 ],
1590 "keks": [ # The Key Exchange Key (KEK).
1591 {
1592 "content": "A String", # The raw content in the secure keys file.
1593 "fileType": "A String",
1594 },
1595 ],
1596 "pk": { # The Platform Key (PK).
1597 "content": "A String", # The raw content in the secure keys file.
1598 "fileType": "A String",
1599 },
1600 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001601 "guestOsFeatures": [ # 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.
1602 { # Guest OS features.
1603 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1604 },
1605 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001606 "diskSizeGb": "A String", # The size of the disk in GB.
1607 "mode": "A String", # 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.
1608 "interface": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001609 "licenses": [ # [Output Only] Any valid publicly visible licenses.
1610 "A String",
1611 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001612 "type": "A String", # 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 -07001613 "source": "A String", # 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 -08001614 #
1615 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1616 #
1617 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001618 },
1619 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001620 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001621 }</pre>
1622</div>
1623
1624<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001625 <code class="details" id="getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</code>
1626 <pre>Returns effective firewalls applied to an interface of the instance.
1627
1628Args:
1629 project: string, Project ID for this request. (required)
1630 zone: string, The name of the zone for this request. (required)
1631 instance: string, Name of the instance scoping this request. (required)
1632 networkInterface: string, The name of the network interface to get the effective firewalls. (required)
1633
1634Returns:
1635 An object of the form:
1636
1637 {
1638 "organizationFirewalls": [ # Effective firewalls from organization policies.
1639 { # A pruned SecurityPolicy containing ID and any applicable firewall rules.
1640 "rules": [ # The rules that apply to the network.
1641 { # Represents a rule that describes one or more match conditions along with the action to be taken when traffic matches this condition (allow or deny).
1642 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
1643 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
1644 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1645 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
1646 "enableLogging": True or False, # Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules.
1647 #
1648 # This field may only be specified when the versioned_expr is set to FIREWALL.
1649 "priority": 42, # An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest prority.
1650 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule.
1651 "A String",
1652 ],
1653 "targetResources": [ # A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule.
1654 #
1655 # This field may only be specified when versioned_expr is set to FIREWALL.
1656 "A String",
1657 ],
1658 "action": "A String", # The Action to preform when the client connection triggers the rule. Can currently be either "allow" or "deny()" where valid values for status are 403, 404, and 502.
1659 "preview": True or False, # If set to true, the specified action is not enforced.
1660 "match": { # Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. # A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced.
1661 "expr": { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # User defined CEVAL expression. A CEVAL expression is used to specify match criteria such as origin.ip, source.region_code and contents in the request header.
1662 #
1663 # Example (Comparison):
1664 #
1665 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1666 #
1667 # Example (Equality):
1668 #
1669 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1670 #
1671 # Example (Logic):
1672 #
1673 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1674 #
1675 # Example (Data Manipulation):
1676 #
1677 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1678 #
1679 # 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.
1680 "title": "A String", # 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.
1681 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
1682 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1683 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1684 },
1685 "config": { # The configuration options available when specifying versioned_expr. This field must be specified if versioned_expr is specified and cannot be specified if versioned_expr is not specified.
1686 "srcIpRanges": [ # CIDR IP address range.
1687 "A String",
1688 ],
1689 "destIpRanges": [ # CIDR IP address range.
1690 #
1691 # This field may only be specified when versioned_expr is set to FIREWALL.
1692 "A String",
1693 ],
1694 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match.
1695 #
1696 # This field may only be specified when versioned_expr is set to FIREWALL.
1697 {
1698 "ipProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number.
1699 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1700 #
1701 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
1702 #
1703 # This field may only be specified when versioned_expr is set to FIREWALL.
1704 "A String",
1705 ],
1706 },
1707 ],
1708 },
1709 "versionedExpr": "A String", # Preconfigured versioned expression. If this field is specified, config must also be specified. Available preconfigured expressions along with their requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range field in config.
1710 },
1711 },
1712 ],
1713 "id": "A String", # The unique identifier for the security policy. This identifier is defined by the server.
1714 },
1715 ],
1716 "firewalls": [ # Effective firewalls on the instance.
1717 { # Represents a Firewall Rule resource.
1718 #
1719 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
1720 "priority": 42, # Priority for this rule. This is an integer between `0` and `65535`, both inclusive. The default value is `1000`. Relative priorities determine which rule takes effect if multiple rules apply. Lower values indicate higher priority. For example, a rule with priority `0` has higher precedence than a rule with priority `1`. DENY rules take precedence over ALLOW rules if they have equal priority. Note that VPC networks have implied rules with a priority of `65535`. To avoid conflicts with the implied rules, use a priority number less than `65535`.
1721 "direction": "A String", # Direction of traffic to which this firewall applies, either `INGRESS` or `EGRESS`. The default is `INGRESS`. For `INGRESS` traffic, you cannot specify the destinationRanges field, and for `EGRESS` traffic, you cannot specify the sourceRanges or sourceTags fields.
1722 "sourceRanges": [ # If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the rule to apply. Only IPv4 is supported.
1723 "A String",
1724 ],
1725 "sourceServiceAccounts": [ # If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both fields for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags.
1726 "A String",
1727 ],
1728 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
1729 "destinationRanges": [ # If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported.
1730 "A String",
1731 ],
1732 "sourceTags": [ # If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
1733 "A String",
1734 ],
1735 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
1736 {
1737 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
1738 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1739 #
1740 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
1741 "A String",
1742 ],
1743 },
1744 ],
1745 "enableLogging": True or False, # Deprecated in favor of enable in LogConfig. This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
1746 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
1747 "logConfig": { # The available logging options for a firewall rule. # This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver.
1748 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
1749 "metadata": "A String", # This field can only be specified for a particular firewall rule if logging is enabled for that rule. This field denotes whether to include or exclude metadata for firewall logs.
1750 },
1751 "disabled": True or False, # Denotes whether the firewall rule is disabled. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled.
1752 "network": "A String", # URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used:
1753 # global/networks/default
1754 # If you choose to specify this field, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1755 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
1756 # - projects/myproject/global/networks/my-network
1757 # - global/networks/default
1758 "targetServiceAccounts": [ # A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
1759 "A String",
1760 ],
1761 "targetTags": [ # A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
1762 "A String",
1763 ],
1764 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
1765 {
1766 "IPProtocol": "A String", # The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp) or the IP protocol number.
1767 "ports": [ # An optional list of ports to which this rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
1768 #
1769 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
1770 "A String",
1771 ],
1772 },
1773 ],
1774 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1775 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1776 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1777 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
1778 },
1779 ],
1780 }</pre>
1781</div>
1782
1783<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001784 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</code>
1785 <pre>Returns the specified guest attributes entry.
1786
1787Args:
1788 project: string, Project ID for this request. (required)
1789 zone: string, The name of the zone for this request. (required)
1790 instance: string, Name of the instance scoping this request. (required)
1791 variableKey: string, Specifies the key for the guest attributes entry.
1792 queryPath: string, Specifies the guest attributes path to be queried.
1793
1794Returns:
1795 An object of the form:
1796
1797 { # A guest attributes entry.
1798 "kind": "compute#guestAttributes", # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
1799 "variableKey": "A String", # The key to search for.
1800 "queryValue": { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
1801 "items": [
1802 { # A guest attributes namespace/key/value entry.
1803 "namespace": "A String", # Namespace for the guest attribute entry.
1804 "value": "A String", # Value for the guest attribute entry.
1805 "key": "A String", # Key for the guest attribute entry.
1806 },
1807 ],
1808 },
1809 "variableValue": "A String", # [Output Only] The value found for the requested key.
Dan O'Mearadd494642020-05-01 07:42:23 -07001810 "queryPath": "A String", # The path to be queried. This can be the default namespace ('/') or a nested namespace ('/\/') or a specified key ('/\/\')
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001811 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1812 }</pre>
1813</div>
1814
1815<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001816 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001817 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
1818
1819Args:
1820 project: string, Project ID for this request. (required)
1821 zone: string, The name of the zone for this request. (required)
1822 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001823 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001824
1825Returns:
1826 An object of the form:
1827
Dan O'Mearadd494642020-05-01 07:42:23 -07001828 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001829 #
1830 #
1831 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001832 # 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 -07001833 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001834 # Optionally, a `binding` can 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001835 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001836 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001837 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001838 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001839 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001840 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001841 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001842 # 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('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001843 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001844 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001845 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1846 { # 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.
1847 #
1848 # 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.
1849 #
1850 # Example Policy with multiple AuditConfigs:
1851 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001852 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001853 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001854 # 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 Kim715bd7f2019-06-14 16:50:42 -07001855 "exemptedMembers": [
1856 "A String",
1857 ],
1858 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1859 { # Provides the configuration for logging a type of permissions. Example:
1860 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001861 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001862 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001863 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001864 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1865 "A String",
1866 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001867 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001868 "logType": "A String", # The log type that this config enables.
1869 },
1870 ],
1871 "service": "A String", # 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.
1872 },
1873 ],
1874 "rules": [ # 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.
1875 { # A rule to be applied in a Policy.
1876 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1877 { # Specifies what kind of log the caller must write
1878 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1879 #
1880 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
1881 #
1882 # Field names correspond to IAM request parameters and field values are their respective values.
1883 #
1884 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
1885 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001886 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001887 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001888 "customFields": [ # Custom fields.
1889 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1890 "name": "A String", # Name is the field name.
1891 "value": "A String", # 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.
1892 },
1893 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001894 "metric": "A String", # The metric to update.
1895 },
1896 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001897 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001898 },
1899 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1900 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1901 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1902 "permissionType": "A String", # The type of the permission that was checked.
1903 },
1904 },
1905 },
1906 ],
1907 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1908 "A String",
1909 ],
1910 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1911 "A String",
1912 ],
1913 "action": "A String", # Required
1914 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1915 "A String",
1916 ],
1917 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1918 { # A condition to be met.
1919 "iam": "A String", # Trusted attributes supplied by the IAM system.
1920 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1921 "values": [ # The objects of the condition.
1922 "A String",
1923 ],
1924 "svc": "A String", # Trusted attributes discharged by the service.
1925 "op": "A String", # An operator to apply the subject with.
1926 },
1927 ],
1928 "description": "A String", # Human-readable description of the rule.
1929 },
1930 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001931 "version": 42, # Specifies the format of the policy.
1932 #
1933 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1934 #
1935 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1936 #
1937 # * 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
1938 #
1939 # **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.
1940 #
1941 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001942 "etag": "A String", # `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.
1943 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001944 # **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.
1945 "bindings": [ # 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 -07001946 { # Associates `members` with a `role`.
1947 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1948 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1949 #
1950 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1951 #
1952 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1953 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001954 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001955 #
1956 #
1957 #
1958 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1959 #
1960 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1961 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001962 # * `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.
1963 #
1964 # * `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.
1965 #
1966 # * `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.
1967 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001968 #
1969 #
1970 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1971 "A String",
1972 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001973 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001974 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001975 # Example (Comparison):
1976 #
1977 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1978 #
1979 # Example (Equality):
1980 #
1981 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1982 #
1983 # Example (Logic):
1984 #
1985 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1986 #
1987 # Example (Data Manipulation):
1988 #
1989 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1990 #
1991 # 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.
1992 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001993 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001994 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1995 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001996 },
1997 },
1998 ],
1999 "iamOwned": True or False,
2000 }</pre>
2001</div>
2002
2003<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002004 <code class="details" id="getScreenshot">getScreenshot(project, zone, instance)</code>
2005 <pre>Returns the screenshot from the specified instance.
2006
2007Args:
2008 project: string, Project ID for this request. (required)
2009 zone: string, The name of the zone for this request. (required)
2010 instance: string, Name of the instance scoping this request. (required)
2011
2012Returns:
2013 An object of the form:
2014
2015 { # An instance's screenshot.
2016 "kind": "compute#screenshot", # [Output Only] Type of the resource. Always compute#screenshot for the screenshots.
2017 "contents": "A String", # [Output Only] The Base64-encoded screenshot data.
2018 }</pre>
2019</div>
2020
2021<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002022 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002023 <pre>Returns the last 1 MB of serial port output from the specified instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002024
2025Args:
2026 project: string, Project ID for this request. (required)
2027 zone: string, The name of the zone for this request. (required)
2028 instance: string, Name of the instance scoping this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002029 start: string, Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002030 port: integer, Specifies which COM or serial port to retrieve data from.
2031
2032Returns:
2033 An object of the form:
2034
2035 { # An instance's serial console output.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002036 "start": "A String", # The starting byte position of the output that was returned. This should match the start parameter sent with the request. If the serial console output exceeds the size of the buffer, older output will be overwritten by newer content and the start values will be mismatched.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002037 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
2038 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2039 "contents": "A String", # [Output Only] The contents of the console output.
2040 "next": "A String", # [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.
2041 }</pre>
2042</div>
2043
2044<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002045 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
2046 <pre>Returns the Shielded Instance Identity of an instance
2047
2048Args:
2049 project: string, Project ID for this request. (required)
2050 zone: string, The name of the zone for this request. (required)
2051 instance: string, Name or id of the instance scoping this request. (required)
2052
2053Returns:
2054 An object of the form:
2055
2056 { # A shielded Instance identity entry.
Dan O'Mearadd494642020-05-01 07:42:23 -07002057 "signingKey": { # A Shielded Instance Identity Entry. # An Attestation Key (AK) made by the RSA 2048 algorithm issued to the Shielded Instance's vTPM.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002058 "ekPub": "A String", # A PEM-encoded public key.
2059 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2060 },
2061 "kind": "compute#shieldedInstanceIdentity", # [Output Only] Type of the resource. Always compute#shieldedInstanceIdentity for shielded Instance identity entry.
Dan O'Mearadd494642020-05-01 07:42:23 -07002062 "encryptionKey": { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) made by the RSA 2048 algorithm issued to the Shielded Instance's vTPM.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002063 "ekPub": "A String", # A PEM-encoded public key.
2064 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2065 },
2066 }</pre>
2067</div>
2068
2069<div class="method">
2070 <code class="details" id="getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</code>
2071 <pre>Returns the Shielded VM Identity of an instance
2072
2073Args:
2074 project: string, Project ID for this request. (required)
2075 zone: string, The name of the zone for this request. (required)
2076 instance: string, Name of the instance scoping this request. (required)
2077
2078Returns:
2079 An object of the form:
2080
2081 { # A shielded VM identity entry.
2082 "signingKey": { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded VM's vTPM.
2083 "ekPub": "A String", # A PEM-encoded public key.
2084 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2085 },
2086 "kind": "compute#shieldedVmIdentity", # [Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.
2087 "encryptionKey": { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded VM's vTPM.
2088 "ekPub": "A String", # A PEM-encoded public key.
2089 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2090 },
2091 }</pre>
2092</div>
2093
2094<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002095 <code class="details" id="insert">insert(project, zone, body=None, sourceInstanceTemplate=None, sourceMachineImage=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002096 <pre>Creates an instance resource in the specified project using the data included in the request.
2097
2098Args:
2099 project: string, Project ID for this request. (required)
2100 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002101 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002102 The object takes the form of:
2103
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002104{ # Represents an Instance resource.
2105 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002106 # 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 Kim715bd7f2019-06-14 16:50:42 -07002107 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
Dan O'Mearadd494642020-05-01 07:42:23 -07002108 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2109 "values": [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002110 "A String",
2111 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002112 "key": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002113 "consumeReservationType": "A String", # 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.
2114 },
2115 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002116 { # A specification of the type and number of accelerator cards attached to the instance.
2117 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002118 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002119 },
2120 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002121 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002122 "a_key": "A String",
2123 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002124 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
2125 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
2126 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002127 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
2128 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002129 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002130 "automaticRestart": 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.
2131 #
2132 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -07002133 "nodeAffinities": [ # 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 -07002134 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07002135 "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002136 "values": [ # Corresponds to the label values of Node resource.
2137 "A String",
2138 ],
2139 "key": "A String", # Corresponds to the label key of Node resource.
2140 },
2141 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002142 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002143 "onHostMaintenance": "A String", # 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.
2144 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002145 "minCpuPlatform": "A String", # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002146 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
2147 #
2148 # 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.
2149 { # A service account.
2150 "scopes": [ # The list of scopes to be made available for this service account.
2151 "A String",
2152 ],
2153 "email": "A String", # Email address of the service account.
2154 },
2155 ],
2156 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2157 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002158 "networkInterfaces": [ # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002159 { # A network interface resource attached to an instance.
2160 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002161 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002162 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002163 "subnetworkRangeName": "A String", # 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.
2164 "ipCidrRange": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002165 },
2166 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002167 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
2168 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002169 "accessConfigs": [ # 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.
2170 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
2171 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002172 "name": "A String", # 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.
2173 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
2174 #
2175 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2176 #
2177 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002178 "natIP": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002179 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
2180 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2181 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002182 },
2183 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002184 "networkIP": "A String", # 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.
2185 "fingerprint": "A String", # 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.
2186 "subnetwork": "A String", # 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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002187 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2188 # - regions/region/subnetworks/subnetwork
Dan O'Mearadd494642020-05-01 07:42:23 -07002189 "network": "A String", # 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.
2190 #
2191 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2192 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2193 # - projects/project/global/networks/network
2194 # - global/networks/default
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002195 },
2196 ],
2197 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002198 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
2199 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2200 },
2201 "shieldedInstanceConfig": { # A set of Shielded Instance options.
2202 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2203 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2204 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2205 },
2206 "zone": "A String", # [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 -07002207 "hostname": "A String", # 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.
2208 "sourceMachineImage": "A String", # Source machine image
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002209 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
2210 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2211 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002212 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
2213 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2214 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2215 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002216 "value": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002217 "key": "A String", # 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.
2218 },
2219 ],
2220 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002221 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata'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.
2222 #
2223 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002224 },
2225 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002226 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002227 "canIpForward": 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.
2228 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002229 "tags": { # 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 'tags.items' field.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002230 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2231 "A String",
2232 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002233 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002234 #
2235 # To see the latest fingerprint, make get() request to the instance.
2236 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002237 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
2238 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2239 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2240 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2241 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2242 #
2243 # The key must meet the following requirements before you can provide it to Compute Engine:
2244 # - The key is wrapped using a RSA public key certificate provided by Google.
2245 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2246 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2247 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2248 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002249 "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the label'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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002250 #
2251 # To see the latest fingerprint, make get() request to the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002252 "resourcePolicies": [ # Resource policies applied to this instance.
2253 "A String",
2254 ],
2255 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2256 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the instance'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.
2257 #
2258 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002259 "machineType": "A String", # 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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002260 # zones/us-central1-f/machineTypes/n1-standard-1
2261 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002262 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002263 # 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):
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002264 # zones/zone/machineTypes/custom-CPUS-MEMORY
2265 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002266 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002267 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2268 #
2269 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002270 "shieldedVmConfig": { # A set of Shielded VM options.
2271 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2272 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2273 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2274 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002275 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002276 "name": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002277 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
2278 { # An instance-attached disk resource.
2279 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
2280 #
2281 # 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.
2282 #
2283 # 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.
2284 #
2285 # 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.
2286 #
2287 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
2288 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002289 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002290 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2291 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2292 #
2293 # The key must meet the following requirements before you can provide it to Compute Engine:
2294 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002295 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002296 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002297 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002298 },
2299 "deviceName": "A String", # 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.
2300 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002301 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002302 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2303 "initializeParams": { # [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.
2304 #
2305 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2306 #
2307 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Dan O'Mearadd494642020-05-01 07:42:23 -07002308 "sourceSnapshot": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002309 #
2310 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2311 # global/snapshots/my-backup
2312 #
2313 #
2314 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002315 "diskName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002316 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07002317 "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002318 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
2319 "a_key": "A String",
2320 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002321 "sourceImageEncryptionKey": { # 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.
2322 #
2323 # 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.
2324 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002325 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002326 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2327 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2328 #
2329 # The key must meet the following requirements before you can provide it to Compute Engine:
2330 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002331 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002332 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002333 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002334 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002335 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002336 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2337 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002338 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002339 # 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:
2340 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2341 # - projects/project/zones/zone/diskTypes/diskType
2342 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002343 "guestOsFeatures": [ # 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.
2344 #
2345 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2346 { # Guest OS features.
2347 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2348 },
2349 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002350 "diskSizeGb": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002351 "resourcePolicies": [ # 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.
2352 "A String",
2353 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002354 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002355 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002356 # 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:
2357 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002358 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002359 #
2360 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002361 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002362 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002363 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002364 # To create a disk with a custom image that you created, specify the image name in the following format:
2365 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002366 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002367 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002368 # 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:
2369 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002370 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002371 #
2372 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002373 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2374 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002375 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002376 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2377 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2378 #
2379 # The key must meet the following requirements before you can provide it to Compute Engine:
2380 # - The key is wrapped using a RSA public key certificate provided by Google.
2381 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2382 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2383 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2384 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002385 },
2386 "autoDelete": 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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002387 "index": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002388 "boot": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002389 "shieldedInstanceInitialState": { # 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
2390 "dbxs": [ # The forbidden key database (dbx).
2391 {
2392 "content": "A String", # The raw content in the secure keys file.
2393 "fileType": "A String",
2394 },
2395 ],
2396 "dbs": [ # The Key Database (db).
2397 {
2398 "content": "A String", # The raw content in the secure keys file.
2399 "fileType": "A String",
2400 },
2401 ],
2402 "keks": [ # The Key Exchange Key (KEK).
2403 {
2404 "content": "A String", # The raw content in the secure keys file.
2405 "fileType": "A String",
2406 },
2407 ],
2408 "pk": { # The Platform Key (PK).
2409 "content": "A String", # The raw content in the secure keys file.
2410 "fileType": "A String",
2411 },
2412 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002413 "guestOsFeatures": [ # 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.
2414 { # Guest OS features.
2415 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2416 },
2417 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002418 "diskSizeGb": "A String", # The size of the disk in GB.
2419 "mode": "A String", # 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.
2420 "interface": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002421 "licenses": [ # [Output Only] Any valid publicly visible licenses.
2422 "A String",
2423 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002424 "type": "A String", # 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 -07002425 "source": "A String", # 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 -08002426 #
2427 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2428 #
2429 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002430 },
2431 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002432 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002433}
2434
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002435 sourceInstanceTemplate: string, Specifies instance template to create the instance.
2436
2437This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2438- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
2439- projects/project/global/instanceTemplates/instanceTemplate
2440- global/instanceTemplates/instanceTemplate
Dan O'Mearadd494642020-05-01 07:42:23 -07002441 sourceMachineImage: string, Specifies instance machine to create the instance.
2442
2443This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2444- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
2445- projects/project/global/global/machineImages/machineImage
2446- global/machineImages/machineImage
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002447 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.
2448
2449For 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.
2450
2451The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002452
2453Returns:
2454 An object of the form:
2455
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002456 { # Represents an Operation resource.
2457 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002458 # Google Compute Engine has three Operation resources:
2459 #
2460 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2461 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002462 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2463 #
2464 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002465 # - For global operations, use the `globalOperations` resource.
2466 # - For regional operations, use the `regionOperations` resource.
2467 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002468 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002469 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002470 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002471 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002472 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002473 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002474 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002475 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002476 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2477 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002478 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002479 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002480 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002481 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002482 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2483 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2484 {
2485 "message": "A String", # [Output Only] A human-readable description of the warning code.
2486 "code": "A String", # [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 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2488 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2489 {
2490 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2491 "key": "A String", # [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).
2492 },
2493 ],
2494 },
2495 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002496 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002497 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07002498 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2499 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002500 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002501 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2502 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2503 {
2504 "message": "A String", # [Output Only] An optional, human-readable error message.
2505 "code": "A String", # [Output Only] The error type identifier for this error.
2506 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2507 },
2508 ],
2509 },
2510 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2511 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002512 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002513 }</pre>
2514</div>
2515
2516<div class="method">
2517 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
2518 <pre>Retrieves the list of instances contained within the specified zone.
2519
2520Args:
2521 project: string, Project ID for this request. (required)
2522 zone: string, The name of the zone for this request. (required)
2523 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2524
Dan O'Mearadd494642020-05-01 07:42:23 -07002525You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002526
Dan O'Mearadd494642020-05-01 07:42:23 -07002527Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2528 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`)
2529 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.
2530 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002531
Dan O'Mearadd494642020-05-01 07:42:23 -07002532For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002533
Dan O'Mearadd494642020-05-01 07:42:23 -07002534You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002535
Dan O'Mearadd494642020-05-01 07:42:23 -07002536To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002537
2538Returns:
2539 An object of the form:
2540
2541 { # Contains a list of instances.
2542 "nextPageToken": "A String", # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002543 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
2544 "items": [ # A list of Instance resources.
2545 { # Represents an Instance resource.
2546 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002547 # 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 Kim715bd7f2019-06-14 16:50:42 -07002548 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
Dan O'Mearadd494642020-05-01 07:42:23 -07002549 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2550 "values": [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002551 "A String",
2552 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002553 "key": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002554 "consumeReservationType": "A String", # 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.
2555 },
2556 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002557 { # A specification of the type and number of accelerator cards attached to the instance.
2558 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002559 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002560 },
2561 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002562 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002563 "a_key": "A String",
2564 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002565 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
2566 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
2567 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002568 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
2569 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002570 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002571 "automaticRestart": 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.
2572 #
2573 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -07002574 "nodeAffinities": [ # 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 -07002575 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07002576 "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002577 "values": [ # Corresponds to the label values of Node resource.
2578 "A String",
2579 ],
2580 "key": "A String", # Corresponds to the label key of Node resource.
2581 },
2582 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002583 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002584 "onHostMaintenance": "A String", # 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.
2585 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002586 "minCpuPlatform": "A String", # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002587 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
2588 #
2589 # 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.
2590 { # A service account.
2591 "scopes": [ # The list of scopes to be made available for this service account.
2592 "A String",
2593 ],
2594 "email": "A String", # Email address of the service account.
2595 },
2596 ],
2597 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2598 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002599 "networkInterfaces": [ # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002600 { # A network interface resource attached to an instance.
2601 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002602 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002603 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002604 "subnetworkRangeName": "A String", # 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.
2605 "ipCidrRange": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002606 },
2607 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002608 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
2609 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002610 "accessConfigs": [ # 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.
2611 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
2612 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002613 "name": "A String", # 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.
2614 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
2615 #
2616 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2617 #
2618 # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002619 "natIP": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002620 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
2621 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2622 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002623 },
2624 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002625 "networkIP": "A String", # 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.
2626 "fingerprint": "A String", # 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.
2627 "subnetwork": "A String", # 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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002628 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2629 # - regions/region/subnetworks/subnetwork
Dan O'Mearadd494642020-05-01 07:42:23 -07002630 "network": "A String", # 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.
2631 #
2632 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2633 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2634 # - projects/project/global/networks/network
2635 # - global/networks/default
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002636 },
2637 ],
2638 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002639 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
2640 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2641 },
2642 "shieldedInstanceConfig": { # A set of Shielded Instance options.
2643 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2644 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2645 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2646 },
2647 "zone": "A String", # [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 -07002648 "hostname": "A String", # 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.
2649 "sourceMachineImage": "A String", # Source machine image
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002650 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
2651 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2652 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002653 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
2654 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2655 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2656 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002657 "value": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002658 "key": "A String", # 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.
2659 },
2660 ],
2661 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002662 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata'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.
2663 #
2664 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002665 },
2666 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002667 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002668 "canIpForward": 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.
2669 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002670 "tags": { # 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 'tags.items' field.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002671 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2672 "A String",
2673 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002674 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002675 #
2676 # To see the latest fingerprint, make get() request to the instance.
2677 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002678 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
2679 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
2680 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
2681 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2682 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2683 #
2684 # The key must meet the following requirements before you can provide it to Compute Engine:
2685 # - The key is wrapped using a RSA public key certificate provided by Google.
2686 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2687 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2688 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2689 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002690 "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the label'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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002691 #
2692 # To see the latest fingerprint, make get() request to the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002693 "resourcePolicies": [ # Resource policies applied to this instance.
2694 "A String",
2695 ],
2696 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
2697 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the instance'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.
2698 #
2699 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002700 "machineType": "A String", # 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:
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002701 # zones/us-central1-f/machineTypes/n1-standard-1
2702 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002703 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002704 # 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):
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002705 # zones/zone/machineTypes/custom-CPUS-MEMORY
2706 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002707 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002708 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2709 #
2710 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002711 "shieldedVmConfig": { # A set of Shielded VM options.
2712 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2713 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2714 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2715 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002716 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002717 "name": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002718 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
2719 { # An instance-attached disk resource.
2720 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
2721 #
2722 # 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.
2723 #
2724 # 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.
2725 #
2726 # 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.
2727 #
2728 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
2729 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002730 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002731 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2732 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2733 #
2734 # The key must meet the following requirements before you can provide it to Compute Engine:
2735 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002736 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002737 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002738 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002739 },
2740 "deviceName": "A String", # 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.
2741 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002742 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002743 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2744 "initializeParams": { # [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.
2745 #
2746 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2747 #
2748 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
Dan O'Mearadd494642020-05-01 07:42:23 -07002749 "sourceSnapshot": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002750 #
2751 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2752 # global/snapshots/my-backup
2753 #
2754 #
2755 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002756 "diskName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002757 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07002758 "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002759 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
2760 "a_key": "A String",
2761 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002762 "sourceImageEncryptionKey": { # 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.
2763 #
2764 # 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.
2765 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002766 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002767 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2768 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2769 #
2770 # The key must meet the following requirements before you can provide it to Compute Engine:
2771 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002772 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002773 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002774 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002775 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002776 "diskType": "A String", # Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002777 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2778 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002779 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002780 # 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:
2781 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2782 # - projects/project/zones/zone/diskTypes/diskType
2783 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002784 "guestOsFeatures": [ # 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.
2785 #
2786 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2787 { # Guest OS features.
2788 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2789 },
2790 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002791 "diskSizeGb": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002792 "resourcePolicies": [ # 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.
2793 "A String",
2794 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002795 "sourceImage": "A String", # The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002796 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002797 # 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:
2798 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002799 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002800 #
2801 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002802 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002803 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002804 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002805 # To create a disk with a custom image that you created, specify the image name in the following format:
2806 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002807 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002808 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002809 # 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:
2810 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002811 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002812 #
2813 # If the source image is deleted later, this field will not be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002814 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2815 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002816 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002817 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2818 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2819 #
2820 # The key must meet the following requirements before you can provide it to Compute Engine:
2821 # - The key is wrapped using a RSA public key certificate provided by Google.
2822 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2823 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2824 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2825 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002826 },
2827 "autoDelete": 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).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002828 "index": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002829 "boot": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002830 "shieldedInstanceInitialState": { # 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
2831 "dbxs": [ # The forbidden key database (dbx).
2832 {
2833 "content": "A String", # The raw content in the secure keys file.
2834 "fileType": "A String",
2835 },
2836 ],
2837 "dbs": [ # The Key Database (db).
2838 {
2839 "content": "A String", # The raw content in the secure keys file.
2840 "fileType": "A String",
2841 },
2842 ],
2843 "keks": [ # The Key Exchange Key (KEK).
2844 {
2845 "content": "A String", # The raw content in the secure keys file.
2846 "fileType": "A String",
2847 },
2848 ],
2849 "pk": { # The Platform Key (PK).
2850 "content": "A String", # The raw content in the secure keys file.
2851 "fileType": "A String",
2852 },
2853 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002854 "guestOsFeatures": [ # 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.
2855 { # Guest OS features.
2856 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2857 },
2858 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002859 "diskSizeGb": "A String", # The size of the disk in GB.
2860 "mode": "A String", # 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.
2861 "interface": "A String", # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002862 "licenses": [ # [Output Only] Any valid publicly visible licenses.
2863 "A String",
2864 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002865 "type": "A String", # 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 -07002866 "source": "A String", # 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 -08002867 #
2868 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2869 #
2870 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002871 },
2872 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002873 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002874 },
2875 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002876 "warning": { # [Output Only] Informational warning message.
2877 "message": "A String", # [Output Only] A human-readable description of the warning code.
2878 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2879 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2880 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2881 {
2882 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2883 "key": "A String", # [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).
2884 },
2885 ],
2886 },
2887 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002888 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2889 }</pre>
2890</div>
2891
2892<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002893 <code class="details" id="listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, maxResults=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002894 <pre>Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002895
2896Args:
2897 project: string, Project ID for this request. (required)
2898 zone: string, The name of the zone for this request. (required)
2899 instance: string, Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. (required)
2900 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2901
Dan O'Mearadd494642020-05-01 07:42:23 -07002902You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002903
Dan O'Mearadd494642020-05-01 07:42:23 -07002904Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2905 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002906
Dan O'Mearadd494642020-05-01 07:42:23 -07002907For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002908
Dan O'Mearadd494642020-05-01 07:42:23 -07002909You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002910
Dan O'Mearadd494642020-05-01 07:42:23 -07002911To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
2912 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`)
2913 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002914
2915Returns:
2916 An object of the form:
2917
2918 { # Contains a list of instance referrers.
2919 "nextPageToken": "A String", # [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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002920 "kind": "compute#instanceListReferrers", # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
2921 "items": [ # A list of Reference resources.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002922 { # Represents a reference to a resource.
2923 "referrer": "A String", # URL of the resource which refers to the target.
2924 "kind": "compute#reference", # [Output Only] Type of the resource. Always compute#reference for references.
2925 "referenceType": "A String", # A description of the reference type with no implied semantics. Possible values include:
2926 # - MEMBER_OF
2927 "target": "A String", # URL of the resource to which this reference points.
2928 },
2929 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002930 "warning": { # [Output Only] Informational warning message.
2931 "message": "A String", # [Output Only] A human-readable description of the warning code.
2932 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2933 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2934 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2935 {
2936 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2937 "key": "A String", # [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).
2938 },
2939 ],
2940 },
2941 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002942 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2943 }</pre>
2944</div>
2945
2946<div class="method">
2947 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
2948 <pre>Retrieves the next page of results.
2949
2950Args:
2951 previous_request: The request for the previous page. (required)
2952 previous_response: The response from the request for the previous page. (required)
2953
2954Returns:
2955 A request object that you can call 'execute()' on to request the next
2956 page. Returns None if there are no more items in the collection.
2957 </pre>
2958</div>
2959
2960<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002961 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2962 <pre>Retrieves the next page of results.
2963
2964Args:
2965 previous_request: The request for the previous page. (required)
2966 previous_response: The response from the request for the previous page. (required)
2967
2968Returns:
2969 A request object that you can call 'execute()' on to request the next
2970 page. Returns None if there are no more items in the collection.
2971 </pre>
2972</div>
2973
2974<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002975 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
2976 <pre>Removes resource policies from an instance.
2977
2978Args:
2979 project: string, Project ID for this request. (required)
2980 zone: string, The name of the zone for this request. (required)
2981 instance: string, The instance name for this request. (required)
2982 body: object, The request body.
2983 The object takes the form of:
2984
2985{
2986 "resourcePolicies": [ # Resource policies to be removed from this instance.
2987 "A String",
2988 ],
2989 }
2990
2991 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.
2992
2993For 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.
2994
2995The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2996
2997Returns:
2998 An object of the form:
2999
3000 { # Represents an Operation resource.
3001 #
3002 # Google Compute Engine has three Operation resources:
3003 #
3004 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3005 #
3006 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3007 #
3008 # Operations can be global, regional or zonal.
3009 # - For global operations, use the `globalOperations` resource.
3010 # - For regional operations, use the `regionOperations` resource.
3011 # - For zonal operations, use the `zonalOperations` resource.
3012 #
3013 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
3014 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3015 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3016 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
3017 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
3018 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3019 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
3020 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3021 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
3022 "progress": 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.
3023 "httpErrorStatusCode": 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.
3024 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
3025 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
3026 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3027 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3028 {
3029 "message": "A String", # [Output Only] A human-readable description of the warning code.
3030 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3031 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3032 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3033 {
3034 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3035 "key": "A String", # [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).
3036 },
3037 ],
3038 },
3039 ],
3040 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
3041 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
3042 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3043 "name": "A String", # [Output Only] Name of the operation.
3044 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3045 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3046 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3047 {
3048 "message": "A String", # [Output Only] An optional, human-readable error message.
3049 "code": "A String", # [Output Only] The error type identifier for this error.
3050 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3051 },
3052 ],
3053 },
3054 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3055 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3056 "targetLink": "A String", # [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.
3057 }</pre>
3058</div>
3059
3060<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003061 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
3062 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003063
3064Args:
3065 project: string, Project ID for this request. (required)
3066 zone: string, The name of the zone for this request. (required)
3067 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003068 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.
3069
3070For 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.
3071
3072The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003073
3074Returns:
3075 An object of the form:
3076
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003077 { # Represents an Operation resource.
3078 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003079 # Google Compute Engine has three Operation resources:
3080 #
3081 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3082 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003083 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3084 #
3085 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003086 # - For global operations, use the `globalOperations` resource.
3087 # - For regional operations, use the `regionOperations` resource.
3088 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003089 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003090 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003091 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003092 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003093 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003094 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003095 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003096 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003097 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3098 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003099 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003100 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003101 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003102 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003103 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3104 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3105 {
3106 "message": "A String", # [Output Only] A human-readable description of the warning code.
3107 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3108 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3109 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3110 {
3111 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3112 "key": "A String", # [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).
3113 },
3114 ],
3115 },
3116 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003117 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003118 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003119 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3120 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003121 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003122 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3123 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3124 {
3125 "message": "A String", # [Output Only] An optional, human-readable error message.
3126 "code": "A String", # [Output Only] The error type identifier for this error.
3127 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3128 },
3129 ],
3130 },
3131 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3132 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003133 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003134 }</pre>
3135</div>
3136
3137<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003138 <code class="details" id="resume">resume(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003139 <pre>Resumes an instance that was suspended using the instances().suspend method.
3140
3141Args:
3142 project: string, Project ID for this request. (required)
3143 zone: string, The name of the zone for this request. (required)
3144 instance: string, Name of the instance resource to resume. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003145 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003146 The object takes the form of:
3147
3148{
3149 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
3150 #
3151 # If the instance you are starting is protected with a customer-supplied encryption key, the correct key must be provided otherwise the instance resume will not succeed.
3152 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003153 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003154 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3155 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3156 #
3157 # The key must meet the following requirements before you can provide it to Compute Engine:
3158 # - The key is wrapped using a RSA public key certificate provided by Google.
3159 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3160 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3161 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
3162 },
3163 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
3164 #
3165 # In order to resume the instance, the disk url and its corresponding key must be provided.
3166 #
3167 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
3168 {
3169 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
3170 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07003171 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003172 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3173 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3174 #
3175 # The key must meet the following requirements before you can provide it to Compute Engine:
3176 # - The key is wrapped using a RSA public key certificate provided by Google.
3177 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3178 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3179 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
3180 },
3181 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
3182 },
3183 ],
3184 }
3185
3186 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.
3187
3188For 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.
3189
3190The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3191
3192Returns:
3193 An object of the form:
3194
3195 { # Represents an Operation resource.
3196 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003197 # Google Compute Engine has three Operation resources:
3198 #
3199 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3200 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003201 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3202 #
3203 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003204 # - For global operations, use the `globalOperations` resource.
3205 # - For regional operations, use the `regionOperations` resource.
3206 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003207 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003208 # 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 Kim715bd7f2019-06-14 16:50:42 -07003209 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3210 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3211 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003212 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003213 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3214 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003215 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3216 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003217 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003218 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003219 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003220 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003221 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3222 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3223 {
3224 "message": "A String", # [Output Only] A human-readable description of the warning code.
3225 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3226 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3227 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3228 {
3229 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3230 "key": "A String", # [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).
3231 },
3232 ],
3233 },
3234 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003235 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003236 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003237 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3238 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003239 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3240 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3241 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3242 {
3243 "message": "A String", # [Output Only] An optional, human-readable error message.
3244 "code": "A String", # [Output Only] The error type identifier for this error.
3245 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3246 },
3247 ],
3248 },
3249 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3250 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3251 "targetLink": "A String", # [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.
3252 }</pre>
3253</div>
3254
3255<div class="method">
3256 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
3257 <pre>Sets deletion protection on the instance.
3258
3259Args:
3260 project: string, Project ID for this request. (required)
3261 zone: string, The name of the zone for this request. (required)
3262 resource: string, Name or id of the resource for this request. (required)
3263 deletionProtection: boolean, Whether the resource should be protected against deletion.
3264 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.
3265
3266For 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.
3267
3268The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3269
3270Returns:
3271 An object of the form:
3272
3273 { # Represents an Operation resource.
3274 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003275 # Google Compute Engine has three Operation resources:
3276 #
3277 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3278 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003279 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3280 #
3281 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003282 # - For global operations, use the `globalOperations` resource.
3283 # - For regional operations, use the `regionOperations` resource.
3284 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003285 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003286 # 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 Kim715bd7f2019-06-14 16:50:42 -07003287 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3288 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3289 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003290 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003291 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3292 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003293 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3294 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003295 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003296 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003297 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003298 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003299 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3300 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3301 {
3302 "message": "A String", # [Output Only] A human-readable description of the warning code.
3303 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3304 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3305 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3306 {
3307 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3308 "key": "A String", # [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).
3309 },
3310 ],
3311 },
3312 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003313 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003314 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003315 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3316 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003317 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3318 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3319 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3320 {
3321 "message": "A String", # [Output Only] An optional, human-readable error message.
3322 "code": "A String", # [Output Only] The error type identifier for this error.
3323 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3324 },
3325 ],
3326 },
3327 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3328 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3329 "targetLink": "A String", # [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.
3330 }</pre>
3331</div>
3332
3333<div class="method">
3334 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003335 <pre>Sets the auto-delete flag for a disk attached to an instance.
3336
3337Args:
3338 project: string, Project ID for this request. (required)
3339 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003340 instance: string, The instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003341 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003342 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)
3343 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.
3344
3345For 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.
3346
3347The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003348
3349Returns:
3350 An object of the form:
3351
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003352 { # Represents an Operation resource.
3353 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003354 # Google Compute Engine has three Operation resources:
3355 #
3356 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3357 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003358 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3359 #
3360 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003361 # - For global operations, use the `globalOperations` resource.
3362 # - For regional operations, use the `regionOperations` resource.
3363 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003364 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003365 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003366 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003367 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003368 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003369 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003370 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003371 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003372 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3373 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003374 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003375 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003376 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003377 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003378 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3379 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3380 {
3381 "message": "A String", # [Output Only] A human-readable description of the warning code.
3382 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3383 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3384 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3385 {
3386 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3387 "key": "A String", # [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).
3388 },
3389 ],
3390 },
3391 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003392 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003393 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003394 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3395 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003396 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003397 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3398 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3399 {
3400 "message": "A String", # [Output Only] An optional, human-readable error message.
3401 "code": "A String", # [Output Only] The error type identifier for this error.
3402 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3403 },
3404 ],
3405 },
3406 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3407 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003408 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003409 }</pre>
3410</div>
3411
3412<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003413 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003414 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
3415
3416Args:
3417 project: string, Project ID for this request. (required)
3418 zone: string, The name of the zone for this request. (required)
3419 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003420 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003421 The object takes the form of:
3422
3423{
Dan O'Mearadd494642020-05-01 07:42:23 -07003424 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the 'resource'. 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 -07003425 #
3426 #
3427 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003428 # 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 -07003429 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003430 # Optionally, a `binding` can 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003431 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003432 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003433 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003434 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003435 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003436 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003437 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003438 # 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('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003439 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003440 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003441 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
3442 { # 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.
3443 #
3444 # 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.
3445 #
3446 # Example Policy with multiple AuditConfigs:
3447 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003448 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003449 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003450 # 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 Kim715bd7f2019-06-14 16:50:42 -07003451 "exemptedMembers": [
3452 "A String",
3453 ],
3454 "auditLogConfigs": [ # The configuration for logging of each type of permission.
3455 { # Provides the configuration for logging a type of permissions. Example:
3456 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003457 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003458 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003459 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003460 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3461 "A String",
3462 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003463 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003464 "logType": "A String", # The log type that this config enables.
3465 },
3466 ],
3467 "service": "A String", # 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.
3468 },
3469 ],
3470 "rules": [ # 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.
3471 { # A rule to be applied in a Policy.
3472 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3473 { # Specifies what kind of log the caller must write
3474 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
3475 #
3476 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
3477 #
3478 # Field names correspond to IAM request parameters and field values are their respective values.
3479 #
3480 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
3481 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003482 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003483 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07003484 "customFields": [ # Custom fields.
3485 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3486 "name": "A String", # Name is the field name.
3487 "value": "A String", # 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.
3488 },
3489 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003490 "metric": "A String", # The metric to update.
3491 },
3492 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07003493 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003494 },
3495 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
3496 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
3497 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3498 "permissionType": "A String", # The type of the permission that was checked.
3499 },
3500 },
3501 },
3502 ],
3503 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
3504 "A String",
3505 ],
3506 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
3507 "A String",
3508 ],
3509 "action": "A String", # Required
3510 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
3511 "A String",
3512 ],
3513 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3514 { # A condition to be met.
3515 "iam": "A String", # Trusted attributes supplied by the IAM system.
3516 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3517 "values": [ # The objects of the condition.
3518 "A String",
3519 ],
3520 "svc": "A String", # Trusted attributes discharged by the service.
3521 "op": "A String", # An operator to apply the subject with.
3522 },
3523 ],
3524 "description": "A String", # Human-readable description of the rule.
3525 },
3526 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003527 "version": 42, # Specifies the format of the policy.
3528 #
3529 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3530 #
3531 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3532 #
3533 # * 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
3534 #
3535 # **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.
3536 #
3537 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003538 "etag": "A String", # `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.
3539 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003540 # **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.
3541 "bindings": [ # 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 -07003542 { # Associates `members` with a `role`.
3543 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3544 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3545 #
3546 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3547 #
3548 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3549 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003550 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003551 #
3552 #
3553 #
3554 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3555 #
3556 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3557 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003558 # * `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.
3559 #
3560 # * `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.
3561 #
3562 # * `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.
3563 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003564 #
3565 #
3566 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
3567 "A String",
3568 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003569 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003570 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003571 # Example (Comparison):
3572 #
3573 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
3574 #
3575 # Example (Equality):
3576 #
3577 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
3578 #
3579 # Example (Logic):
3580 #
3581 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
3582 #
3583 # Example (Data Manipulation):
3584 #
3585 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
3586 #
3587 # 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.
3588 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003589 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07003590 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
3591 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003592 },
3593 },
3594 ],
3595 "iamOwned": True or False,
3596 },
3597 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.
3598 { # Associates `members` with a `role`.
3599 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3600 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3601 #
3602 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3603 #
3604 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3605 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003606 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003607 #
3608 #
3609 #
3610 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3611 #
3612 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3613 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003614 # * `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.
3615 #
3616 # * `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.
3617 #
3618 # * `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.
3619 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003620 #
3621 #
3622 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
3623 "A String",
3624 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003625 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003626 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003627 # Example (Comparison):
3628 #
3629 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
3630 #
3631 # Example (Equality):
3632 #
3633 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
3634 #
3635 # Example (Logic):
3636 #
3637 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
3638 #
3639 # Example (Data Manipulation):
3640 #
3641 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
3642 #
3643 # 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.
3644 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003645 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07003646 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
3647 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003648 },
3649 },
3650 ],
3651 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
3652 }
3653
3654
3655Returns:
3656 An object of the form:
3657
Dan O'Mearadd494642020-05-01 07:42:23 -07003658 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003659 #
3660 #
3661 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003662 # 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 -07003663 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003664 # Optionally, a `binding` can 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003665 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003666 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003667 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003668 # { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003669 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003670 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003671 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003672 # 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('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003673 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003674 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003675 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
3676 { # 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.
3677 #
3678 # 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.
3679 #
3680 # Example Policy with multiple AuditConfigs:
3681 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003682 # { "audit_configs": [ { "service": "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "sampleservice.googleapis.com" "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003683 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003684 # 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 Kim715bd7f2019-06-14 16:50:42 -07003685 "exemptedMembers": [
3686 "A String",
3687 ],
3688 "auditLogConfigs": [ # The configuration for logging of each type of permission.
3689 { # Provides the configuration for logging a type of permissions. Example:
3690 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003691 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003692 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003693 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003694 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3695 "A String",
3696 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003697 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003698 "logType": "A String", # The log type that this config enables.
3699 },
3700 ],
3701 "service": "A String", # 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.
3702 },
3703 ],
3704 "rules": [ # 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.
3705 { # A rule to be applied in a Policy.
3706 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3707 { # Specifies what kind of log the caller must write
3708 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
3709 #
3710 # Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
3711 #
3712 # Field names correspond to IAM request parameters and field values are their respective values.
3713 #
3714 # Supported field names: - "authority", which is "[token]" if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - "iam_principal", a representation of IAMContext.principal even if a token or authority selector is present; or - "" (empty string), resulting in a counter with no fields.
3715 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003716 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003717 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07003718 "customFields": [ # Custom fields.
3719 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3720 "name": "A String", # Name is the field name.
3721 "value": "A String", # 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.
3722 },
3723 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003724 "metric": "A String", # The metric to update.
3725 },
3726 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07003727 "logMode": "A String", # Whether Gin logging should happen in a fail-closed manner at the caller. This is currently supported in the LocalIAM implementation, Stubby C++, and Stubby Java. For Apps Framework, see go/af-audit-logging#failclosed. TODO(b/77591626): Add support for Stubby Go. TODO(b/129671387): Add support for Scaffolding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003728 },
3729 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
3730 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
3731 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3732 "permissionType": "A String", # The type of the permission that was checked.
3733 },
3734 },
3735 },
3736 ],
3737 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
3738 "A String",
3739 ],
3740 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
3741 "A String",
3742 ],
3743 "action": "A String", # Required
3744 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
3745 "A String",
3746 ],
3747 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3748 { # A condition to be met.
3749 "iam": "A String", # Trusted attributes supplied by the IAM system.
3750 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3751 "values": [ # The objects of the condition.
3752 "A String",
3753 ],
3754 "svc": "A String", # Trusted attributes discharged by the service.
3755 "op": "A String", # An operator to apply the subject with.
3756 },
3757 ],
3758 "description": "A String", # Human-readable description of the rule.
3759 },
3760 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003761 "version": 42, # Specifies the format of the policy.
3762 #
3763 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3764 #
3765 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3766 #
3767 # * 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
3768 #
3769 # **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.
3770 #
3771 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003772 "etag": "A String", # `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.
3773 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003774 # **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.
3775 "bindings": [ # 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 -07003776 { # Associates `members` with a `role`.
3777 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3778 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3779 #
3780 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3781 #
3782 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3783 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003784 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003785 #
3786 #
3787 #
3788 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3789 #
3790 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3791 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003792 # * `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.
3793 #
3794 # * `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.
3795 #
3796 # * `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.
3797 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003798 #
3799 #
3800 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
3801 "A String",
3802 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003803 "condition": { # 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. NOTE: An unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003804 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003805 # Example (Comparison):
3806 #
3807 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
3808 #
3809 # Example (Equality):
3810 #
3811 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
3812 #
3813 # Example (Logic):
3814 #
3815 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
3816 #
3817 # Example (Data Manipulation):
3818 #
3819 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
3820 #
3821 # 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.
3822 "title": "A String", # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003823 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07003824 "description": "A String", # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
3825 "location": "A String", # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003826 },
3827 },
3828 ],
3829 "iamOwned": True or False,
3830 }</pre>
3831</div>
3832
3833<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003834 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003835 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003836
3837Args:
3838 project: string, Project ID for this request. (required)
3839 zone: string, The name of the zone for this request. (required)
3840 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003841 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003842 The object takes the form of:
3843
3844{
3845 "labelFingerprint": "A String", # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003846 "labels": {
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003847 "a_key": "A String",
3848 },
3849 }
3850
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003851 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.
3852
3853For 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.
3854
3855The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003856
3857Returns:
3858 An object of the form:
3859
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003860 { # Represents an Operation resource.
3861 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003862 # Google Compute Engine has three Operation resources:
3863 #
3864 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3865 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003866 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3867 #
3868 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003869 # - For global operations, use the `globalOperations` resource.
3870 # - For regional operations, use the `regionOperations` resource.
3871 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003872 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003873 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003874 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003875 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003876 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003877 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003878 "zone": "A String", # [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 -04003879 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003880 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3881 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003882 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003883 "httpErrorStatusCode": 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003884 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003885 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003886 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3887 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3888 {
3889 "message": "A String", # [Output Only] A human-readable description of the warning code.
3890 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3891 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3892 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3893 {
3894 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3895 "key": "A String", # [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).
3896 },
3897 ],
3898 },
3899 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003900 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003901 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003902 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3903 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003904 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003905 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3906 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3907 {
3908 "message": "A String", # [Output Only] An optional, human-readable error message.
3909 "code": "A String", # [Output Only] The error type identifier for this error.
3910 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3911 },
3912 ],
3913 },
3914 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3915 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3916 "targetLink": "A String", # [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.
3917 }</pre>
3918</div>
3919
3920<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003921 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003922 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
3923
3924Args:
3925 project: string, Project ID for this request. (required)
3926 zone: string, The name of the zone for this request. (required)
3927 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003928 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003929 The object takes the form of:
3930
3931{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003932 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003933 { # A specification of the type and number of accelerator cards attached to the instance.
3934 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003935 "acceleratorType": "A String", # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003936 },
3937 ],
3938 }
3939
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003940 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.
3941
3942For 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.
3943
3944The 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 -04003945
3946Returns:
3947 An object of the form:
3948
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003949 { # Represents an Operation resource.
3950 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003951 # Google Compute Engine has three Operation resources:
3952 #
3953 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3954 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003955 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3956 #
3957 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003958 # - For global operations, use the `globalOperations` resource.
3959 # - For regional operations, use the `regionOperations` resource.
3960 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003961 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003962 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003963 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003964 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003965 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003966 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003967 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003968 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003969 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3970 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003971 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003972 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003973 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003974 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003975 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3976 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3977 {
3978 "message": "A String", # [Output Only] A human-readable description of the warning code.
3979 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
3980 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3981 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3982 {
3983 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3984 "key": "A String", # [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 },
3986 ],
3987 },
3988 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003989 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003990 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07003991 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3992 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003993 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003994 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3995 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3996 {
3997 "message": "A String", # [Output Only] An optional, human-readable error message.
3998 "code": "A String", # [Output Only] The error type identifier for this error.
3999 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4000 },
4001 ],
4002 },
4003 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4004 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004005 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004006 }</pre>
4007</div>
4008
4009<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004010 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004011 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
4012
4013Args:
4014 project: string, Project ID for this request. (required)
4015 zone: string, The name of the zone for this request. (required)
4016 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004017 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004018 The object takes the form of:
4019
4020{
4021 "machineType": "A String", # 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
4022 }
4023
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004024 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.
4025
4026For 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.
4027
4028The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004029
4030Returns:
4031 An object of the form:
4032
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004033 { # Represents an Operation resource.
4034 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004035 # Google Compute Engine has three Operation resources:
4036 #
4037 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4038 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004039 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4040 #
4041 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004042 # - For global operations, use the `globalOperations` resource.
4043 # - For regional operations, use the `regionOperations` resource.
4044 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004045 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004046 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004047 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004048 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004049 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004050 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004051 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004052 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004053 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4054 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004055 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004056 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004057 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004058 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004059 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4060 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4061 {
4062 "message": "A String", # [Output Only] A human-readable description of the warning code.
4063 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4064 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4065 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4066 {
4067 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4068 "key": "A String", # [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).
4069 },
4070 ],
4071 },
4072 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004073 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004074 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004075 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4076 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004077 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004078 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4079 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4080 {
4081 "message": "A String", # [Output Only] An optional, human-readable error message.
4082 "code": "A String", # [Output Only] The error type identifier for this error.
4083 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4084 },
4085 ],
4086 },
4087 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4088 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004089 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004090 }</pre>
4091</div>
4092
4093<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004094 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004095 <pre>Sets metadata for the specified instance to the data included in the request.
4096
4097Args:
4098 project: string, Project ID for this request. (required)
4099 zone: string, The name of the zone for this request. (required)
4100 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004101 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004102 The object takes the form of:
4103
4104{ # A metadata key/value entry.
4105 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4106 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004107 "value": "A String", # 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).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004108 "key": "A String", # 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.
4109 },
4110 ],
4111 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004112 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata'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.
4113 #
4114 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004115}
4116
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004117 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.
4118
4119For 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.
4120
4121The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004122
4123Returns:
4124 An object of the form:
4125
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004126 { # Represents an Operation resource.
4127 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004128 # Google Compute Engine has three Operation resources:
4129 #
4130 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4131 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004132 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4133 #
4134 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004135 # - For global operations, use the `globalOperations` resource.
4136 # - For regional operations, use the `regionOperations` resource.
4137 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004138 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004139 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004140 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004141 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004142 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004143 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004144 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004145 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004146 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4147 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004148 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004149 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004150 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004151 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004152 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4153 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4154 {
4155 "message": "A String", # [Output Only] A human-readable description of the warning code.
4156 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4157 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4158 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4159 {
4160 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4161 "key": "A String", # [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).
4162 },
4163 ],
4164 },
4165 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004166 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004167 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004168 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4169 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004170 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004171 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4172 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4173 {
4174 "message": "A String", # [Output Only] An optional, human-readable error message.
4175 "code": "A String", # [Output Only] The error type identifier for this error.
4176 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4177 },
4178 ],
4179 },
4180 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4181 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004182 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004183 }</pre>
4184</div>
4185
4186<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004187 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004188 <pre>Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004189
4190Args:
4191 project: string, Project ID for this request. (required)
4192 zone: string, The name of the zone for this request. (required)
4193 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004194 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004195 The object takes the form of:
4196
4197{
4198 "minCpuPlatform": "A String", # Minimum cpu/platform this instance should be started at.
4199 }
4200
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004201 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.
4202
4203For 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.
4204
4205The 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 -04004206
4207Returns:
4208 An object of the form:
4209
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004210 { # Represents an Operation resource.
4211 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004212 # Google Compute Engine has three Operation resources:
4213 #
4214 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4215 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004216 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4217 #
4218 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004219 # - For global operations, use the `globalOperations` resource.
4220 # - For regional operations, use the `regionOperations` resource.
4221 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004222 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004223 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004224 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004225 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004226 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004227 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004228 "zone": "A String", # [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 -04004229 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004230 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4231 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004232 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004233 "httpErrorStatusCode": 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004234 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004235 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004236 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4237 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4238 {
4239 "message": "A String", # [Output Only] A human-readable description of the warning code.
4240 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4241 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4242 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4243 {
4244 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4245 "key": "A String", # [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).
4246 },
4247 ],
4248 },
4249 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004250 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004251 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004252 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4253 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004254 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004255 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4256 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4257 {
4258 "message": "A String", # [Output Only] An optional, human-readable error message.
4259 "code": "A String", # [Output Only] The error type identifier for this error.
4260 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4261 },
4262 ],
4263 },
4264 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4265 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4266 "targetLink": "A String", # [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.
4267 }</pre>
4268</div>
4269
4270<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004271 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004272 <pre>Sets an instance's scheduling options.
4273
4274Args:
4275 project: string, Project ID for this request. (required)
4276 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004277 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004278 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004279 The object takes the form of:
4280
Dan O'Mearadd494642020-05-01 07:42:23 -07004281{ # Sets the scheduling options for an Instance. NextID: 10
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004282 "preemptible": True or False, # Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004283 "automaticRestart": 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 -04004284 #
4285 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -07004286 "nodeAffinities": [ # 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 -07004287 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07004288 "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004289 "values": [ # Corresponds to the label values of Node resource.
4290 "A String",
4291 ],
4292 "key": "A String", # Corresponds to the label key of Node resource.
4293 },
4294 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004295 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004296 "onHostMaintenance": "A String", # 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.
4297}
4298
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004299 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.
4300
4301For 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.
4302
4303The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004304
4305Returns:
4306 An object of the form:
4307
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004308 { # Represents an Operation resource.
4309 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004310 # Google Compute Engine has three Operation resources:
4311 #
4312 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4313 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004314 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4315 #
4316 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004317 # - For global operations, use the `globalOperations` resource.
4318 # - For regional operations, use the `regionOperations` resource.
4319 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004320 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004321 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004322 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004323 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004324 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004325 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004326 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004327 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004328 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4329 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004330 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004331 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004332 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004333 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004334 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4335 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4336 {
4337 "message": "A String", # [Output Only] A human-readable description of the warning code.
4338 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4339 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4340 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4341 {
4342 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4343 "key": "A String", # [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).
4344 },
4345 ],
4346 },
4347 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004348 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004349 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004350 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4351 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004352 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004353 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4354 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4355 {
4356 "message": "A String", # [Output Only] An optional, human-readable error message.
4357 "code": "A String", # [Output Only] The error type identifier for this error.
4358 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4359 },
4360 ],
4361 },
4362 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4363 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004364 "targetLink": "A String", # [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.
4365 }</pre>
4366</div>
4367
4368<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004369 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004370 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004371
4372Args:
4373 project: string, Project ID for this request. (required)
4374 zone: string, The name of the zone for this request. (required)
4375 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004376 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004377 The object takes the form of:
4378
4379{
4380 "scopes": [ # The list of scopes to be made available for this service account.
4381 "A String",
4382 ],
4383 "email": "A String", # Email address of the service account.
4384 }
4385
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004386 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.
4387
4388For 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.
4389
4390The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004391
4392Returns:
4393 An object of the form:
4394
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004395 { # Represents an Operation resource.
4396 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004397 # Google Compute Engine has three Operation resources:
4398 #
4399 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4400 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004401 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4402 #
4403 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004404 # - For global operations, use the `globalOperations` resource.
4405 # - For regional operations, use the `regionOperations` resource.
4406 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004407 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004408 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004409 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004410 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004411 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004412 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004413 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004414 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004415 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4416 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004417 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004418 "httpErrorStatusCode": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004419 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004420 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004421 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4422 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4423 {
4424 "message": "A String", # [Output Only] A human-readable description of the warning code.
4425 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4426 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4427 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4428 {
4429 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4430 "key": "A String", # [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).
4431 },
4432 ],
4433 },
4434 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004435 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004436 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004437 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4438 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004439 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004440 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4441 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4442 {
4443 "message": "A String", # [Output Only] An optional, human-readable error message.
4444 "code": "A String", # [Output Only] The error type identifier for this error.
4445 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4446 },
4447 ],
4448 },
4449 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4450 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4451 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004452 }</pre>
4453</div>
4454
4455<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004456 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004457 <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.
4458
4459Args:
4460 project: string, Project ID for this request. (required)
4461 zone: string, The name of the zone for this request. (required)
4462 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004463 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004464 The object takes the form of:
4465
4466{ # The policy describes the baseline against which Instance boot integrity is measured.
4467 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
4468 }
4469
4470 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.
4471
4472For 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.
4473
4474The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4475
4476Returns:
4477 An object of the form:
4478
4479 { # Represents an Operation resource.
4480 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004481 # Google Compute Engine has three Operation resources:
4482 #
4483 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4484 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004485 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4486 #
4487 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004488 # - For global operations, use the `globalOperations` resource.
4489 # - For regional operations, use the `regionOperations` resource.
4490 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004491 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004492 # 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 Kim715bd7f2019-06-14 16:50:42 -07004493 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4494 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4495 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004496 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004497 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4498 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004499 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4500 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004501 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004502 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004503 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004504 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004505 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4506 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4507 {
4508 "message": "A String", # [Output Only] A human-readable description of the warning code.
4509 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4510 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4511 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4512 {
4513 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4514 "key": "A String", # [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).
4515 },
4516 ],
4517 },
4518 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004519 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004520 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004521 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4522 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004523 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4524 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4525 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4526 {
4527 "message": "A String", # [Output Only] An optional, human-readable error message.
4528 "code": "A String", # [Output Only] The error type identifier for this error.
4529 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4530 },
4531 ],
4532 },
4533 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4534 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4535 "targetLink": "A String", # [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.
4536 }</pre>
4537</div>
4538
4539<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004540 <code class="details" id="setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004541 <pre>Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
4542
4543Args:
4544 project: string, Project ID for this request. (required)
4545 zone: string, The name of the zone for this request. (required)
4546 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004547 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004548 The object takes the form of:
4549
4550{ # The policy describes the baseline against which VM instance boot integrity is measured.
4551 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
4552 }
4553
4554 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.
4555
4556For 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.
4557
4558The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4559
4560Returns:
4561 An object of the form:
4562
4563 { # Represents an Operation resource.
4564 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004565 # Google Compute Engine has three Operation resources:
4566 #
4567 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4568 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004569 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4570 #
4571 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004572 # - For global operations, use the `globalOperations` resource.
4573 # - For regional operations, use the `regionOperations` resource.
4574 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004575 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004576 # 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 Kim715bd7f2019-06-14 16:50:42 -07004577 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4578 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4579 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004580 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004581 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4582 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004583 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4584 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004585 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004586 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004587 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004588 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004589 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4590 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4591 {
4592 "message": "A String", # [Output Only] A human-readable description of the warning code.
4593 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4594 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4595 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4596 {
4597 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4598 "key": "A String", # [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).
4599 },
4600 ],
4601 },
4602 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004603 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004604 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004605 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4606 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004607 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4608 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4609 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4610 {
4611 "message": "A String", # [Output Only] An optional, human-readable error message.
4612 "code": "A String", # [Output Only] The error type identifier for this error.
4613 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4614 },
4615 ],
4616 },
4617 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4618 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4619 "targetLink": "A String", # [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.
4620 }</pre>
4621</div>
4622
4623<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004624 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004625 <pre>Sets network tags for the specified instance to the data included in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004626
4627Args:
4628 project: string, Project ID for this request. (required)
4629 zone: string, The name of the zone for this request. (required)
4630 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004631 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004632 The object takes the form of:
4633
4634{ # A set of instance tags.
4635 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4636 "A String",
4637 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004638 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update tags. You must always provide an up-to-date fingerprint hash in order to update or change tags.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004639 #
4640 # To see the latest fingerprint, make get() request to the instance.
4641}
4642
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004643 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.
4644
4645For 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.
4646
4647The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004648
4649Returns:
4650 An object of the form:
4651
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004652 { # Represents an Operation resource.
4653 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004654 # Google Compute Engine has three Operation resources:
4655 #
4656 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4657 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004658 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4659 #
4660 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004661 # - For global operations, use the `globalOperations` resource.
4662 # - For regional operations, use the `regionOperations` resource.
4663 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004664 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004665 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004666 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004667 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004668 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004669 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004670 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004671 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004672 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4673 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004674 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004675 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004676 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004677 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004678 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4679 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4680 {
4681 "message": "A String", # [Output Only] A human-readable description of the warning code.
4682 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4683 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4684 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4685 {
4686 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4687 "key": "A String", # [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).
4688 },
4689 ],
4690 },
4691 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004692 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004693 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004694 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4695 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004696 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004697 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4698 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4699 {
4700 "message": "A String", # [Output Only] An optional, human-readable error message.
4701 "code": "A String", # [Output Only] The error type identifier for this error.
4702 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4703 },
4704 ],
4705 },
4706 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4707 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004708 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004709 }</pre>
4710</div>
4711
4712<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004713 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
4714 <pre>Simulates a maintenance event on the instance.
4715
4716Args:
4717 project: string, Project ID for this request. (required)
4718 zone: string, The name of the zone for this request. (required)
4719 instance: string, Name of the instance scoping this request. (required)
4720
4721Returns:
4722 An object of the form:
4723
4724 { # Represents an Operation resource.
4725 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004726 # Google Compute Engine has three Operation resources:
4727 #
4728 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4729 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004730 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4731 #
4732 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004733 # - For global operations, use the `globalOperations` resource.
4734 # - For regional operations, use the `regionOperations` resource.
4735 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004736 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004737 # 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 Kim715bd7f2019-06-14 16:50:42 -07004738 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4739 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4740 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004741 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004742 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4743 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004744 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4745 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004746 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004747 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004748 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004749 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004750 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4751 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4752 {
4753 "message": "A String", # [Output Only] A human-readable description of the warning code.
4754 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4755 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4756 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4757 {
4758 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4759 "key": "A String", # [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).
4760 },
4761 ],
4762 },
4763 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004764 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004765 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004766 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4767 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004768 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4769 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4770 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4771 {
4772 "message": "A String", # [Output Only] An optional, human-readable error message.
4773 "code": "A String", # [Output Only] The error type identifier for this error.
4774 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4775 },
4776 ],
4777 },
4778 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4779 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4780 "targetLink": "A String", # [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.
4781 }</pre>
4782</div>
4783
4784<div class="method">
4785 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
4786 <pre>Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004787
4788Args:
4789 project: string, Project ID for this request. (required)
4790 zone: string, The name of the zone for this request. (required)
4791 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004792 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.
4793
4794For 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.
4795
4796The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004797
4798Returns:
4799 An object of the form:
4800
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004801 { # Represents an Operation resource.
4802 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004803 # Google Compute Engine has three Operation resources:
4804 #
4805 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4806 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004807 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4808 #
4809 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004810 # - For global operations, use the `globalOperations` resource.
4811 # - For regional operations, use the `regionOperations` resource.
4812 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004813 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004814 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004815 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004816 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004817 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004818 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004819 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004820 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004821 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4822 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004823 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004824 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004825 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004826 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004827 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4828 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4829 {
4830 "message": "A String", # [Output Only] A human-readable description of the warning code.
4831 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4832 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4833 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4834 {
4835 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4836 "key": "A String", # [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).
4837 },
4838 ],
4839 },
4840 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004841 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004842 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004843 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4844 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004845 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004846 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4847 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4848 {
4849 "message": "A String", # [Output Only] An optional, human-readable error message.
4850 "code": "A String", # [Output Only] The error type identifier for this error.
4851 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4852 },
4853 ],
4854 },
4855 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4856 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004857 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004858 }</pre>
4859</div>
4860
4861<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004862 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004863 <pre>Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004864
4865Args:
4866 project: string, Project ID for this request. (required)
4867 zone: string, The name of the zone for this request. (required)
4868 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004869 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004870 The object takes the form of:
4871
4872{
4873 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
4874 #
4875 # In order to start the instance, the disk url and its corresponding key must be provided.
4876 #
4877 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
4878 {
4879 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
4880 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07004881 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004882 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
4883 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
4884 #
4885 # The key must meet the following requirements before you can provide it to Compute Engine:
4886 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004887 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004888 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004889 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004890 },
4891 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
4892 },
4893 ],
4894 }
4895
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004896 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.
4897
4898For 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.
4899
4900The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004901
4902Returns:
4903 An object of the form:
4904
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004905 { # Represents an Operation resource.
4906 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004907 # Google Compute Engine has three Operation resources:
4908 #
4909 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4910 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004911 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4912 #
4913 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004914 # - For global operations, use the `globalOperations` resource.
4915 # - For regional operations, use the `regionOperations` resource.
4916 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004917 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004918 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004919 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004920 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004921 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004922 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004923 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004924 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004925 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4926 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004927 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07004928 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004929 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004930 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004931 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4932 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4933 {
4934 "message": "A String", # [Output Only] A human-readable description of the warning code.
4935 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
4936 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4937 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4938 {
4939 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4940 "key": "A String", # [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).
4941 },
4942 ],
4943 },
4944 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004945 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004946 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07004947 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4948 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004949 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004950 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4951 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4952 {
4953 "message": "A String", # [Output Only] An optional, human-readable error message.
4954 "code": "A String", # [Output Only] The error type identifier for this error.
4955 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4956 },
4957 ],
4958 },
4959 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4960 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004961 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004962 }</pre>
4963</div>
4964
4965<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004966 <code class="details" id="stop">stop(project, zone, instance, requestId=None)</code>
4967 <pre>Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004968
4969Args:
4970 project: string, Project ID for this request. (required)
4971 zone: string, The name of the zone for this request. (required)
4972 instance: string, Name of the instance resource to stop. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004973 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.
4974
4975For 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.
4976
4977The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004978
4979Returns:
4980 An object of the form:
4981
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004982 { # Represents an Operation resource.
4983 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004984 # Google Compute Engine has three Operation resources:
4985 #
4986 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4987 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004988 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4989 #
4990 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004991 # - For global operations, use the `globalOperations` resource.
4992 # - For regional operations, use the `regionOperations` resource.
4993 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004994 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004995 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004996 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004997 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004998 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004999 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005000 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005001 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005002 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5003 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005004 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005005 "httpErrorStatusCode": 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005006 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005007 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005008 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5009 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5010 {
5011 "message": "A String", # [Output Only] A human-readable description of the warning code.
5012 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5013 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5014 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5015 {
5016 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5017 "key": "A String", # [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).
5018 },
5019 ],
5020 },
5021 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005022 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005023 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005024 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5025 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005026 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5027 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5028 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5029 {
5030 "message": "A String", # [Output Only] An optional, human-readable error message.
5031 "code": "A String", # [Output Only] The error type identifier for this error.
5032 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5033 },
5034 ],
5035 },
5036 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5037 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5038 "targetLink": "A String", # [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.
5039 }</pre>
5040</div>
5041
5042<div class="method">
5043 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
5044 <pre>This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.
5045
5046Args:
5047 project: string, Project ID for this request. (required)
5048 zone: string, The name of the zone for this request. (required)
5049 instance: string, Name of the instance resource to suspend. (required)
5050 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
5051 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.
5052
5053For 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.
5054
5055The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5056
5057Returns:
5058 An object of the form:
5059
5060 { # Represents an Operation resource.
5061 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005062 # Google Compute Engine has three Operation resources:
5063 #
5064 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5065 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005066 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5067 #
5068 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005069 # - For global operations, use the `globalOperations` resource.
5070 # - For regional operations, use the `regionOperations` resource.
5071 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005072 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005073 # 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 Kim715bd7f2019-06-14 16:50:42 -07005074 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5075 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5076 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005077 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005078 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5079 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005080 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5081 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005082 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005083 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005084 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005085 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005086 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5087 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5088 {
5089 "message": "A String", # [Output Only] A human-readable description of the warning code.
5090 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5091 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5092 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5093 {
5094 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5095 "key": "A String", # [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 },
5097 ],
5098 },
5099 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005100 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005101 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005102 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5103 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005104 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005105 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5106 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5107 {
5108 "message": "A String", # [Output Only] An optional, human-readable error message.
5109 "code": "A String", # [Output Only] The error type identifier for this error.
5110 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5111 },
5112 ],
5113 },
5114 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5115 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005116 "targetLink": "A String", # [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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005117 }</pre>
5118</div>
5119
5120<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005121 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005122 <pre>Returns permissions that a caller has on the specified resource.
5123
5124Args:
5125 project: string, Project ID for this request. (required)
5126 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005127 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005128 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005129 The object takes the form of:
5130
5131{
5132 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
5133 "A String",
5134 ],
5135 }
5136
5137
5138Returns:
5139 An object of the form:
5140
5141 {
5142 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
5143 "A String",
5144 ],
5145 }</pre>
5146</div>
5147
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005148<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005149 <code class="details" id="update">update(project, zone, instance, body=None, minimalAction=None, requestId=None, mostDisruptiveAllowedAction=None)</code>
5150 <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.
5151
5152Args:
5153 project: string, Project ID for this request. (required)
5154 zone: string, The name of the zone for this request. (required)
5155 instance: string, Name of the instance resource to update. (required)
5156 body: object, The request body.
5157 The object takes the form of:
5158
5159{ # Represents an Instance resource.
5160 #
5161 # 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 ==)
5162 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
5163 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
5164 "values": [ # Corresponds to the label values of a reservation resource.
5165 "A String",
5166 ],
5167 "key": "A String", # 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.
5168 "consumeReservationType": "A String", # 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.
5169 },
5170 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
5171 { # A specification of the type and number of accelerator cards attached to the instance.
5172 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
5173 "acceleratorType": "A String", # 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.
5174 },
5175 ],
5176 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
5177 "a_key": "A String",
5178 },
5179 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
5180 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
5181 },
5182 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
5183 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
5184 "preemptible": 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.
5185 "automaticRestart": 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.
5186 #
5187 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
5188 "nodeAffinities": [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
5189 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
5190 "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
5191 "values": [ # Corresponds to the label values of Node resource.
5192 "A String",
5193 ],
5194 "key": "A String", # Corresponds to the label key of Node resource.
5195 },
5196 ],
5197 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
5198 "onHostMaintenance": "A String", # 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.
5199 },
5200 "minCpuPlatform": "A String", # Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge".
5201 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
5202 #
5203 # 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.
5204 { # A service account.
5205 "scopes": [ # The list of scopes to be made available for this service account.
5206 "A String",
5207 ],
5208 "email": "A String", # Email address of the service account.
5209 },
5210 ],
5211 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
5212 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
5213 "networkInterfaces": [ # 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.
5214 { # A network interface resource attached to an instance.
5215 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
5216 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
5217 { # An alias IP range attached to an instance's network interface.
5218 "subnetworkRangeName": "A String", # 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.
5219 "ipCidrRange": "A String", # 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).
5220 },
5221 ],
5222 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
5223 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
5224 "accessConfigs": [ # 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.
5225 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
5226 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5227 "name": "A String", # 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.
5228 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
5229 #
5230 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5231 #
5232 # 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.
5233 "natIP": "A String", # 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.
5234 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
5235 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
5236 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
5237 },
5238 ],
5239 "networkIP": "A String", # 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.
5240 "fingerprint": "A String", # 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.
5241 "subnetwork": "A String", # 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:
5242 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
5243 # - regions/region/subnetworks/subnetwork
5244 "network": "A String", # 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.
5245 #
5246 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
5247 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5248 # - projects/project/global/networks/network
5249 # - global/networks/default
5250 },
5251 ],
5252 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
5253 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
5254 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
5255 },
5256 "shieldedInstanceConfig": { # A set of Shielded Instance options.
5257 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
5258 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
5259 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
5260 },
5261 "zone": "A String", # [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.
5262 "hostname": "A String", # 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.
5263 "sourceMachineImage": "A String", # Source machine image
5264 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
5265 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
5266 },
5267 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
5268 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
5269 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
5270 {
5271 "value": "A String", # 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).
5272 "key": "A String", # 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.
5273 },
5274 ],
5275 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
5276 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata'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.
5277 #
5278 # To see the latest fingerprint, make a get() request to retrieve the resource.
5279 },
5280 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
5281 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
5282 "canIpForward": 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.
5283 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
5284 "tags": { # 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 'tags.items' field.
5285 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
5286 "A String",
5287 ],
5288 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the tags' 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.
5289 #
5290 # To see the latest fingerprint, make get() request to the instance.
5291 },
5292 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
5293 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
5294 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
5295 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
5296 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
5297 #
5298 # The key must meet the following requirements before you can provide it to Compute Engine:
5299 # - The key is wrapped using a RSA public key certificate provided by Google.
5300 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5301 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5302 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
5303 },
5304 "labelFingerprint": "A String", # A fingerprint for this request, which is essentially a hash of the label'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.
5305 #
5306 # To see the latest fingerprint, make get() request to the instance.
5307 "resourcePolicies": [ # Resource policies applied to this instance.
5308 "A String",
5309 ],
5310 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
5311 "fingerprint": "A String", # Specifies a fingerprint for this resource, which is essentially a hash of the instance'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.
5312 #
5313 # To see the latest fingerprint, make get() request to the instance.
5314 "machineType": "A String", # 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:
5315 # zones/us-central1-f/machineTypes/n1-standard-1
5316 #
5317 #
5318 # 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):
5319 # zones/zone/machineTypes/custom-CPUS-MEMORY
5320 #
5321 #
5322 # For example: zones/us-central1-f/machineTypes/custom-4-5120
5323 #
5324 # For a full list of restrictions, read the Specifications for custom machine types.
5325 "shieldedVmConfig": { # A set of Shielded VM options.
5326 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
5327 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
5328 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
5329 },
5330 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
5331 "name": "A String", # 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.
5332 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
5333 { # An instance-attached disk resource.
5334 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
5335 #
5336 # 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.
5337 #
5338 # 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.
5339 #
5340 # 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.
5341 #
5342 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
5343 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
5344 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
5345 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
5346 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
5347 #
5348 # The key must meet the following requirements before you can provide it to Compute Engine:
5349 # - The key is wrapped using a RSA public key certificate provided by Google.
5350 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5351 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5352 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
5353 },
5354 "deviceName": "A String", # 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.
5355 #
5356 # 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.
5357 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
5358 "initializeParams": { # [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.
5359 #
5360 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
5361 #
5362 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
5363 "sourceSnapshot": "A String", # 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.
5364 #
5365 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
5366 # global/snapshots/my-backup
5367 #
5368 #
5369 # If the source snapshot is deleted later, this field will not be set.
5370 "diskName": "A String", # 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.
5371 "description": "A String", # An optional description. Provide this property when creating the disk.
5372 "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
5373 "labels": { # Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.
5374 "a_key": "A String",
5375 },
5376 "sourceImageEncryptionKey": { # 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.
5377 #
5378 # 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.
5379 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
5380 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
5381 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
5382 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
5383 #
5384 # The key must meet the following requirements before you can provide it to Compute Engine:
5385 # - The key is wrapped using a RSA public key certificate provided by Google.
5386 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5387 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5388 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
5389 },
5390 "diskType": "A String", # 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:
5391 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
5392 #
5393 #
5394 # 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:
5395 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
5396 # - projects/project/zones/zone/diskTypes/diskType
5397 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
5398 "guestOsFeatures": [ # 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.
5399 #
5400 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
5401 { # Guest OS features.
5402 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
5403 },
5404 ],
5405 "diskSizeGb": "A String", # 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.
5406 "resourcePolicies": [ # 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.
5407 "A String",
5408 ],
5409 "sourceImage": "A String", # 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.
5410 #
5411 # 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:
5412 # projects/debian-cloud/global/images/family/debian-9
5413 #
5414 #
5415 # Alternatively, use a specific version of a public operating system image:
5416 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
5417 #
5418 #
5419 # To create a disk with a custom image that you created, specify the image name in the following format:
5420 # global/images/my-custom-image
5421 #
5422 #
5423 # 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:
5424 # global/images/family/my-image-family
5425 #
5426 #
5427 # If the source image is deleted later, this field will not be set.
5428 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
5429 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
5430 "kmsKeyServiceAccount": "A String", # The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.
5431 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
5432 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
5433 #
5434 # The key must meet the following requirements before you can provide it to Compute Engine:
5435 # - The key is wrapped using a RSA public key certificate provided by Google.
5436 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
5437 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
5438 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
5439 },
5440 },
5441 "autoDelete": 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).
5442 "index": 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.
5443 "boot": 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.
5444 "shieldedInstanceInitialState": { # 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
5445 "dbxs": [ # The forbidden key database (dbx).
5446 {
5447 "content": "A String", # The raw content in the secure keys file.
5448 "fileType": "A String",
5449 },
5450 ],
5451 "dbs": [ # The Key Database (db).
5452 {
5453 "content": "A String", # The raw content in the secure keys file.
5454 "fileType": "A String",
5455 },
5456 ],
5457 "keks": [ # The Key Exchange Key (KEK).
5458 {
5459 "content": "A String", # The raw content in the secure keys file.
5460 "fileType": "A String",
5461 },
5462 ],
5463 "pk": { # The Platform Key (PK).
5464 "content": "A String", # The raw content in the secure keys file.
5465 "fileType": "A String",
5466 },
5467 },
5468 "guestOsFeatures": [ # 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.
5469 { # Guest OS features.
5470 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
5471 },
5472 ],
5473 "diskSizeGb": "A String", # The size of the disk in GB.
5474 "mode": "A String", # 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.
5475 "interface": "A String", # 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.
5476 "licenses": [ # [Output Only] Any valid publicly visible licenses.
5477 "A String",
5478 ],
5479 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
5480 "source": "A String", # 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.
5481 #
5482 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
5483 #
5484 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
5485 },
5486 ],
5487 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
5488}
5489
5490 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.
5491 Allowed values
5492 INVALID -
5493 NO_EFFECT -
5494 REFRESH -
5495 RESTART -
5496 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
5497
5498For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
5499
5500The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5501 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.
5502 Allowed values
5503 INVALID -
5504 NO_EFFECT -
5505 REFRESH -
5506 RESTART -
5507
5508Returns:
5509 An object of the form:
5510
5511 { # Represents an Operation resource.
5512 #
5513 # Google Compute Engine has three Operation resources:
5514 #
5515 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5516 #
5517 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5518 #
5519 # Operations can be global, regional or zonal.
5520 # - For global operations, use the `globalOperations` resource.
5521 # - For regional operations, use the `regionOperations` resource.
5522 # - For zonal operations, use the `zonalOperations` resource.
5523 #
5524 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
5525 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5526 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5527 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
5528 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
5529 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5530 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
5531 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5532 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
5533 "progress": 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.
5534 "httpErrorStatusCode": 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.
5535 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
5536 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
5537 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5538 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5539 {
5540 "message": "A String", # [Output Only] A human-readable description of the warning code.
5541 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5542 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5543 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5544 {
5545 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5546 "key": "A String", # [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).
5547 },
5548 ],
5549 },
5550 ],
5551 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
5552 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
5553 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5554 "name": "A String", # [Output Only] Name of the operation.
5555 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5556 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5557 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5558 {
5559 "message": "A String", # [Output Only] An optional, human-readable error message.
5560 "code": "A String", # [Output Only] The error type identifier for this error.
5561 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5562 },
5563 ],
5564 },
5565 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5566 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5567 "targetLink": "A String", # [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.
5568 }</pre>
5569</div>
5570
5571<div class="method">
5572 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005573 <pre>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.
5574
5575Args:
5576 project: string, Project ID for this request. (required)
5577 zone: string, The name of the zone for this request. (required)
5578 instance: string, The instance name for this request. (required)
5579 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005580 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005581 The object takes the form of:
5582
5583{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
5584 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5585 "name": "A String", # 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.
5586 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
5587 #
5588 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5589 #
5590 # 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.
5591 "natIP": "A String", # 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.
5592 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
5593 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
5594 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
5595}
5596
5597 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.
5598
5599For 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.
5600
5601The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5602
5603Returns:
5604 An object of the form:
5605
5606 { # Represents an Operation resource.
5607 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005608 # Google Compute Engine has three Operation resources:
5609 #
5610 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5611 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005612 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5613 #
5614 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005615 # - For global operations, use the `globalOperations` resource.
5616 # - For regional operations, use the `regionOperations` resource.
5617 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005618 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005619 # 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 Kim715bd7f2019-06-14 16:50:42 -07005620 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5621 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5622 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005623 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005624 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5625 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005626 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5627 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005628 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005629 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005630 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005631 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005632 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5633 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5634 {
5635 "message": "A String", # [Output Only] A human-readable description of the warning code.
5636 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5637 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5638 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5639 {
5640 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5641 "key": "A String", # [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).
5642 },
5643 ],
5644 },
5645 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005646 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005647 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005648 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5649 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005650 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5651 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5652 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5653 {
5654 "message": "A String", # [Output Only] An optional, human-readable error message.
5655 "code": "A String", # [Output Only] The error type identifier for this error.
5656 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5657 },
5658 ],
5659 },
5660 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5661 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5662 "targetLink": "A String", # [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.
5663 }</pre>
5664</div>
5665
5666<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005667 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005668 <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.
5669
5670Args:
5671 project: string, Project ID for this request. (required)
5672 zone: string, The name of the zone for this request. (required)
5673 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005674 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005675 The object takes the form of:
5676
5677{ # A set of Display Device options
5678 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
5679}
5680
5681 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.
5682
5683For 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.
5684
5685The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5686
5687Returns:
5688 An object of the form:
5689
5690 { # Represents an Operation resource.
5691 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005692 # Google Compute Engine has three Operation resources:
5693 #
5694 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5695 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005696 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5697 #
5698 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005699 # - For global operations, use the `globalOperations` resource.
5700 # - For regional operations, use the `regionOperations` resource.
5701 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005702 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005703 # 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 Kim715bd7f2019-06-14 16:50:42 -07005704 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5705 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5706 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005707 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005708 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5709 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005710 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5711 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005712 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005713 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005714 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005715 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005716 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5717 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5718 {
5719 "message": "A String", # [Output Only] A human-readable description of the warning code.
5720 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5721 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5722 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5723 {
5724 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5725 "key": "A String", # [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).
5726 },
5727 ],
5728 },
5729 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005730 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005731 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005732 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5733 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005734 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5735 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5736 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5737 {
5738 "message": "A String", # [Output Only] An optional, human-readable error message.
5739 "code": "A String", # [Output Only] The error type identifier for this error.
5740 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5741 },
5742 ],
5743 },
5744 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5745 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5746 "targetLink": "A String", # [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.
5747 }</pre>
5748</div>
5749
5750<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005751 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005752 <pre>Updates an instance's network interface. This method follows PATCH semantics.
5753
5754Args:
5755 project: string, Project ID for this request. (required)
5756 zone: string, The name of the zone for this request. (required)
5757 instance: string, The instance name for this request. (required)
5758 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005759 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005760 The object takes the form of:
5761
5762{ # A network interface resource attached to an instance.
5763 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
5764 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
5765 { # An alias IP range attached to an instance's network interface.
5766 "subnetworkRangeName": "A String", # 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.
5767 "ipCidrRange": "A String", # 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).
5768 },
5769 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005770 "name": "A String", # [Output Only] The name of the network interface, which is generated by the server. For network devices, these are eth0, eth1, etc.
5771 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005772 "accessConfigs": [ # 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.
5773 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
5774 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
5775 "name": "A String", # 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.
5776 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
5777 #
5778 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
5779 #
5780 # 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.
5781 "natIP": "A String", # 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.
5782 "setPublicPtr": True or False, # Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name.
5783 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
5784 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
5785 },
5786 ],
5787 "networkIP": "A String", # 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.
5788 "fingerprint": "A String", # 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.
5789 "subnetwork": "A String", # 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:
5790 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
5791 # - regions/region/subnetworks/subnetwork
Dan O'Mearadd494642020-05-01 07:42:23 -07005792 "network": "A String", # 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.
5793 #
5794 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
5795 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5796 # - projects/project/global/networks/network
5797 # - global/networks/default
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005798}
5799
5800 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.
5801
5802For 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.
5803
5804The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5805
5806Returns:
5807 An object of the form:
5808
5809 { # Represents an Operation resource.
5810 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005811 # Google Compute Engine has three Operation resources:
5812 #
5813 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5814 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005815 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5816 #
5817 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005818 # - For global operations, use the `globalOperations` resource.
5819 # - For regional operations, use the `regionOperations` resource.
5820 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005821 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005822 # 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 Kim715bd7f2019-06-14 16:50:42 -07005823 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5824 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5825 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005826 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005827 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5828 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005829 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5830 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005831 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005832 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005833 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005834 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005835 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5836 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5837 {
5838 "message": "A String", # [Output Only] A human-readable description of the warning code.
5839 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5840 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5841 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5842 {
5843 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5844 "key": "A String", # [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).
5845 },
5846 ],
5847 },
5848 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005849 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005850 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005851 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5852 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005853 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5854 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5855 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5856 {
5857 "message": "A String", # [Output Only] An optional, human-readable error message.
5858 "code": "A String", # [Output Only] The error type identifier for this error.
5859 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5860 },
5861 ],
5862 },
5863 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5864 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5865 "targetLink": "A String", # [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.
5866 }</pre>
5867</div>
5868
5869<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005870 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005871 <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.
5872
5873Args:
5874 project: string, Project ID for this request. (required)
5875 zone: string, The name of the zone for this request. (required)
5876 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005877 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005878 The object takes the form of:
5879
5880{ # A set of Shielded Instance options.
5881 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
5882 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
5883 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
5884}
5885
5886 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.
5887
5888For 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.
5889
5890The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5891
5892Returns:
5893 An object of the form:
5894
5895 { # Represents an Operation resource.
5896 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005897 # Google Compute Engine has three Operation resources:
5898 #
5899 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5900 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005901 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5902 #
5903 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005904 # - For global operations, use the `globalOperations` resource.
5905 # - For regional operations, use the `regionOperations` resource.
5906 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005907 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005908 # 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 Kim715bd7f2019-06-14 16:50:42 -07005909 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5910 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5911 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005912 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005913 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5914 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005915 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5916 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005917 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07005918 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005919 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005920 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005921 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5922 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5923 {
5924 "message": "A String", # [Output Only] A human-readable description of the warning code.
5925 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
5926 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5927 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5928 {
5929 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5930 "key": "A String", # [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).
5931 },
5932 ],
5933 },
5934 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005935 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005936 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07005937 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5938 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005939 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5940 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5941 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5942 {
5943 "message": "A String", # [Output Only] An optional, human-readable error message.
5944 "code": "A String", # [Output Only] The error type identifier for this error.
5945 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5946 },
5947 ],
5948 },
5949 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5950 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5951 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
5952 }</pre>
5953</div>
5954
5955<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005956 <code class="details" id="updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005957 <pre>Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
5958
5959Args:
5960 project: string, Project ID for this request. (required)
5961 zone: string, The name of the zone for this request. (required)
5962 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005963 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005964 The object takes the form of:
5965
5966{ # A set of Shielded VM options.
5967 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
5968 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
5969 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
5970}
5971
5972 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.
5973
5974For 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.
5975
5976The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5977
5978Returns:
5979 An object of the form:
5980
5981 { # Represents an Operation resource.
5982 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005983 # Google Compute Engine has three Operation resources:
5984 #
5985 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5986 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005987 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5988 #
5989 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005990 # - For global operations, use the `globalOperations` resource.
5991 # - For regional operations, use the `regionOperations` resource.
5992 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005993 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005994 # 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 Kim715bd7f2019-06-14 16:50:42 -07005995 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5996 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5997 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005998 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005999 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
6000 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07006001 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6002 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006003 "progress": 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.
Dan O'Mearadd494642020-05-01 07:42:23 -07006004 "httpErrorStatusCode": 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006005 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07006006 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006007 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
6008 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6009 {
6010 "message": "A String", # [Output Only] A human-readable description of the warning code.
6011 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
6012 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
6013 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6014 {
6015 "value": "A String", # [Output Only] A warning data value corresponding to the key.
6016 "key": "A String", # [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).
6017 },
6018 ],
6019 },
6020 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07006021 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006022 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07006023 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6024 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006025 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6026 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6027 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
6028 {
6029 "message": "A String", # [Output Only] An optional, human-readable error message.
6030 "code": "A String", # [Output Only] The error type identifier for this error.
6031 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6032 },
6033 ],
6034 },
6035 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6036 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
6037 "targetLink": "A String", # [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.
6038 }</pre>
6039</div>
6040
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006041</body></html>