blob: 1d73c6e05ea59b4e16f8892986271737e3144db6 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Adds an access config to an instance's network interface.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=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">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#bulkInsert">bulkInsert(project, zone, body=None, requestId=None)</a></code></p>
94<p class="firstline">Creates multiple instances. Count specifies the number of instances to create.</p>
95<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040096 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
98<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Deletes an access config from an instance's network interface.</p>
101<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400102 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700103<p class="firstline">Detaches a disk from an instance.</p>
104<p class="toc_element">
105 <code><a href="#get">get(project, zone, instance)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns the specified Instance resource. Gets a list of available instances by making a list() request.</p>
107<p class="toc_element">
108 <code><a href="#getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</a></code></p>
109<p class="firstline">Returns effective firewalls applied to an interface of the instance.</p>
110<p class="toc_element">
111 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</a></code></p>
112<p class="firstline">Returns the specified guest attributes entry.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#getScreenshot">getScreenshot(project, zone, instance)</a></code></p>
118<p class="firstline">Returns the screenshot from the specified instance.</p>
119<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700120 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
124<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
125<p class="toc_element">
126 <code><a href="#getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</a></code></p>
127<p class="firstline">Returns the Shielded VM Identity of an instance</p>
128<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 <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 -0700130<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#list">list(project, zone, orderBy=None, pageToken=None, maxResults=None, returnPartialSuccess=None, filter=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700133<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
134<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 <code><a href="#listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, returnPartialSuccess=None, maxResults=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136<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 -0400137<p class="toc_element">
138 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
139<p class="firstline">Retrieves the next page of results.</p>
140<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700141 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
142<p class="firstline">Retrieves the next page of results.</p>
143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145<p class="firstline">Removes resource policies from an instance.</p>
146<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400147 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148<p class="firstline">Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.</p>
149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#resume">resume(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151<p class="firstline">Resumes an instance that was suspended using the instances().suspend method.</p>
152<p class="toc_element">
153 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
154<p class="firstline">Sets deletion protection on the instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700155<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400156 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#setLabels">setLabels(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700164<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400166<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
167<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 <code><a href="#setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700169<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
170<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code><a href="#setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700172<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
173<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175<p class="firstline">Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.</p>
176<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 <code><a href="#setName">setName(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178<p class="firstline">Sets name of an instance.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400179<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 <code><a href="#setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700181<p class="firstline">Sets an instance's scheduling options.</p>
182<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400184<p class="firstline">Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700185<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187<p class="firstline">Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
188<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 <code><a href="#setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700190<p class="firstline">Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
191<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 <code><a href="#setTags">setTags(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193<p class="firstline">Sets network tags for the specified instance to the data included in the request.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700194<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400195 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
196<p class="firstline">Simulates a maintenance event on the instance.</p>
197<p class="toc_element">
198 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700200<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700203<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400204 <code><a href="#stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205<p class="firstline">Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700206<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400207 <code><a href="#suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700208<p class="firstline">This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances incur reduced per-minute, virtual machine usage charges while they are suspended. Any resources the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted.</p>
209<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700210 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700211<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
212<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700213 <code><a href="#update">update(project, zone, instance, body=None, minimalAction=None, requestId=None, mostDisruptiveAllowedAction=None)</a></code></p>
214<p class="firstline">Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.</p>
215<p class="toc_element">
216 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217<p class="firstline">Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
218<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700219 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220<p class="firstline">Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400221<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700222 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400223<p class="firstline">Updates an instance's network interface. This method follows PATCH semantics.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700224<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226<p class="firstline">Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
227<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 <code><a href="#updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229<p class="firstline">Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700230<h3>Method Details</h3>
231<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700233 <pre>Adds an access config to an instance's network interface.
234
235Args:
236 project: string, Project ID for this request. (required)
237 zone: string, The name of the zone for this request. (required)
238 instance: string, The instance name for this request. (required)
239 networkInterface: string, The name of the network interface to add to this instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700241 The object takes the form of:
242
243{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
244 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 "setPublicDns": True or False, # Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400247 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
249 #
250 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
251 #
252 # 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 -0700253 "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 -0700254 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700255 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700256 "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 -0700257}
258
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
260
261For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
262
263The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700264
265Returns:
266 An object of the form:
267
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 { # Represents an Operation resource.
269 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700270 # Google Compute Engine has three Operation resources:
271 #
272 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
273 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700274 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
275 #
276 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 # - For global operations, use the `globalOperations` resource.
278 # - For regional operations, use the `regionOperations` resource.
279 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700281 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700282 "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 -0700283 "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 -0400284 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700285 "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 -0700286 "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 -0700287 "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 -0700288 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
289 "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 -0700290 "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 -0700291 "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 -0700292 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700293 "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 -0700294 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
295 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
296 {
297 "message": "A String", # [Output Only] A human-readable description of the warning code.
298 "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.
299 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
300 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
301 {
302 "value": "A String", # [Output Only] A warning data value corresponding to the key.
303 "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).
304 },
305 ],
306 },
307 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700308 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700310 "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 -0700311 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
312 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
314 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
315 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
316 {
317 "message": "A String", # [Output Only] An optional, human-readable error message.
318 "code": "A String", # [Output Only] The error type identifier for this error.
319 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
320 },
321 ],
322 },
323 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
324 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
325 "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.
326 }</pre>
327</div>
328
329<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700330 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700331 <pre>Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
332
333Args:
334 project: string, Project ID for this request. (required)
335 zone: string, The name of the zone for this request. (required)
336 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700337 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700338 The object takes the form of:
339
340{
341 "resourcePolicies": [ # Resource policies to be added to this instance.
342 "A String",
343 ],
344 }
345
346 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
347
348For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
349
350The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
351
352Returns:
353 An object of the form:
354
355 { # Represents an Operation resource.
356 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700357 # Google Compute Engine has three Operation resources:
358 #
359 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
360 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700361 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
362 #
363 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700364 # - For global operations, use the `globalOperations` resource.
365 # - For regional operations, use the `regionOperations` resource.
366 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700368 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700369 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
370 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
371 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700372 "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 -0700373 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
374 "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 -0700375 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
376 "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 -0700377 "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 -0700378 "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 -0700379 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700380 "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 -0700381 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
382 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
383 {
384 "message": "A String", # [Output Only] A human-readable description of the warning code.
385 "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.
386 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
387 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
388 {
389 "value": "A String", # [Output Only] A warning data value corresponding to the key.
390 "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).
391 },
392 ],
393 },
394 ],
395 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700396 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397 "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 -0700398 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
399 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700400 "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 -0700401 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
402 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
403 {
404 "message": "A String", # [Output Only] An optional, human-readable error message.
405 "code": "A String", # [Output Only] The error type identifier for this error.
406 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
407 },
408 ],
409 },
410 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
411 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800412 "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 -0700413 }</pre>
414</div>
415
416<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700417 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, returnPartialSuccess=None, filter=None, includeAllScopes=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700419
420Args:
421 project: string, Project ID for this request. (required)
422 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
423
Dan O'Mearadd494642020-05-01 07:42:23 -0700424You 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 -0700425
Dan O'Mearadd494642020-05-01 07:42:23 -0700426Currently, only sorting by `name` or `creationTimestamp desc` is supported.
427 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`)
428 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.
429 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
430 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 -0700431
Dan O'Mearadd494642020-05-01 07:42:23 -0700432For 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 -0700433
Dan O'Mearadd494642020-05-01 07:42:23 -0700434You 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 -0700435
Dan O'Mearadd494642020-05-01 07:42:23 -0700436To 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) ```
437 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 -0700438
439Returns:
440 An object of the form:
441
442 {
443 "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 -0700444 "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 -0700445 "items": { # An object that contains a list of instances scoped by zone.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700446 "a_key": { # [Output Only] Name of the scope containing this set of instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 "instances": [ # [Output Only] A list of instances contained in this scope.
448 { # Represents an Instance resource.
449 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700450 # 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 -0700451 "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 -0700452 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
453 "values": [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700454 "A String",
455 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700456 "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 -0700457 "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.
458 },
459 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400460 { # A specification of the type and number of accelerator cards attached to the instance.
461 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 "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 -0400463 },
464 ],
465 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700466 "a_key": "A String",
467 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
469 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
470 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700471 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
472 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
473 "longTermRelease": True or False, # Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
474 #
475 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
476 #
477 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
478 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
479 "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.
480 #
481 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
482 "locationHint": "A String", # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
483 "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.
484 "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 -0700485 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -0700486 "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 -0700487 "values": [ # Corresponds to the label values of Node resource.
488 "A String",
489 ],
490 "key": "A String", # Corresponds to the label key of Node resource.
491 },
492 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700493 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 "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 -0700495 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400497 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700498 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400499 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700500 { # A service account.
501 "scopes": [ # The list of scopes to be made available for this service account.
502 "A String",
503 ],
504 "email": "A String", # Email address of the service account.
505 },
506 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700508 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
509 "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 -0700510 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700511 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400512 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700513 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700514 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700515 "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.
516 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700517 },
518 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700519 "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.
520 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
521 "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.
522 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
523 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
524 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700525 "setPublicDns": True or False, # Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700526 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
527 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
528 #
529 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
530 #
531 # 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.
532 "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.
533 "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.
534 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
535 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
536 },
537 ],
538 "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.
539 "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.
540 "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:
541 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
542 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400543 "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.
544 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400545 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
546 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
547 # - projects/project/global/networks/network
548 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700549 },
550 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400551 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Dan O'Mearadd494642020-05-01 07:42:23 -0700552 "confidentialInstanceConfig": { # A set of Confidential Instance options.
553 "enableConfidentialCompute": True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700554 },
555 "shieldedInstanceConfig": { # A set of Shielded Instance options.
556 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
557 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
558 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
559 },
560 "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 -0700561 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700562 "sourceMachineImage": "A String", # Source machine image
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 "postKeyRevocationActionType": "A String", # Specifies whether this instance will be shut down on key revocation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700564 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
565 #
566 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
567 #
568 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
569 #
570 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
571 #
572 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
573 "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 -0700574 "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 -0700575 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
576 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
577 #
578 # The key must meet the following requirements before you can provide it to Compute Engine:
579 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580 # - 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 -0700581 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400582 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700583 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700584 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
Dan O'Mearadd494642020-05-01 07:42:23 -0700585 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
586 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700587 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
588 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
589 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
590 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591 "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 -0700592 "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.
593 },
594 ],
595 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596 "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.
597 #
598 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700599 },
600 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700601 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700602 "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.
603 "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 -0700604 "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 -0700605 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
606 "A String",
607 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 "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 -0700609 #
610 # To see the latest fingerprint, make get() request to the instance.
611 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700612 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
613 "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 -0700614 "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 -0700615 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
616 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
617 #
618 # The key must meet the following requirements before you can provide it to Compute Engine:
619 # - The key is wrapped using a RSA public key certificate provided by Google.
620 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
621 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
622 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
623 },
624 "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 -0700625 #
626 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700627 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
628 "resourcePolicies": [ # Resource policies applied to this instance.
629 "A String",
630 ],
631 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
Dan O'Mearadd494642020-05-01 07:42:23 -0700632 "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.
633 #
634 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400635 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400636 # zones/us-central1-f/machineTypes/n1-standard-1
637 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400638 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700639 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400640 # zones/zone/machineTypes/custom-CPUS-MEMORY
641 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700642 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400643 # For example: zones/us-central1-f/machineTypes/custom-4-5120
644 #
645 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700646 "shieldedVmConfig": { # A set of Shielded VM options.
647 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
648 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
649 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
650 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700651 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
652 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
653 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700654 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700655 "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 -0700656 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
657 { # An instance-attached disk resource.
658 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
659 #
660 # 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.
661 #
662 # 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.
663 #
664 # 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.
665 #
666 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
667 "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 -0700668 "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 -0700669 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
670 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
671 #
672 # The key must meet the following requirements before you can provide it to Compute Engine:
673 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 # - 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 -0700675 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400676 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700677 },
678 "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.
679 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 # 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 -0700681 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
682 "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.
683 #
684 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
685 #
686 # 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 -0700687 "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 -0700688 #
689 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
690 # global/snapshots/my-backup
691 #
692 #
693 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700694 "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 -0700695 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -0700696 "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 -0700697 "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.
698 "a_key": "A String",
699 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700700 "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.
701 #
702 # 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.
703 "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 -0700704 "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 -0700705 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
706 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
707 #
708 # The key must meet the following requirements before you can provide it to Compute Engine:
709 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 # - 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 -0700711 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400712 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700713 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700714 "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 -0700715 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
716 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700718 # 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:
719 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
720 # - projects/project/zones/zone/diskTypes/diskType
721 # - 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 -0700722 "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.
723 #
724 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
725 { # Guest OS features.
726 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
727 },
728 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700729 "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 -0700730 "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.
731 "A String",
732 ],
733 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
734 "A String",
735 ],
736 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
737 "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 -0700738 "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 -0700739 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
740 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
741 #
742 # The key must meet the following requirements before you can provide it to Compute Engine:
743 # - The key is wrapped using a RSA public key certificate provided by Google.
744 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
745 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
746 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
747 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700748 "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 -0700749 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700750 # 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:
751 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700752 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700753 #
754 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700756 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700757 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700758 # To create a disk with a custom image that you created, specify the image name in the following format:
759 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700760 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700761 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700762 # 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:
763 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700764 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800765 #
766 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700767 },
768 "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 -0700769 "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 -0700770 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700771 "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
772 "dbxs": [ # The forbidden key database (dbx).
773 {
774 "content": "A String", # The raw content in the secure keys file.
775 "fileType": "A String",
776 },
777 ],
778 "dbs": [ # The Key Database (db).
779 {
780 "content": "A String", # The raw content in the secure keys file.
781 "fileType": "A String",
782 },
783 ],
784 "keks": [ # The Key Exchange Key (KEK).
785 {
786 "content": "A String", # The raw content in the secure keys file.
787 "fileType": "A String",
788 },
789 ],
790 "pk": { # The Platform Key (PK).
791 "content": "A String", # The raw content in the secure keys file.
792 "fileType": "A String",
793 },
794 },
795 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
796 "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.
797 { # Guest OS features.
798 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
799 },
800 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700801 "diskSizeGb": "A String", # The size of the disk in GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800802 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700803 "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 -0700804 "licenses": [ # [Output Only] Any valid publicly visible licenses.
805 "A String",
806 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700807 "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 -0700808 "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 -0800809 #
810 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
811 #
812 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700813 },
814 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700815 "upcomingMaintenance": { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
816 "date": "A String", # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
817 "type": "A String", # Defines the type of maintenance.
818 "time": "A String", # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
819 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700820 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
821 },
822 ],
823 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
824 "message": "A String", # [Output Only] A human-readable description of the warning code.
825 "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.
826 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
827 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
828 {
829 "value": "A String", # [Output Only] A warning data value corresponding to the key.
830 "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).
831 },
832 ],
833 },
834 },
835 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700836 "warning": { # [Output Only] Informational warning message.
837 "message": "A String", # [Output Only] A human-readable description of the warning code.
838 "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.
839 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
840 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
841 {
842 "value": "A String", # [Output Only] A warning data value corresponding to the key.
843 "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).
844 },
845 ],
846 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700847 "unreachables": [ # [Output Only] Unreachable resources.
848 "A String",
849 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700850 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700851 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
852 }</pre>
853</div>
854
855<div class="method">
856 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
857 <pre>Retrieves the next page of results.
858
859Args:
860 previous_request: The request for the previous page. (required)
861 previous_response: The response from the request for the previous page. (required)
862
863Returns:
864 A request object that you can call 'execute()' on to request the next
865 page. Returns None if there are no more items in the collection.
866 </pre>
867</div>
868
869<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700870 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400871 <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 -0700872
873Args:
874 project: string, Project ID for this request. (required)
875 zone: string, The name of the zone for this request. (required)
876 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700877 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700878 The object takes the form of:
879
880{ # An instance-attached disk resource.
881 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
882 #
883 # 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.
884 #
885 # 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.
886 #
887 # 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.
888 #
889 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
890 "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 -0700891 "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 -0700892 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
893 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
894 #
895 # The key must meet the following requirements before you can provide it to Compute Engine:
896 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700897 # - 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 -0700898 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400899 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700900 },
901 "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.
902 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700903 # 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 -0700904 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
905 "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.
906 #
907 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
908 #
909 # 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 -0700910 "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 -0700911 #
912 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
913 # global/snapshots/my-backup
914 #
915 #
916 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700917 "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 -0700918 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -0700919 "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 -0700920 "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.
921 "a_key": "A String",
922 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700923 "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.
924 #
925 # 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.
926 "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 -0700927 "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 -0700928 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
929 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
930 #
931 # The key must meet the following requirements before you can provide it to Compute Engine:
932 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700933 # - 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 -0700934 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400935 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700936 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700937 "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 -0700938 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
939 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700940 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700941 # 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:
942 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
943 # - projects/project/zones/zone/diskTypes/diskType
944 # - 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 -0700945 "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.
946 #
947 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
948 { # Guest OS features.
949 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
950 },
951 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700952 "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 -0700953 "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.
954 "A String",
955 ],
956 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
957 "A String",
958 ],
959 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
960 "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 -0700961 "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 -0700962 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
963 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
964 #
965 # The key must meet the following requirements before you can provide it to Compute Engine:
966 # - The key is wrapped using a RSA public key certificate provided by Google.
967 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
968 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
969 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
970 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700971 "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 -0700972 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 # 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:
974 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700975 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700976 #
977 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700978 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700979 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700980 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700981 # To create a disk with a custom image that you created, specify the image name in the following format:
982 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700983 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700984 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700985 # 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:
986 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700987 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800988 #
989 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700990 },
991 "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 -0700992 "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 -0700993 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700994 "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
995 "dbxs": [ # The forbidden key database (dbx).
996 {
997 "content": "A String", # The raw content in the secure keys file.
998 "fileType": "A String",
999 },
1000 ],
1001 "dbs": [ # The Key Database (db).
1002 {
1003 "content": "A String", # The raw content in the secure keys file.
1004 "fileType": "A String",
1005 },
1006 ],
1007 "keks": [ # The Key Exchange Key (KEK).
1008 {
1009 "content": "A String", # The raw content in the secure keys file.
1010 "fileType": "A String",
1011 },
1012 ],
1013 "pk": { # The Platform Key (PK).
1014 "content": "A String", # The raw content in the secure keys file.
1015 "fileType": "A String",
1016 },
1017 },
1018 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
1019 "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.
1020 { # Guest OS features.
1021 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1022 },
1023 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001024 "diskSizeGb": "A String", # The size of the disk in GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001025 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001026 "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 -07001027 "licenses": [ # [Output Only] Any valid publicly visible licenses.
1028 "A String",
1029 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001030 "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 -07001031 "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 -08001032 #
1033 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1034 #
1035 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001036}
1037
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001038 forceAttach: boolean, Whether to force attach the disk even if it's currently attached to another instance.
1039 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1040
1041For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1042
1043The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001044
1045Returns:
1046 An object of the form:
1047
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001048 { # Represents an Operation resource.
1049 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001050 # Google Compute Engine has three Operation resources:
1051 #
1052 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1053 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1055 #
1056 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001057 # - For global operations, use the `globalOperations` resource.
1058 # - For regional operations, use the `regionOperations` resource.
1059 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001060 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001061 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001062 "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 -07001063 "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 -04001064 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001065 "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 -07001066 "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 -07001067 "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 -07001068 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1069 "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 -07001070 "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 -07001071 "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 -07001072 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001073 "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 -07001074 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1075 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1076 {
1077 "message": "A String", # [Output Only] A human-readable description of the warning code.
1078 "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.
1079 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1080 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1081 {
1082 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1083 "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).
1084 },
1085 ],
1086 },
1087 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001088 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001089 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001090 "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 -07001091 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1092 "name": "A String", # [Output Only] Name of the operation.
1093 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1094 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1095 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1096 {
1097 "message": "A String", # [Output Only] An optional, human-readable error message.
1098 "code": "A String", # [Output Only] The error type identifier for this error.
1099 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1100 },
1101 ],
1102 },
1103 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1104 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1105 "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.
1106 }</pre>
1107</div>
1108
1109<div class="method">
1110 <code class="details" id="bulkInsert">bulkInsert(project, zone, body=None, requestId=None)</code>
1111 <pre>Creates multiple instances. Count specifies the number of instances to create.
1112
1113Args:
1114 project: string, Project ID for this request. (required)
1115 zone: string, The name of the zone for this request. (required)
1116 body: object, The request body.
1117 The object takes the form of:
1118
1119{
1120 "count": "A String", # The maximum number of instances to create.
1121 "predefinedNames": [ # List of predefined names. The number of names provided must be equal to count.
1122 "A String",
1123 ],
1124 "sourceInstanceTemplate": "A String", # Specifies the instance template from which to create the instance. This field is optional. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
1125 # - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
1126 # - projects/project/global/instanceTemplates/instanceTemplate
1127 # - global/instanceTemplates/instanceTemplate
1128 "instance": { # Represents an Instance resource.
1129 #
1130 # 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 ==)
1131 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
1132 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1133 "values": [ # Corresponds to the label values of a reservation resource.
1134 "A String",
1135 ],
1136 "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.
1137 "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.
1138 },
1139 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
1140 { # A specification of the type and number of accelerator cards attached to the instance.
1141 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
1142 "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.
1143 },
1144 ],
1145 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
1146 "a_key": "A String",
1147 },
1148 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
1149 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
1150 },
1151 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
1152 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
1153 "longTermRelease": True or False, # Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
1154 #
1155 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
1156 #
1157 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
1158 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1159 "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.
1160 #
1161 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1162 "locationHint": "A String", # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
1163 "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.
1164 "nodeAffinities": [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
1165 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
1166 "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
1167 "values": [ # Corresponds to the label values of Node resource.
1168 "A String",
1169 ],
1170 "key": "A String", # Corresponds to the label key of Node resource.
1171 },
1172 ],
1173 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
1174 "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.
1175 },
1176 "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".
1177 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
1178 #
1179 # 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.
1180 { # A service account.
1181 "scopes": [ # The list of scopes to be made available for this service account.
1182 "A String",
1183 ],
1184 "email": "A String", # Email address of the service account.
1185 },
1186 ],
1187 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
1188 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1189 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1190 "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.
1191 { # A network interface resource attached to an instance.
1192 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1193 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
1194 { # An alias IP range attached to an instance's network interface.
1195 "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.
1196 "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).
1197 },
1198 ],
1199 "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.
1200 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
1201 "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.
1202 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1203 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1204 "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.
1205 "setPublicDns": True or False, # Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
1206 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
1207 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1208 #
1209 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1210 #
1211 # 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.
1212 "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.
1213 "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.
1214 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1215 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1216 },
1217 ],
1218 "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.
1219 "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.
1220 "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:
1221 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1222 # - regions/region/subnetworks/subnetwork
1223 "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.
1224 #
1225 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1226 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1227 # - projects/project/global/networks/network
1228 # - global/networks/default
1229 },
1230 ],
1231 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
1232 "confidentialInstanceConfig": { # A set of Confidential Instance options.
1233 "enableConfidentialCompute": True or False, # Defines whether the instance should have confidential compute enabled.
1234 },
1235 "shieldedInstanceConfig": { # A set of Shielded Instance options.
1236 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1237 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1238 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1239 },
1240 "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.
1241 "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.
1242 "sourceMachineImage": "A String", # Source machine image
1243 "postKeyRevocationActionType": "A String", # Specifies whether this instance will be shut down on key revocation.
1244 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
1245 #
1246 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
1247 #
1248 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
1249 #
1250 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
1251 #
1252 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
1253 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1254 "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.
1255 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1256 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1257 #
1258 # The key must meet the following requirements before you can provide it to Compute Engine:
1259 # - The key is wrapped using a RSA public key certificate provided by Google.
1260 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1261 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1262 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1263 },
1264 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
1265 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1266 },
1267 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1268 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1269 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1270 {
1271 "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).
1272 "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.
1273 },
1274 ],
1275 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1276 "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.
1277 #
1278 # To see the latest fingerprint, make a get() request to retrieve the resource.
1279 },
1280 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
1281 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
1282 "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.
1283 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1284 "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.
1285 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1286 "A String",
1287 ],
1288 "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.
1289 #
1290 # To see the latest fingerprint, make get() request to the instance.
1291 },
1292 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
1293 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1294 "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.
1295 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1296 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1297 #
1298 # The key must meet the following requirements before you can provide it to Compute Engine:
1299 # - The key is wrapped using a RSA public key certificate provided by Google.
1300 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1301 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1302 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1303 },
1304 "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.
1305 #
1306 # To see the latest fingerprint, make get() request to the instance.
1307 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1308 "resourcePolicies": [ # Resource policies applied to this instance.
1309 "A String",
1310 ],
1311 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
1312 "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.
1313 #
1314 # To see the latest fingerprint, make get() request to the instance.
1315 "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:
1316 # zones/us-central1-f/machineTypes/n1-standard-1
1317 #
1318 #
1319 # 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):
1320 # zones/zone/machineTypes/custom-CPUS-MEMORY
1321 #
1322 #
1323 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1324 #
1325 # For a full list of restrictions, read the Specifications for custom machine types.
1326 "shieldedVmConfig": { # A set of Shielded VM options.
1327 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1328 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1329 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1330 },
1331 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
1332 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1333 },
1334 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
1335 "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.
1336 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1337 { # An instance-attached disk resource.
1338 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1339 #
1340 # 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.
1341 #
1342 # 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.
1343 #
1344 # 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.
1345 #
1346 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1347 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1348 "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.
1349 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1350 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1351 #
1352 # The key must meet the following requirements before you can provide it to Compute Engine:
1353 # - The key is wrapped using a RSA public key certificate provided by Google.
1354 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1355 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1356 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1357 },
1358 "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.
1359 #
1360 # 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.
1361 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1362 "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.
1363 #
1364 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1365 #
1366 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1367 "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.
1368 #
1369 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1370 # global/snapshots/my-backup
1371 #
1372 #
1373 # If the source snapshot is deleted later, this field will not be set.
1374 "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.
1375 "description": "A String", # An optional description. Provide this property when creating the disk.
1376 "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
1377 "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.
1378 "a_key": "A String",
1379 },
1380 "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.
1381 #
1382 # 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.
1383 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1384 "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.
1385 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1386 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1387 #
1388 # The key must meet the following requirements before you can provide it to Compute Engine:
1389 # - The key is wrapped using a RSA public key certificate provided by Google.
1390 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1391 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1392 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1393 },
1394 "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:
1395 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1396 #
1397 #
1398 # 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:
1399 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1400 # - projects/project/zones/zone/diskTypes/diskType
1401 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
1402 "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.
1403 #
1404 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
1405 { # Guest OS features.
1406 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1407 },
1408 ],
1409 "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.
1410 "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.
1411 "A String",
1412 ],
1413 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
1414 "A String",
1415 ],
1416 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1417 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
1418 "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.
1419 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1420 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1421 #
1422 # The key must meet the following requirements before you can provide it to Compute Engine:
1423 # - The key is wrapped using a RSA public key certificate provided by Google.
1424 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
1425 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
1426 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1427 },
1428 "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.
1429 #
1430 # 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:
1431 # projects/debian-cloud/global/images/family/debian-9
1432 #
1433 #
1434 # Alternatively, use a specific version of a public operating system image:
1435 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1436 #
1437 #
1438 # To create a disk with a custom image that you created, specify the image name in the following format:
1439 # global/images/my-custom-image
1440 #
1441 #
1442 # 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:
1443 # global/images/family/my-image-family
1444 #
1445 #
1446 # If the source image is deleted later, this field will not be set.
1447 },
1448 "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).
1449 "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.
1450 "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.
1451 "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
1452 "dbxs": [ # The forbidden key database (dbx).
1453 {
1454 "content": "A String", # The raw content in the secure keys file.
1455 "fileType": "A String",
1456 },
1457 ],
1458 "dbs": [ # The Key Database (db).
1459 {
1460 "content": "A String", # The raw content in the secure keys file.
1461 "fileType": "A String",
1462 },
1463 ],
1464 "keks": [ # The Key Exchange Key (KEK).
1465 {
1466 "content": "A String", # The raw content in the secure keys file.
1467 "fileType": "A String",
1468 },
1469 ],
1470 "pk": { # The Platform Key (PK).
1471 "content": "A String", # The raw content in the secure keys file.
1472 "fileType": "A String",
1473 },
1474 },
1475 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
1476 "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.
1477 { # Guest OS features.
1478 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1479 },
1480 ],
1481 "diskSizeGb": "A String", # The size of the disk in GB.
1482 "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.
1483 "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.
1484 "licenses": [ # [Output Only] Any valid publicly visible licenses.
1485 "A String",
1486 ],
1487 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
1488 "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.
1489 #
1490 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1491 #
1492 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
1493 },
1494 ],
1495 "upcomingMaintenance": { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
1496 "date": "A String", # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
1497 "type": "A String", # Defines the type of maintenance.
1498 "time": "A String", # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
1499 },
1500 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1501 },
1502 "minCount": "A String", # The minimum number of instances to create. If no min_count is specified then count is used as the default value. If min_count instances cannot be created, then no instances will be created.
1503 "excludedZones": [ # List of zones to exclude for regional requests.
1504 "A String",
1505 ],
1506 }
1507
1508 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.
1509
1510For 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.
1511
1512The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1513
1514Returns:
1515 An object of the form:
1516
1517 { # Represents an Operation resource.
1518 #
1519 # Google Compute Engine has three Operation resources:
1520 #
1521 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1522 #
1523 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1524 #
1525 # Operations can be global, regional or zonal.
1526 # - For global operations, use the `globalOperations` resource.
1527 # - For regional operations, use the `regionOperations` resource.
1528 # - For zonal operations, use the `zonalOperations` resource.
1529 #
1530 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1531 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1532 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1533 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1534 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1535 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1536 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1537 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1538 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1539 "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.
1540 "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.
1541 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1542 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1543 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1544 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1545 {
1546 "message": "A String", # [Output Only] A human-readable description of the warning code.
1547 "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.
1548 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1549 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1550 {
1551 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1552 "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).
1553 },
1554 ],
1555 },
1556 ],
1557 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
1558 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
1559 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1560 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1561 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001562 "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 -07001563 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1564 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1565 {
1566 "message": "A String", # [Output Only] An optional, human-readable error message.
1567 "code": "A String", # [Output Only] The error type identifier for this error.
1568 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1569 },
1570 ],
1571 },
1572 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1573 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001574 "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 -07001575 }</pre>
1576</div>
1577
1578<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001579 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001580 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
1581
1582Args:
1583 project: string, Project ID for this request. (required)
1584 zone: string, The name of the zone for this request. (required)
1585 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001586 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.
1587
1588For 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.
1589
1590The 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 -07001591
1592Returns:
1593 An object of the form:
1594
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001595 { # Represents an Operation resource.
1596 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001597 # Google Compute Engine has three Operation resources:
1598 #
1599 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1600 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001601 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1602 #
1603 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001604 # - For global operations, use the `globalOperations` resource.
1605 # - For regional operations, use the `regionOperations` resource.
1606 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001607 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001608 # 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 -07001609 "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 -07001610 "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 -04001611 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001612 "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 -07001613 "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 -07001614 "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 -07001615 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1616 "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 -07001617 "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 -07001618 "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 -07001619 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001620 "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 -07001621 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1622 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1623 {
1624 "message": "A String", # [Output Only] A human-readable description of the warning code.
1625 "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.
1626 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1627 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1628 {
1629 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1630 "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).
1631 },
1632 ],
1633 },
1634 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001635 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001636 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001637 "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 -07001638 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1639 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001640 "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 -07001641 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1642 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1643 {
1644 "message": "A String", # [Output Only] An optional, human-readable error message.
1645 "code": "A String", # [Output Only] The error type identifier for this error.
1646 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1647 },
1648 ],
1649 },
1650 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1651 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001652 "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 -07001653 }</pre>
1654</div>
1655
1656<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001657 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001658 <pre>Deletes an access config from an instance's network interface.
1659
1660Args:
1661 project: string, Project ID for this request. (required)
1662 zone: string, The name of the zone for this request. (required)
1663 instance: string, The instance name for this request. (required)
1664 accessConfig: string, The name of the access config to delete. (required)
1665 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001666 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.
1667
1668For 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.
1669
1670The 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 -07001671
1672Returns:
1673 An object of the form:
1674
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001675 { # Represents an Operation resource.
1676 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001677 # Google Compute Engine has three Operation resources:
1678 #
1679 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1680 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001681 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1682 #
1683 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001684 # - For global operations, use the `globalOperations` resource.
1685 # - For regional operations, use the `regionOperations` resource.
1686 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001687 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001688 # 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 -07001689 "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 -07001690 "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 -04001691 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001692 "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 -07001693 "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 -07001694 "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 -07001695 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1696 "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 -07001697 "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 -07001698 "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 -07001699 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001700 "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 -07001701 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1702 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1703 {
1704 "message": "A String", # [Output Only] A human-readable description of the warning code.
1705 "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.
1706 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1707 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1708 {
1709 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1710 "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).
1711 },
1712 ],
1713 },
1714 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001715 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001716 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001717 "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 -07001718 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1719 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001720 "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 -07001721 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1722 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1723 {
1724 "message": "A String", # [Output Only] An optional, human-readable error message.
1725 "code": "A String", # [Output Only] The error type identifier for this error.
1726 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1727 },
1728 ],
1729 },
1730 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1731 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001732 "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 -07001733 }</pre>
1734</div>
1735
1736<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001737 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001738 <pre>Detaches a disk from an instance.
1739
1740Args:
1741 project: string, Project ID for this request. (required)
1742 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001743 instance: string, Instance name for this request. (required)
1744 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)
1745 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.
1746
1747For 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.
1748
1749The 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 -07001750
1751Returns:
1752 An object of the form:
1753
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001754 { # Represents an Operation resource.
1755 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001756 # Google Compute Engine has three Operation resources:
1757 #
1758 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1759 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001760 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1761 #
1762 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001763 # - For global operations, use the `globalOperations` resource.
1764 # - For regional operations, use the `regionOperations` resource.
1765 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001766 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001767 # 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 -07001768 "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 -07001769 "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 -04001770 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001771 "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 -07001772 "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 -07001773 "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 -07001774 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1775 "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 -07001776 "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 -07001777 "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 -07001778 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001779 "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 -07001780 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1781 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1782 {
1783 "message": "A String", # [Output Only] A human-readable description of the warning code.
1784 "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.
1785 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1786 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1787 {
1788 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1789 "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).
1790 },
1791 ],
1792 },
1793 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001794 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001795 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001796 "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 -07001797 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1798 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001799 "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 -07001800 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1801 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1802 {
1803 "message": "A String", # [Output Only] An optional, human-readable error message.
1804 "code": "A String", # [Output Only] The error type identifier for this error.
1805 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1806 },
1807 ],
1808 },
1809 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1810 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001811 "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 -07001812 }</pre>
1813</div>
1814
1815<div class="method">
1816 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001817 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001818
1819Args:
1820 project: string, Project ID for this request. (required)
1821 zone: string, The name of the zone for this request. (required)
1822 instance: string, Name of the instance resource to return. (required)
1823
1824Returns:
1825 An object of the form:
1826
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001827 { # Represents an Instance resource.
1828 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001829 # 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 -07001830 "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 -07001831 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1832 "values": [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001833 "A String",
1834 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001835 "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 -07001836 "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.
1837 },
1838 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001839 { # A specification of the type and number of accelerator cards attached to the instance.
1840 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001841 "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 -04001842 },
1843 ],
1844 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001845 "a_key": "A String",
1846 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001847 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
1848 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
1849 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001850 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
1851 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
1852 "longTermRelease": True or False, # Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
1853 #
1854 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
1855 #
1856 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
1857 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
1858 "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.
1859 #
1860 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
1861 "locationHint": "A String", # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
1862 "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.
1863 "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 -07001864 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001865 "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 -07001866 "values": [ # Corresponds to the label values of Node resource.
1867 "A String",
1868 ],
1869 "key": "A String", # Corresponds to the label key of Node resource.
1870 },
1871 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001872 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001873 "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 -07001874 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001875 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04001876 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001877 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001878 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001879 { # A service account.
1880 "scopes": [ # The list of scopes to be made available for this service account.
1881 "A String",
1882 ],
1883 "email": "A String", # Email address of the service account.
1884 },
1885 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001886 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001887 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1888 "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 -07001889 "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 Cheemalapatidf613972016-10-21 13:59:49 -07001890 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001891 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001892 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001893 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001894 "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.
1895 "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 Cheemalapatidf613972016-10-21 13:59:49 -07001896 },
1897 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001898 "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.
1899 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
1900 "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.
1901 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1902 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1903 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001904 "setPublicDns": True or False, # Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001905 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
1906 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1907 #
1908 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1909 #
1910 # 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.
1911 "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.
1912 "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.
1913 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1914 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1915 },
1916 ],
1917 "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.
1918 "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.
1919 "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:
1920 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1921 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001922 "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.
1923 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001924 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1925 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1926 # - projects/project/global/networks/network
1927 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001928 },
1929 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001930 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Dan O'Mearadd494642020-05-01 07:42:23 -07001931 "confidentialInstanceConfig": { # A set of Confidential Instance options.
1932 "enableConfidentialCompute": True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001933 },
1934 "shieldedInstanceConfig": { # A set of Shielded Instance options.
1935 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1936 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1937 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1938 },
1939 "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 -07001940 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001941 "sourceMachineImage": "A String", # Source machine image
Dan O'Mearadd494642020-05-01 07:42:23 -07001942 "postKeyRevocationActionType": "A String", # Specifies whether this instance will be shut down on key revocation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001943 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
1944 #
1945 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
1946 #
1947 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
1948 #
1949 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
1950 #
1951 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
1952 "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 -07001953 "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 -07001954 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1955 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1956 #
1957 # The key must meet the following requirements before you can provide it to Compute Engine:
1958 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001959 # - 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 -07001960 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001961 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001962 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001963 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
Dan O'Mearadd494642020-05-01 07:42:23 -07001964 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1965 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001966 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1967 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1968 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1969 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001970 "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 -07001971 "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.
1972 },
1973 ],
1974 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001975 "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.
1976 #
1977 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001978 },
1979 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001980 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001981 "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.
1982 "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 -07001983 "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 -07001984 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1985 "A String",
1986 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001987 "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 -07001988 #
1989 # To see the latest fingerprint, make get() request to the instance.
1990 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001991 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
1992 "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 -07001993 "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 -07001994 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1995 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
1996 #
1997 # The key must meet the following requirements before you can provide it to Compute Engine:
1998 # - The key is wrapped using a RSA public key certificate provided by Google.
1999 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2000 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2001 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2002 },
2003 "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 -07002004 #
2005 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002006 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2007 "resourcePolicies": [ # Resource policies applied to this instance.
2008 "A String",
2009 ],
2010 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
Dan O'Mearadd494642020-05-01 07:42:23 -07002011 "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.
2012 #
2013 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002014 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002015 # zones/us-central1-f/machineTypes/n1-standard-1
2016 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002017 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002018 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002019 # zones/zone/machineTypes/custom-CPUS-MEMORY
2020 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002021 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002022 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2023 #
2024 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002025 "shieldedVmConfig": { # A set of Shielded VM options.
2026 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2027 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2028 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2029 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002030 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
2031 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2032 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002033 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002034 "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 -07002035 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
2036 { # An instance-attached disk resource.
2037 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
2038 #
2039 # 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.
2040 #
2041 # 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.
2042 #
2043 # 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.
2044 #
2045 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
2046 "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 -07002047 "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 -07002048 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2049 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2050 #
2051 # The key must meet the following requirements before you can provide it to Compute Engine:
2052 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002053 # - 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 -07002054 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002055 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002056 },
2057 "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.
2058 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002059 # 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 -07002060 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2061 "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.
2062 #
2063 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2064 #
2065 # 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 -07002066 "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 -07002067 #
2068 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2069 # global/snapshots/my-backup
2070 #
2071 #
2072 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002073 "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 -07002074 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07002075 "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 -07002076 "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.
2077 "a_key": "A String",
2078 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002079 "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.
2080 #
2081 # 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.
2082 "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 -07002083 "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 -07002084 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2085 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2086 #
2087 # The key must meet the following requirements before you can provide it to Compute Engine:
2088 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002089 # - 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 -07002090 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002091 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002092 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002093 "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 -07002094 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2095 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002096 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002097 # 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:
2098 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2099 # - projects/project/zones/zone/diskTypes/diskType
2100 # - 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 -07002101 "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.
2102 #
2103 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2104 { # Guest OS features.
2105 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2106 },
2107 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002108 "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 -07002109 "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.
2110 "A String",
2111 ],
2112 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
2113 "A String",
2114 ],
2115 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2116 "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 -07002117 "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 -07002118 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2119 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2120 #
2121 # The key must meet the following requirements before you can provide it to Compute Engine:
2122 # - The key is wrapped using a RSA public key certificate provided by Google.
2123 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2124 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2125 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2126 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002127 "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 -07002128 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002129 # 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:
2130 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002131 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002132 #
2133 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002134 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002135 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002136 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002137 # To create a disk with a custom image that you created, specify the image name in the following format:
2138 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002139 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002140 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002141 # 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:
2142 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002143 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002144 #
2145 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002146 },
2147 "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 -07002148 "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 -07002149 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002150 "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
2151 "dbxs": [ # The forbidden key database (dbx).
2152 {
2153 "content": "A String", # The raw content in the secure keys file.
2154 "fileType": "A String",
2155 },
2156 ],
2157 "dbs": [ # The Key Database (db).
2158 {
2159 "content": "A String", # The raw content in the secure keys file.
2160 "fileType": "A String",
2161 },
2162 ],
2163 "keks": [ # The Key Exchange Key (KEK).
2164 {
2165 "content": "A String", # The raw content in the secure keys file.
2166 "fileType": "A String",
2167 },
2168 ],
2169 "pk": { # The Platform Key (PK).
2170 "content": "A String", # The raw content in the secure keys file.
2171 "fileType": "A String",
2172 },
2173 },
2174 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
2175 "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.
2176 { # Guest OS features.
2177 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2178 },
2179 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002180 "diskSizeGb": "A String", # The size of the disk in GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002181 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002182 "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 -07002183 "licenses": [ # [Output Only] Any valid publicly visible licenses.
2184 "A String",
2185 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002186 "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 -07002187 "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 -08002188 #
2189 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2190 #
2191 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002192 },
2193 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002194 "upcomingMaintenance": { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
2195 "date": "A String", # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
2196 "type": "A String", # Defines the type of maintenance.
2197 "time": "A String", # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
2198 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002199 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2200 }</pre>
2201</div>
2202
2203<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002204 <code class="details" id="getEffectiveFirewalls">getEffectiveFirewalls(project, zone, instance, networkInterface)</code>
2205 <pre>Returns effective firewalls applied to an interface of the instance.
2206
2207Args:
2208 project: string, Project ID for this request. (required)
2209 zone: string, The name of the zone for this request. (required)
2210 instance: string, Name of the instance scoping this request. (required)
2211 networkInterface: string, The name of the network interface to get the effective firewalls. (required)
2212
2213Returns:
2214 An object of the form:
2215
2216 {
2217 "organizationFirewalls": [ # Effective firewalls from organization policies.
2218 { # A pruned SecurityPolicy containing ID and any applicable firewall rules.
2219 "rules": [ # The rules that apply to the network.
2220 { # 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).
2221 "direction": "A String", # The direction in which this rule applies. This field may only be specified when versioned_expr is set to FIREWALL.
2222 "ruleTupleCount": 42, # [Output Only] Calculation of the complexity of a single firewall security policy rule.
2223 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2224 "kind": "compute#securityPolicyRule", # [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules
2225 "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.
2226 #
2227 # This field may only be specified when the versioned_expr is set to FIREWALL.
2228 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002229 "targetServiceAccounts": [ # A list of service accounts indicating the sets of instances that are applied with this rule.
2230 "A String",
2231 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002232 "rateLimitOptions": { # Must be specified if the action is "rate_based_blacklist" or "throttle". Cannot be specified for any other actions.
2233 "enforceOnKey": "A String", # Determines the key to enforce the threshold_rps limit on. If key is "IP", each IP has this limit enforced separately, whereas "ALL_IPs" means a single limit is applied to all requests matching this rule.
2234 "thresholdRps": 42, # Rate in requests per second at which to begin ratelimiting.
2235 "conformAction": "A String", # Action to take when requests are under the given threshold. When requests are throttled, this is also the action for all requests which are not dropped. Valid options are "allow", "fairshare", and "drop_overload".
2236 "blockDuration": 42, # Can only be specifed if the action for the rule is "rate_based_blacklist" If specified, determines the time (in seconds) the traffic will continue to be blocked by the rate limit after the rate falls below the threshold. The default value is 0 seconds.
2237 "exceedAction": "A String", # When a request is denied, returns the HTTP response code specified. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502.
2238 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002239 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002240 #
2241 # This field may only be specified when versioned_expr is set to FIREWALL.
2242 "A String",
2243 ],
2244 "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.
2245 "preview": True or False, # If set to true, the specified action is not enforced.
Dan O'Mearadd494642020-05-01 07:42:23 -07002246 "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.
2247 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002248 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002249 # Example (Comparison):
2250 #
2251 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
2252 #
2253 # Example (Equality):
2254 #
2255 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
2256 #
2257 # Example (Logic):
2258 #
2259 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
2260 #
2261 # Example (Data Manipulation):
2262 #
2263 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
2264 #
2265 # 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.
2266 "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 -07002267 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07002268 "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.
2269 "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 -07002270 },
2271 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002272 "layer4Configs": [ # Pairs of IP protocols and ports that the rule should match.
2273 #
2274 # This field may only be specified when versioned_expr is set to FIREWALL.
2275 {
2276 "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.
2277 "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.
2278 #
2279 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
2280 #
2281 # This field may only be specified when versioned_expr is set to FIREWALL.
2282 "A String",
2283 ],
2284 },
2285 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002286 "srcIpRanges": [ # CIDR IP address range.
2287 "A String",
2288 ],
2289 "destIpRanges": [ # CIDR IP address range.
2290 #
2291 # This field may only be specified when versioned_expr is set to FIREWALL.
2292 "A String",
2293 ],
2294 "destPorts": [ # Pairs of IP protocols and ports that the rule should match.
2295 #
2296 # This field may only be specified when versioned_expr is set to FIREWALL.
2297 {
2298 "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.
2299 "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.
2300 #
2301 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
2302 #
2303 # This field may only be specified when versioned_expr is set to FIREWALL.
2304 "A String",
2305 ],
2306 },
2307 ],
2308 },
2309 "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.
2310 },
2311 },
2312 ],
2313 "id": "A String", # The unique identifier for the security policy. This identifier is defined by the server.
2314 },
2315 ],
2316 "firewalls": [ # Effective firewalls on the instance.
2317 { # Represents a Firewall Rule resource.
2318 #
2319 # Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, read Firewall rules.
2320 "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`.
2321 "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.
2322 "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.
2323 "A String",
2324 ],
2325 "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.
2326 "A String",
2327 ],
2328 "description": "A String", # An optional description of this resource. Provide this field when you create the resource.
2329 "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.
2330 "A String",
2331 ],
2332 "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.
2333 "A String",
2334 ],
2335 "allowed": [ # The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
2336 {
2337 "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.
2338 "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.
2339 #
2340 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
2341 "A String",
2342 ],
2343 },
2344 ],
2345 "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.
2346 "kind": "compute#firewall", # [Output Only] Type of the resource. Always compute#firewall for firewall rules.
2347 "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.
2348 "enable": True or False, # This field denotes whether to enable logging for a particular firewall rule.
2349 "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.
2350 },
2351 "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.
2352 "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:
2353 # global/networks/default
2354 # 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:
2355 # - https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
2356 # - projects/myproject/global/networks/my-network
2357 # - global/networks/default
2358 "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.
2359 "A String",
2360 ],
2361 "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.
2362 "A String",
2363 ],
2364 "denied": [ # The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
2365 {
2366 "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.
2367 "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.
2368 #
2369 # Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
2370 "A String",
2371 ],
2372 },
2373 ],
2374 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2375 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2376 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2377 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2378 "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.
2379 },
2380 ],
2381 }</pre>
2382</div>
2383
2384<div class="method">
2385 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</code>
2386 <pre>Returns the specified guest attributes entry.
2387
2388Args:
2389 project: string, Project ID for this request. (required)
2390 zone: string, The name of the zone for this request. (required)
2391 instance: string, Name of the instance scoping this request. (required)
2392 variableKey: string, Specifies the key for the guest attributes entry.
2393 queryPath: string, Specifies the guest attributes path to be queried.
2394
2395Returns:
2396 An object of the form:
2397
2398 { # A guest attributes entry.
2399 "kind": "compute#guestAttributes", # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
2400 "variableKey": "A String", # The key to search for.
2401 "queryValue": { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
2402 "items": [
2403 { # A guest attributes namespace/key/value entry.
2404 "namespace": "A String", # Namespace for the guest attribute entry.
2405 "value": "A String", # Value for the guest attribute entry.
2406 "key": "A String", # Key for the guest attribute entry.
2407 },
2408 ],
2409 },
2410 "variableValue": "A String", # [Output Only] The value found for the requested key.
Dan O'Mearadd494642020-05-01 07:42:23 -07002411 "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 -07002412 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2413 }</pre>
2414</div>
2415
2416<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002417 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002418 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
2419
2420Args:
2421 project: string, Project ID for this request. (required)
2422 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002423 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002424 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002425
2426Returns:
2427 An object of the form:
2428
Dan O'Mearadd494642020-05-01 07:42:23 -07002429 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002430 #
2431 #
2432 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002433 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002434 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002435 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002436 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002437 # **JSON example:**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002438 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002439 # { "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 -07002440 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002441 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002442 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002443 # 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 -07002444 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002445 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002446 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002447 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002448 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002449 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002450 #
2451 # Example Policy with multiple AuditConfigs:
2452 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002453 # { "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" ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002454 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002455 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002456 "exemptedMembers": [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002457 "A String",
2458 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002459 "auditLogConfigs": [ # The configuration for logging of each type of permission.
2460 { # Provides the configuration for logging a type of permissions. Example:
2461 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002462 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002463 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002464 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002465 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002466 "A String",
2467 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002468 "ignoreChildExemptions": True or False,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002469 "logType": "A String", # The log type that this config enables.
2470 },
2471 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002472 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002473 },
2474 ],
2475 "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.
2476 { # A rule to be applied in a Policy.
2477 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2478 { # Specifies what kind of log the caller must write
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002479 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
2480 #
2481 # 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.
2482 #
2483 # Field names correspond to IAM request parameters and field values are their respective values.
2484 #
2485 # 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.
2486 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002487 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002488 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07002489 "customFields": [ # Custom fields.
2490 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2491 "name": "A String", # Name is the field name.
2492 "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.
2493 },
2494 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002495 "metric": "A String", # The metric to update.
2496 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002497 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07002498 "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 -07002499 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002500 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
2501 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002502 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2503 "permissionType": "A String", # The type of the permission that was checked.
2504 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002505 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002506 },
2507 ],
2508 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
2509 "A String",
2510 ],
2511 "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.
2512 "A String",
2513 ],
2514 "action": "A String", # Required
2515 "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.
2516 "A String",
2517 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002518 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002519 { # A condition to be met.
2520 "iam": "A String", # Trusted attributes supplied by the IAM system.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002521 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002522 "values": [ # The objects of the condition.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002523 "A String",
2524 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002525 "svc": "A String", # Trusted attributes discharged by the service.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002526 "op": "A String", # An operator to apply the subject with.
2527 },
2528 ],
2529 "description": "A String", # Human-readable description of the rule.
2530 },
2531 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002532 "version": 42, # Specifies the format of the policy.
2533 #
2534 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2535 #
2536 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2537 #
2538 # * 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
2539 #
2540 # **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.
2541 #
2542 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002543 "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.
2544 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002545 # **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.
2546 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002547 { # Associates `members` with a `role`.
2548 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2549 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2550 #
2551 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2552 #
2553 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2554 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002555 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002556 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002557 #
2558 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002559 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2560 #
2561 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2562 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002563 # * `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.
2564 #
2565 # * `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.
2566 #
2567 # * `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.
2568 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002569 #
2570 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002571 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002572 "A String",
2573 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002574 "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 -07002575 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002576 # Example (Comparison):
2577 #
2578 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
2579 #
2580 # Example (Equality):
2581 #
2582 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
2583 #
2584 # Example (Logic):
2585 #
2586 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
2587 #
2588 # Example (Data Manipulation):
2589 #
2590 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
2591 #
2592 # 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.
2593 "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 -07002594 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07002595 "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.
2596 "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 -07002597 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002598 },
2599 ],
2600 "iamOwned": True or False,
2601 }</pre>
2602</div>
2603
2604<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002605 <code class="details" id="getScreenshot">getScreenshot(project, zone, instance)</code>
2606 <pre>Returns the screenshot from the specified instance.
2607
2608Args:
2609 project: string, Project ID for this request. (required)
2610 zone: string, The name of the zone for this request. (required)
2611 instance: string, Name of the instance scoping this request. (required)
2612
2613Returns:
2614 An object of the form:
2615
2616 { # An instance's screenshot.
2617 "kind": "compute#screenshot", # [Output Only] Type of the resource. Always compute#screenshot for the screenshots.
2618 "contents": "A String", # [Output Only] The Base64-encoded screenshot data.
2619 }</pre>
2620</div>
2621
2622<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002623 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002624 <pre>Returns the last 1 MB of serial port output from the specified instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002625
2626Args:
2627 project: string, Project ID for this request. (required)
2628 zone: string, The name of the zone for this request. (required)
2629 instance: string, Name of the instance scoping this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002630 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 -07002631 port: integer, Specifies which COM or serial port to retrieve data from.
2632
2633Returns:
2634 An object of the form:
2635
2636 { # An instance's serial console output.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002637 "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 -07002638 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
2639 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2640 "contents": "A String", # [Output Only] The contents of the console output.
2641 "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.
2642 }</pre>
2643</div>
2644
2645<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002646 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
2647 <pre>Returns the Shielded Instance Identity of an instance
2648
2649Args:
2650 project: string, Project ID for this request. (required)
2651 zone: string, The name of the zone for this request. (required)
2652 instance: string, Name or id of the instance scoping this request. (required)
2653
2654Returns:
2655 An object of the form:
2656
2657 { # A shielded Instance identity entry.
Dan O'Mearadd494642020-05-01 07:42:23 -07002658 "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 -07002659 "ekPub": "A String", # A PEM-encoded public key.
2660 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2661 },
2662 "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 -07002663 "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 -07002664 "ekPub": "A String", # A PEM-encoded public key.
2665 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2666 },
2667 }</pre>
2668</div>
2669
2670<div class="method">
2671 <code class="details" id="getShieldedVmIdentity">getShieldedVmIdentity(project, zone, instance)</code>
2672 <pre>Returns the Shielded VM Identity of an instance
2673
2674Args:
2675 project: string, Project ID for this request. (required)
2676 zone: string, The name of the zone for this request. (required)
2677 instance: string, Name of the instance scoping this request. (required)
2678
2679Returns:
2680 An object of the form:
2681
2682 { # A shielded VM identity entry.
2683 "signingKey": { # A Shielded Instance Identity Entry. # An Attestation Key (AK) issued to the Shielded VM's vTPM.
2684 "ekPub": "A String", # A PEM-encoded public key.
2685 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2686 },
2687 "kind": "compute#shieldedVmIdentity", # [Output Only] Type of the resource. Always compute#shieldedVmIdentity for shielded VM identity entry.
2688 "encryptionKey": { # A Shielded Instance Identity Entry. # An Endorsement Key (EK) issued to the Shielded VM's vTPM.
2689 "ekPub": "A String", # A PEM-encoded public key.
2690 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
2691 },
2692 }</pre>
2693</div>
2694
2695<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002696 <code class="details" id="insert">insert(project, zone, body=None, sourceInstanceTemplate=None, sourceMachineImage=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002697 <pre>Creates an instance resource in the specified project using the data included in the request.
2698
2699Args:
2700 project: string, Project ID for this request. (required)
2701 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002702 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002703 The object takes the form of:
2704
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002705{ # Represents an Instance resource.
2706 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002707 # 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 -07002708 "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 -07002709 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2710 "values": [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002711 "A String",
2712 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002713 "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 -07002714 "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.
2715 },
2716 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002717 { # A specification of the type and number of accelerator cards attached to the instance.
2718 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002719 "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 -04002720 },
2721 ],
2722 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002723 "a_key": "A String",
2724 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002725 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
2726 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
2727 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002728 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
2729 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
2730 "longTermRelease": True or False, # Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
2731 #
2732 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
2733 #
2734 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
2735 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
2736 "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.
2737 #
2738 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
2739 "locationHint": "A String", # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
2740 "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.
2741 "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 -07002742 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07002743 "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 -07002744 "values": [ # Corresponds to the label values of Node resource.
2745 "A String",
2746 ],
2747 "key": "A String", # Corresponds to the label key of Node resource.
2748 },
2749 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002750 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002751 "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 -07002752 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002753 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002754 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002755 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002756 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002757 { # A service account.
2758 "scopes": [ # The list of scopes to be made available for this service account.
2759 "A String",
2760 ],
2761 "email": "A String", # Email address of the service account.
2762 },
2763 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002764 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002765 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2766 "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 -07002767 "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 Cheemalapatidf613972016-10-21 13:59:49 -07002768 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002769 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002770 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002771 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002772 "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.
2773 "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 Cheemalapatidf613972016-10-21 13:59:49 -07002774 },
2775 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002776 "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.
2777 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
2778 "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.
2779 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
2780 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2781 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002782 "setPublicDns": True or False, # Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002783 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
2784 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
2785 #
2786 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2787 #
2788 # 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.
2789 "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.
2790 "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.
2791 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2792 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
2793 },
2794 ],
2795 "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.
2796 "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.
2797 "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:
2798 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2799 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002800 "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.
2801 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002802 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2803 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2804 # - projects/project/global/networks/network
2805 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002806 },
2807 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002808 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Dan O'Mearadd494642020-05-01 07:42:23 -07002809 "confidentialInstanceConfig": { # A set of Confidential Instance options.
2810 "enableConfidentialCompute": True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002811 },
2812 "shieldedInstanceConfig": { # A set of Shielded Instance options.
2813 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2814 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2815 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2816 },
2817 "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 -07002818 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002819 "sourceMachineImage": "A String", # Source machine image
Dan O'Mearadd494642020-05-01 07:42:23 -07002820 "postKeyRevocationActionType": "A String", # Specifies whether this instance will be shut down on key revocation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002821 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
2822 #
2823 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
2824 #
2825 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
2826 #
2827 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
2828 #
2829 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
2830 "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 -07002831 "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 -07002832 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2833 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2834 #
2835 # The key must meet the following requirements before you can provide it to Compute Engine:
2836 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002837 # - 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 -07002838 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002839 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002840 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002841 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
Dan O'Mearadd494642020-05-01 07:42:23 -07002842 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2843 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002844 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
2845 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2846 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2847 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002848 "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 -07002849 "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.
2850 },
2851 ],
2852 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002853 "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.
2854 #
2855 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002856 },
2857 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002858 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002859 "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.
2860 "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 -07002861 "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 -07002862 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2863 "A String",
2864 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002865 "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 -07002866 #
2867 # To see the latest fingerprint, make get() request to the instance.
2868 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002869 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
2870 "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 -07002871 "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 -07002872 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2873 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2874 #
2875 # The key must meet the following requirements before you can provide it to Compute Engine:
2876 # - The key is wrapped using a RSA public key certificate provided by Google.
2877 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
2878 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
2879 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2880 },
2881 "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 -07002882 #
2883 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002884 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
2885 "resourcePolicies": [ # Resource policies applied to this instance.
2886 "A String",
2887 ],
2888 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
Dan O'Mearadd494642020-05-01 07:42:23 -07002889 "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.
2890 #
2891 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002892 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002893 # zones/us-central1-f/machineTypes/n1-standard-1
2894 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002895 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002896 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -04002897 # zones/zone/machineTypes/custom-CPUS-MEMORY
2898 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002899 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002900 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2901 #
2902 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002903 "shieldedVmConfig": { # A set of Shielded VM options.
2904 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2905 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2906 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2907 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002908 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
2909 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2910 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002911 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002912 "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 -07002913 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
2914 { # An instance-attached disk resource.
2915 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
2916 #
2917 # 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.
2918 #
2919 # 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.
2920 #
2921 # 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.
2922 #
2923 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
2924 "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 -07002925 "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 -07002926 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2927 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2928 #
2929 # The key must meet the following requirements before you can provide it to Compute Engine:
2930 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002931 # - 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 -07002932 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002933 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002934 },
2935 "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.
2936 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002937 # 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 -07002938 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2939 "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.
2940 #
2941 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2942 #
2943 # 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 -07002944 "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 -07002945 #
2946 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2947 # global/snapshots/my-backup
2948 #
2949 #
2950 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002951 "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 -07002952 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07002953 "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 -07002954 "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.
2955 "a_key": "A String",
2956 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002957 "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.
2958 #
2959 # 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.
2960 "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 -07002961 "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 -07002962 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2963 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2964 #
2965 # The key must meet the following requirements before you can provide it to Compute Engine:
2966 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002967 # - 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 -07002968 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002969 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002970 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002971 "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 -07002972 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2973 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002974 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002975 # 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:
2976 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2977 # - projects/project/zones/zone/diskTypes/diskType
2978 # - 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 -07002979 "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.
2980 #
2981 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
2982 { # Guest OS features.
2983 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2984 },
2985 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002986 "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 -07002987 "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.
2988 "A String",
2989 ],
2990 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
2991 "A String",
2992 ],
2993 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2994 "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 -07002995 "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 -07002996 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2997 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
2998 #
2999 # The key must meet the following requirements before you can provide it to Compute Engine:
3000 # - The key is wrapped using a RSA public key certificate provided by Google.
3001 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3002 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3003 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
3004 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003005 "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 -07003006 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003007 # 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:
3008 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003009 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003010 #
3011 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003012 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003013 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003014 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003015 # To create a disk with a custom image that you created, specify the image name in the following format:
3016 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003017 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003018 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003019 # 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:
3020 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003021 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003022 #
3023 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003024 },
3025 "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 -07003026 "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 -07003027 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003028 "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
3029 "dbxs": [ # The forbidden key database (dbx).
3030 {
3031 "content": "A String", # The raw content in the secure keys file.
3032 "fileType": "A String",
3033 },
3034 ],
3035 "dbs": [ # The Key Database (db).
3036 {
3037 "content": "A String", # The raw content in the secure keys file.
3038 "fileType": "A String",
3039 },
3040 ],
3041 "keks": [ # The Key Exchange Key (KEK).
3042 {
3043 "content": "A String", # The raw content in the secure keys file.
3044 "fileType": "A String",
3045 },
3046 ],
3047 "pk": { # The Platform Key (PK).
3048 "content": "A String", # The raw content in the secure keys file.
3049 "fileType": "A String",
3050 },
3051 },
3052 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
3053 "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.
3054 { # Guest OS features.
3055 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
3056 },
3057 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003058 "diskSizeGb": "A String", # The size of the disk in GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003059 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003060 "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 -07003061 "licenses": [ # [Output Only] Any valid publicly visible licenses.
3062 "A String",
3063 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003064 "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 -07003065 "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 -08003066 #
3067 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
3068 #
3069 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003070 },
3071 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003072 "upcomingMaintenance": { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
3073 "date": "A String", # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
3074 "type": "A String", # Defines the type of maintenance.
3075 "time": "A String", # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
3076 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003077 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
3078}
3079
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003080 sourceInstanceTemplate: string, Specifies instance template to create the instance.
3081
3082This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
3083- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
3084- projects/project/global/instanceTemplates/instanceTemplate
3085- global/instanceTemplates/instanceTemplate
3086 sourceMachineImage: string, Specifies instance machine to create the instance.
3087
3088This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
3089- https://www.googleapis.com/compute/v1/projects/project/global/global/machineImages/machineImage
3090- projects/project/global/global/machineImages/machineImage
3091- global/machineImages/machineImage
3092 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.
3093
3094For 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.
3095
3096The 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 -07003097
3098Returns:
3099 An object of the form:
3100
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003101 { # Represents an Operation resource.
3102 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003103 # Google Compute Engine has three Operation resources:
3104 #
3105 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3106 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003107 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3108 #
3109 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003110 # - For global operations, use the `globalOperations` resource.
3111 # - For regional operations, use the `regionOperations` resource.
3112 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003113 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003114 # 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 -07003115 "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 -07003116 "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 -04003117 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003118 "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 -07003119 "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 -07003120 "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 -07003121 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3122 "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 -07003123 "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 -07003124 "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 -07003125 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003126 "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 -07003127 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3128 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3129 {
3130 "message": "A String", # [Output Only] A human-readable description of the warning code.
3131 "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.
3132 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3133 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3134 {
3135 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3136 "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).
3137 },
3138 ],
3139 },
3140 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003141 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07003142 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003143 "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 -07003144 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3145 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003146 "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 -07003147 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3148 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3149 {
3150 "message": "A String", # [Output Only] An optional, human-readable error message.
3151 "code": "A String", # [Output Only] The error type identifier for this error.
3152 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3153 },
3154 ],
3155 },
3156 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3157 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003158 "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 -07003159 }</pre>
3160</div>
3161
3162<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003163 <code class="details" id="list">list(project, zone, orderBy=None, pageToken=None, maxResults=None, returnPartialSuccess=None, filter=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003164 <pre>Retrieves the list of instances contained within the specified zone.
3165
3166Args:
3167 project: string, Project ID for this request. (required)
3168 zone: string, The name of the zone for this request. (required)
3169 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3170
Dan O'Mearadd494642020-05-01 07:42:23 -07003171You 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 -07003172
Dan O'Mearadd494642020-05-01 07:42:23 -07003173Currently, only sorting by `name` or `creationTimestamp desc` is supported.
3174 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.
3175 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`)
3176 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
3177 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 -07003178
Dan O'Mearadd494642020-05-01 07:42:23 -07003179For 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 -07003180
Dan O'Mearadd494642020-05-01 07:42:23 -07003181You 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 -07003182
Dan O'Mearadd494642020-05-01 07:42:23 -07003183To 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 -07003184
3185Returns:
3186 An object of the form:
3187
3188 { # Contains a list of instances.
3189 "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 -07003190 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
3191 "items": [ # A list of Instance resources.
3192 { # Represents an Instance resource.
3193 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003194 # 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 -07003195 "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 -07003196 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
3197 "values": [ # Corresponds to the label values of a reservation resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003198 "A String",
3199 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003200 "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 -07003201 "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.
3202 },
3203 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003204 { # A specification of the type and number of accelerator cards attached to the instance.
3205 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003206 "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 -04003207 },
3208 ],
3209 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003210 "a_key": "A String",
3211 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003212 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
3213 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
3214 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003215 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
3216 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
3217 "longTermRelease": True or False, # Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
3218 #
3219 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
3220 #
3221 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
3222 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
3223 "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.
3224 #
3225 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
3226 "locationHint": "A String", # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
3227 "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.
3228 "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 -07003229 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07003230 "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 -07003231 "values": [ # Corresponds to the label values of Node resource.
3232 "A String",
3233 ],
3234 "key": "A String", # Corresponds to the label key of Node resource.
3235 },
3236 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003237 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003238 "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 -07003239 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003240 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04003241 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003242 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003243 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003244 { # A service account.
3245 "scopes": [ # The list of scopes to be made available for this service account.
3246 "A String",
3247 ],
3248 "email": "A String", # Email address of the service account.
3249 },
3250 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003251 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003252 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
3253 "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 -07003254 "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 Cheemalapatidf613972016-10-21 13:59:49 -07003255 { # A network interface resource attached to an instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003256 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003257 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003258 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003259 "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.
3260 "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 Cheemalapatidf613972016-10-21 13:59:49 -07003261 },
3262 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003263 "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.
3264 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
3265 "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.
3266 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
3267 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
3268 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003269 "setPublicDns": True or False, # Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003270 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
3271 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
3272 #
3273 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
3274 #
3275 # 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.
3276 "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.
3277 "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.
3278 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
3279 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
3280 },
3281 ],
3282 "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.
3283 "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.
3284 "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:
3285 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
3286 # - regions/region/subnetworks/subnetwork
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003287 "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.
3288 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003289 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
3290 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
3291 # - projects/project/global/networks/network
3292 # - global/networks/default
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003293 },
3294 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003295 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
Dan O'Mearadd494642020-05-01 07:42:23 -07003296 "confidentialInstanceConfig": { # A set of Confidential Instance options.
3297 "enableConfidentialCompute": True or False, # Defines whether the instance should have confidential compute enabled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003298 },
3299 "shieldedInstanceConfig": { # A set of Shielded Instance options.
3300 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
3301 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
3302 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
3303 },
3304 "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 -07003305 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003306 "sourceMachineImage": "A String", # Source machine image
Dan O'Mearadd494642020-05-01 07:42:23 -07003307 "postKeyRevocationActionType": "A String", # Specifies whether this instance will be shut down on key revocation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003308 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
3309 #
3310 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
3311 #
3312 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
3313 #
3314 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
3315 #
3316 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
3317 "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 -07003318 "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 -07003319 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3320 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3321 #
3322 # The key must meet the following requirements before you can provide it to Compute Engine:
3323 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003324 # - 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 -07003325 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003326 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003327 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003328 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
Dan O'Mearadd494642020-05-01 07:42:23 -07003329 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
3330 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003331 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
3332 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
3333 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3334 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003335 "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 -07003336 "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.
3337 },
3338 ],
3339 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003340 "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.
3341 #
3342 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003343 },
3344 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003345 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003346 "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.
3347 "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 -07003348 "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 -07003349 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
3350 "A String",
3351 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003352 "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 -07003353 #
3354 # To see the latest fingerprint, make get() request to the instance.
3355 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003356 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
3357 "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 -07003358 "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 -07003359 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3360 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3361 #
3362 # The key must meet the following requirements before you can provide it to Compute Engine:
3363 # - The key is wrapped using a RSA public key certificate provided by Google.
3364 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3365 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3366 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
3367 },
3368 "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 -07003369 #
3370 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003371 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
3372 "resourcePolicies": [ # Resource policies applied to this instance.
3373 "A String",
3374 ],
3375 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
Dan O'Mearadd494642020-05-01 07:42:23 -07003376 "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.
3377 #
3378 # To see the latest fingerprint, make get() request to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003379 "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 Cheemalapatic30d2b52017-03-13 12:12:03 -04003380 # zones/us-central1-f/machineTypes/n1-standard-1
3381 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003382 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003383 # 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 Cheemalapatic30d2b52017-03-13 12:12:03 -04003384 # zones/zone/machineTypes/custom-CPUS-MEMORY
3385 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003386 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003387 # For example: zones/us-central1-f/machineTypes/custom-4-5120
3388 #
3389 # For a full list of restrictions, read the Specifications for custom machine types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003390 "shieldedVmConfig": { # A set of Shielded VM options.
3391 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
3392 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
3393 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
3394 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003395 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
3396 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
3397 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003398 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003399 "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 -07003400 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
3401 { # An instance-attached disk resource.
3402 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
3403 #
3404 # 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.
3405 #
3406 # 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.
3407 #
3408 # 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.
3409 #
3410 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
3411 "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 -07003412 "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 -07003413 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3414 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3415 #
3416 # The key must meet the following requirements before you can provide it to Compute Engine:
3417 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003418 # - 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 -07003419 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003420 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003421 },
3422 "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.
3423 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003424 # 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 -07003425 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
3426 "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.
3427 #
3428 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
3429 #
3430 # 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 -07003431 "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 -07003432 #
3433 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
3434 # global/snapshots/my-backup
3435 #
3436 #
3437 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07003438 "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 -07003439 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07003440 "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 -07003441 "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.
3442 "a_key": "A String",
3443 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003444 "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.
3445 #
3446 # 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.
3447 "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 -07003448 "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 -07003449 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3450 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3451 #
3452 # The key must meet the following requirements before you can provide it to Compute Engine:
3453 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003454 # - 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 -07003455 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003456 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003457 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003458 "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 -07003459 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
3460 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003461 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003462 # 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:
3463 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
3464 # - projects/project/zones/zone/diskTypes/diskType
3465 # - 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 -07003466 "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.
3467 #
3468 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
3469 { # Guest OS features.
3470 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
3471 },
3472 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003473 "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 -07003474 "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.
3475 "A String",
3476 ],
3477 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
3478 "A String",
3479 ],
3480 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
3481 "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 -07003482 "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 -07003483 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3484 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3485 #
3486 # The key must meet the following requirements before you can provide it to Compute Engine:
3487 # - The key is wrapped using a RSA public key certificate provided by Google.
3488 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3489 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3490 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
3491 },
Dan O'Mearadd494642020-05-01 07:42:23 -07003492 "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 -07003493 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003494 # 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:
3495 # projects/debian-cloud/global/images/family/debian-9
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003496 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003497 #
3498 # Alternatively, use a specific version of a public operating system image:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003499 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003500 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003501 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003502 # To create a disk with a custom image that you created, specify the image name in the following format:
3503 # global/images/my-custom-image
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003504 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003505 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003506 # 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:
3507 # global/images/family/my-image-family
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003508 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003509 #
3510 # If the source image is deleted later, this field will not be set.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003511 },
3512 "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 -07003513 "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 -07003514 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003515 "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
3516 "dbxs": [ # The forbidden key database (dbx).
3517 {
3518 "content": "A String", # The raw content in the secure keys file.
3519 "fileType": "A String",
3520 },
3521 ],
3522 "dbs": [ # The Key Database (db).
3523 {
3524 "content": "A String", # The raw content in the secure keys file.
3525 "fileType": "A String",
3526 },
3527 ],
3528 "keks": [ # The Key Exchange Key (KEK).
3529 {
3530 "content": "A String", # The raw content in the secure keys file.
3531 "fileType": "A String",
3532 },
3533 ],
3534 "pk": { # The Platform Key (PK).
3535 "content": "A String", # The raw content in the secure keys file.
3536 "fileType": "A String",
3537 },
3538 },
3539 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
3540 "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.
3541 { # Guest OS features.
3542 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
3543 },
3544 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003545 "diskSizeGb": "A String", # The size of the disk in GB.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003546 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07003547 "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 -07003548 "licenses": [ # [Output Only] Any valid publicly visible licenses.
3549 "A String",
3550 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003551 "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 -07003552 "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 -08003553 #
3554 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
3555 #
3556 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003557 },
3558 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003559 "upcomingMaintenance": { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
3560 "date": "A String", # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
3561 "type": "A String", # Defines the type of maintenance.
3562 "time": "A String", # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
3563 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003564 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
3565 },
3566 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003567 "warning": { # [Output Only] Informational warning message.
3568 "message": "A String", # [Output Only] A human-readable description of the warning code.
3569 "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.
3570 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3571 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3572 {
3573 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3574 "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).
3575 },
3576 ],
3577 },
3578 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003579 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
3580 }</pre>
3581</div>
3582
3583<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003584 <code class="details" id="listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, returnPartialSuccess=None, maxResults=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003585 <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 -04003586
3587Args:
3588 project: string, Project ID for this request. (required)
3589 zone: string, The name of the zone for this request. (required)
3590 instance: string, Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. (required)
3591 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
3592
Dan O'Mearadd494642020-05-01 07:42:23 -07003593You 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 -04003594
Dan O'Mearadd494642020-05-01 07:42:23 -07003595Currently, only sorting by `name` or `creationTimestamp desc` is supported.
3596 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 -04003597
Dan O'Mearadd494642020-05-01 07:42:23 -07003598For 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 -04003599
Dan O'Mearadd494642020-05-01 07:42:23 -07003600You 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 -04003601
Dan O'Mearadd494642020-05-01 07:42:23 -07003602To 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) ```
3603 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
3604 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`)
3605 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 -04003606
3607Returns:
3608 An object of the form:
3609
3610 { # Contains a list of instance referrers.
3611 "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 -07003612 "kind": "compute#instanceListReferrers", # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
3613 "items": [ # A list of Reference resources.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003614 { # Represents a reference to a resource.
3615 "referrer": "A String", # URL of the resource which refers to the target.
3616 "kind": "compute#reference", # [Output Only] Type of the resource. Always compute#reference for references.
3617 "referenceType": "A String", # A description of the reference type with no implied semantics. Possible values include:
3618 # - MEMBER_OF
3619 "target": "A String", # URL of the resource to which this reference points.
3620 },
3621 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003622 "warning": { # [Output Only] Informational warning message.
3623 "message": "A String", # [Output Only] A human-readable description of the warning code.
3624 "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.
3625 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3626 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3627 {
3628 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3629 "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).
3630 },
3631 ],
3632 },
3633 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003634 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
3635 }</pre>
3636</div>
3637
3638<div class="method">
3639 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
3640 <pre>Retrieves the next page of results.
3641
3642Args:
3643 previous_request: The request for the previous page. (required)
3644 previous_response: The response from the request for the previous page. (required)
3645
3646Returns:
3647 A request object that you can call 'execute()' on to request the next
3648 page. Returns None if there are no more items in the collection.
3649 </pre>
3650</div>
3651
3652<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003653 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
3654 <pre>Retrieves the next page of results.
3655
3656Args:
3657 previous_request: The request for the previous page. (required)
3658 previous_response: The response from the request for the previous page. (required)
3659
3660Returns:
3661 A request object that you can call 'execute()' on to request the next
3662 page. Returns None if there are no more items in the collection.
3663 </pre>
3664</div>
3665
3666<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003667 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003668 <pre>Removes resource policies from an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003669
3670Args:
3671 project: string, Project ID for this request. (required)
3672 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003673 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003674 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003675 The object takes the form of:
3676
3677{
3678 "resourcePolicies": [ # Resource policies to be removed from this instance.
3679 "A String",
3680 ],
3681 }
3682
3683 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.
3684
3685For 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.
3686
3687The 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 -07003688
3689Returns:
3690 An object of the form:
3691
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003692 { # Represents an Operation resource.
3693 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003694 # Google Compute Engine has three Operation resources:
3695 #
3696 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3697 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003698 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3699 #
3700 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003701 # - For global operations, use the `globalOperations` resource.
3702 # - For regional operations, use the `regionOperations` resource.
3703 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003704 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003705 # 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 -07003706 "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 -07003707 "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 -04003708 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003709 "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 -07003710 "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 -07003711 "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 -07003712 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3713 "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 -07003714 "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 -07003715 "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 -07003716 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003717 "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 -07003718 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3719 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3720 {
3721 "message": "A String", # [Output Only] A human-readable description of the warning code.
3722 "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.
3723 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3724 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3725 {
3726 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3727 "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).
3728 },
3729 ],
3730 },
3731 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003732 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07003733 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07003734 "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 -07003735 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3736 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003737 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3738 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3739 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3740 {
3741 "message": "A String", # [Output Only] An optional, human-readable error message.
3742 "code": "A String", # [Output Only] The error type identifier for this error.
3743 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3744 },
3745 ],
3746 },
3747 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3748 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3749 "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.
3750 }</pre>
3751</div>
3752
3753<div class="method">
3754 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
3755 <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.
3756
3757Args:
3758 project: string, Project ID for this request. (required)
3759 zone: string, The name of the zone for this request. (required)
3760 instance: string, Name of the instance scoping this request. (required)
3761 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.
3762
3763For 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.
3764
3765The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3766
3767Returns:
3768 An object of the form:
3769
3770 { # Represents an Operation resource.
3771 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003772 # Google Compute Engine has three Operation resources:
3773 #
3774 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3775 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003776 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3777 #
3778 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003779 # - For global operations, use the `globalOperations` resource.
3780 # - For regional operations, use the `regionOperations` resource.
3781 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003782 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003783 # 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 -07003784 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3785 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3786 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003787 "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 -07003788 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3789 "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 -07003790 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3791 "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 -07003792 "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 -07003793 "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 -07003794 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003795 "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 -07003796 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3797 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3798 {
3799 "message": "A String", # [Output Only] A human-readable description of the warning code.
3800 "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.
3801 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3802 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3803 {
3804 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3805 "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).
3806 },
3807 ],
3808 },
3809 ],
3810 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07003811 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003812 "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 -07003813 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3814 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003815 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3816 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3817 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3818 {
3819 "message": "A String", # [Output Only] An optional, human-readable error message.
3820 "code": "A String", # [Output Only] The error type identifier for this error.
3821 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3822 },
3823 ],
3824 },
3825 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3826 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3827 "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.
3828 }</pre>
3829</div>
3830
3831<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003832 <code class="details" id="resume">resume(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003833 <pre>Resumes an instance that was suspended using the instances().suspend method.
3834
3835Args:
3836 project: string, Project ID for this request. (required)
3837 zone: string, The name of the zone for this request. (required)
3838 instance: string, Name of the instance resource to resume. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003839 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003840 The object takes the form of:
3841
3842{
3843 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
3844 #
3845 # 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.
3846 "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 -07003847 "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 -07003848 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3849 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3850 #
3851 # The key must meet the following requirements before you can provide it to Compute Engine:
3852 # - The key is wrapped using a RSA public key certificate provided by Google.
3853 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3854 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3855 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
3856 },
3857 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
3858 #
3859 # In order to resume the instance, the disk url and its corresponding key must be provided.
3860 #
3861 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
3862 {
3863 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
3864 "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 -07003865 "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 -07003866 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
3867 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
3868 #
3869 # The key must meet the following requirements before you can provide it to Compute Engine:
3870 # - The key is wrapped using a RSA public key certificate provided by Google.
3871 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
3872 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
3873 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
3874 },
3875 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
3876 },
3877 ],
3878 }
3879
3880 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.
3881
3882For 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.
3883
3884The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3885
3886Returns:
3887 An object of the form:
3888
3889 { # Represents an Operation resource.
3890 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003891 # Google Compute Engine has three Operation resources:
3892 #
3893 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3894 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003895 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3896 #
3897 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003898 # - For global operations, use the `globalOperations` resource.
3899 # - For regional operations, use the `regionOperations` resource.
3900 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003901 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003902 # 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 -07003903 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3904 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3905 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003906 "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 -07003907 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3908 "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 -07003909 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3910 "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 -07003911 "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 -07003912 "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 -07003913 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003914 "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 -07003915 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3916 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3917 {
3918 "message": "A String", # [Output Only] A human-readable description of the warning code.
3919 "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.
3920 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3921 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3922 {
3923 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3924 "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).
3925 },
3926 ],
3927 },
3928 ],
3929 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07003930 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003931 "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 -07003932 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3933 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003934 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3935 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3936 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3937 {
3938 "message": "A String", # [Output Only] An optional, human-readable error message.
3939 "code": "A String", # [Output Only] The error type identifier for this error.
3940 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3941 },
3942 ],
3943 },
3944 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3945 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3946 "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.
3947 }</pre>
3948</div>
3949
3950<div class="method">
3951 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
3952 <pre>Sets deletion protection on the instance.
3953
3954Args:
3955 project: string, Project ID for this request. (required)
3956 zone: string, The name of the zone for this request. (required)
3957 resource: string, Name or id of the resource for this request. (required)
3958 deletionProtection: boolean, Whether the resource should be protected against deletion.
3959 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.
3960
3961For 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.
3962
3963The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3964
3965Returns:
3966 An object of the form:
3967
3968 { # Represents an Operation resource.
3969 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003970 # Google Compute Engine has three Operation resources:
3971 #
3972 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3973 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003974 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3975 #
3976 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003977 # - For global operations, use the `globalOperations` resource.
3978 # - For regional operations, use the `regionOperations` resource.
3979 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003980 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003981 # 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 -07003982 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3983 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3984 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003985 "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 -07003986 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3987 "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 -07003988 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3989 "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 -07003990 "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 -07003991 "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 -07003992 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003993 "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 -07003994 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3995 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3996 {
3997 "message": "A String", # [Output Only] A human-readable description of the warning code.
3998 "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.
3999 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4000 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4001 {
4002 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4003 "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).
4004 },
4005 ],
4006 },
4007 ],
4008 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07004009 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004010 "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 -07004011 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4012 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004013 "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 -07004014 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4015 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4016 {
4017 "message": "A String", # [Output Only] An optional, human-readable error message.
4018 "code": "A String", # [Output Only] The error type identifier for this error.
4019 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4020 },
4021 ],
4022 },
4023 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4024 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004025 "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 -07004026 }</pre>
4027</div>
4028
4029<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004030 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004031 <pre>Sets the auto-delete flag for a disk attached to an instance.
4032
4033Args:
4034 project: string, Project ID for this request. (required)
4035 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004036 instance: string, The instance name for this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004037 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004038 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)
4039 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.
4040
4041For 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.
4042
4043The 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 -07004044
4045Returns:
4046 An object of the form:
4047
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004048 { # Represents an Operation resource.
4049 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004050 # Google Compute Engine has three Operation resources:
4051 #
4052 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4053 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004054 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4055 #
4056 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004057 # - For global operations, use the `globalOperations` resource.
4058 # - For regional operations, use the `regionOperations` resource.
4059 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004060 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004061 # 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 -07004062 "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 -07004063 "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 -04004064 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004065 "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 -07004066 "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 -07004067 "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 -07004068 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4069 "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 -07004070 "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 -07004071 "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 -07004072 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004073 "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 -07004074 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4075 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4076 {
4077 "message": "A String", # [Output Only] A human-readable description of the warning code.
4078 "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.
4079 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4080 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4081 {
4082 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4083 "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).
4084 },
4085 ],
4086 },
4087 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004088 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07004089 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004090 "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 -07004091 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4092 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004093 "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 -07004094 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4095 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4096 {
4097 "message": "A String", # [Output Only] An optional, human-readable error message.
4098 "code": "A String", # [Output Only] The error type identifier for this error.
4099 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4100 },
4101 ],
4102 },
4103 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4104 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004105 "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 -07004106 }</pre>
4107</div>
4108
4109<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004110 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004111 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
4112
4113Args:
4114 project: string, Project ID for this request. (required)
4115 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004116 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004117 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004118 The object takes the form of:
4119
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004120{
Dan O'Mearadd494642020-05-01 07:42:23 -07004121 "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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004122 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004123 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004124 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004125 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004126 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004127 # 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 -07004128 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004129 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004130 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004131 # { "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 -07004132 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004133 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004134 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004135 # 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 -07004136 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004137 # 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 -07004138 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
4139 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004140 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004141 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004142 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004143 # Example Policy with multiple AuditConfigs:
4144 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004145 # { "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 -07004146 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004147 # 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 -07004148 "exemptedMembers": [
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004149 "A String",
4150 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004151 "auditLogConfigs": [ # The configuration for logging of each type of permission.
4152 { # Provides the configuration for logging a type of permissions. Example:
4153 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004154 # { "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 -07004155 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004156 # 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 -07004157 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
4158 "A String",
4159 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004160 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004161 "logType": "A String", # The log type that this config enables.
4162 },
4163 ],
4164 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004165 },
4166 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004167 "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.
4168 { # A rule to be applied in a Policy.
4169 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4170 { # Specifies what kind of log the caller must write
4171 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
4172 #
4173 # 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.
4174 #
4175 # Field names correspond to IAM request parameters and field values are their respective values.
4176 #
4177 # 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.
4178 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004179 # 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 -07004180 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07004181 "customFields": [ # Custom fields.
4182 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4183 "name": "A String", # Name is the field name.
4184 "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.
4185 },
4186 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004187 "metric": "A String", # The metric to update.
4188 },
4189 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07004190 "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 -07004191 },
4192 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
4193 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
4194 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4195 "permissionType": "A String", # The type of the permission that was checked.
4196 },
4197 },
4198 },
4199 ],
4200 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
4201 "A String",
4202 ],
4203 "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.
4204 "A String",
4205 ],
4206 "action": "A String", # Required
4207 "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.
4208 "A String",
4209 ],
4210 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
4211 { # A condition to be met.
4212 "iam": "A String", # Trusted attributes supplied by the IAM system.
4213 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
4214 "values": [ # The objects of the condition.
4215 "A String",
4216 ],
4217 "svc": "A String", # Trusted attributes discharged by the service.
4218 "op": "A String", # An operator to apply the subject with.
4219 },
4220 ],
4221 "description": "A String", # Human-readable description of the rule.
4222 },
4223 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004224 "version": 42, # Specifies the format of the policy.
4225 #
4226 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4227 #
4228 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4229 #
4230 # * 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
4231 #
4232 # **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.
4233 #
4234 # 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 -07004235 "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.
4236 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004237 # **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.
4238 "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 -07004239 { # Associates `members` with a `role`.
4240 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
4241 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
4242 #
4243 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4244 #
4245 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4246 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004247 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004248 #
4249 #
4250 #
4251 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4252 #
4253 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4254 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004255 # * `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.
4256 #
4257 # * `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.
4258 #
4259 # * `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.
4260 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004261 #
4262 #
4263 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
4264 "A String",
4265 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004266 "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 -07004267 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004268 # Example (Comparison):
4269 #
4270 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
4271 #
4272 # Example (Equality):
4273 #
4274 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
4275 #
4276 # Example (Logic):
4277 #
4278 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
4279 #
4280 # Example (Data Manipulation):
4281 #
4282 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
4283 #
4284 # 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.
4285 "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 -07004286 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07004287 "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.
4288 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004289 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004290 },
4291 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004292 "iamOwned": True or False,
4293 },
4294 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.
4295 { # Associates `members` with a `role`.
4296 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
4297 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
4298 #
4299 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4300 #
4301 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4302 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004303 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004304 #
4305 #
4306 #
4307 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4308 #
4309 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4310 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004311 # * `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.
4312 #
4313 # * `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.
4314 #
4315 # * `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.
4316 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004317 #
4318 #
4319 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
4320 "A String",
4321 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004322 "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 -07004323 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004324 # Example (Comparison):
4325 #
4326 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
4327 #
4328 # Example (Equality):
4329 #
4330 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
4331 #
4332 # Example (Logic):
4333 #
4334 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
4335 #
4336 # Example (Data Manipulation):
4337 #
4338 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
4339 #
4340 # 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.
4341 "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 -07004342 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07004343 "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.
4344 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004345 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004346 },
4347 ],
4348 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
4349 }
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004350
4351
4352Returns:
4353 An object of the form:
4354
Dan O'Mearadd494642020-05-01 07:42:23 -07004355 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004356 #
4357 #
4358 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004359 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004360 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004361 # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004362 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004363 # **JSON example:**
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004364 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004365 # { "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 -07004366 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004367 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004368 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004369 # 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 -07004370 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004371 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004372 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004373 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004374 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004375 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004376 #
4377 # Example Policy with multiple AuditConfigs:
4378 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004379 # { "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" ] } ] } ] }
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004380 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004381 # 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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004382 "exemptedMembers": [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004383 "A String",
4384 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004385 "auditLogConfigs": [ # The configuration for logging of each type of permission.
4386 { # Provides the configuration for logging a type of permissions. Example:
4387 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004388 # { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE", } ] }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004389 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004390 # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004391 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004392 "A String",
4393 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004394 "ignoreChildExemptions": True or False,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004395 "logType": "A String", # The log type that this config enables.
4396 },
4397 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004398 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004399 },
4400 ],
4401 "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.
4402 { # A rule to be applied in a Policy.
4403 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
4404 { # Specifies what kind of log the caller must write
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004405 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
4406 #
4407 # 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.
4408 #
4409 # Field names correspond to IAM request parameters and field values are their respective values.
4410 #
4411 # 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.
4412 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004413 # Examples: counter { metric: "/debug_access_count" field: "iam_principal" } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004414 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07004415 "customFields": [ # Custom fields.
4416 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
4417 "name": "A String", # Name is the field name.
4418 "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.
4419 },
4420 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004421 "metric": "A String", # The metric to update.
4422 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004423 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07004424 "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 -07004425 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004426 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
4427 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004428 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
4429 "permissionType": "A String", # The type of the permission that was checked.
4430 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004431 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004432 },
4433 ],
4434 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
4435 "A String",
4436 ],
4437 "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.
4438 "A String",
4439 ],
4440 "action": "A String", # Required
4441 "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.
4442 "A String",
4443 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004444 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004445 { # A condition to be met.
4446 "iam": "A String", # Trusted attributes supplied by the IAM system.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004447 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004448 "values": [ # The objects of the condition.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004449 "A String",
4450 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004451 "svc": "A String", # Trusted attributes discharged by the service.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004452 "op": "A String", # An operator to apply the subject with.
4453 },
4454 ],
4455 "description": "A String", # Human-readable description of the rule.
4456 },
4457 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004458 "version": 42, # Specifies the format of the policy.
4459 #
4460 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
4461 #
4462 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
4463 #
4464 # * 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
4465 #
4466 # **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.
4467 #
4468 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004469 "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.
4470 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004471 # **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.
4472 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004473 { # Associates `members` with a `role`.
4474 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
4475 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
4476 #
4477 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
4478 #
4479 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
4480 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004481 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004482 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004483 #
4484 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004485 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
4486 #
4487 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
4488 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004489 # * `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.
4490 #
4491 # * `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.
4492 #
4493 # * `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.
4494 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04004495 #
4496 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004497 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004498 "A String",
4499 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004500 "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 -07004501 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004502 # Example (Comparison):
4503 #
4504 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
4505 #
4506 # Example (Equality):
4507 #
4508 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
4509 #
4510 # Example (Logic):
4511 #
4512 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
4513 #
4514 # Example (Data Manipulation):
4515 #
4516 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
4517 #
4518 # 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.
4519 "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 -07004520 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07004521 "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.
4522 "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 -07004523 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004524 },
4525 ],
4526 "iamOwned": True or False,
4527 }</pre>
4528</div>
4529
4530<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004531 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004532 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004533
4534Args:
4535 project: string, Project ID for this request. (required)
4536 zone: string, The name of the zone for this request. (required)
4537 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004538 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004539 The object takes the form of:
4540
4541{
4542 "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 -04004543 "labels": {
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004544 "a_key": "A String",
4545 },
4546 }
4547
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004548 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.
4549
4550For 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.
4551
4552The 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 -07004553
4554Returns:
4555 An object of the form:
4556
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004557 { # Represents an Operation resource.
4558 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004559 # Google Compute Engine has three Operation resources:
4560 #
4561 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4562 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004563 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4564 #
4565 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004566 # - For global operations, use the `globalOperations` resource.
4567 # - For regional operations, use the `regionOperations` resource.
4568 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004569 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004570 # 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 -07004571 "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 -07004572 "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 -04004573 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004574 "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 -07004575 "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 -07004576 "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 -07004577 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4578 "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 -07004579 "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 -07004580 "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 -07004581 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004582 "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 -07004583 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4584 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4585 {
4586 "message": "A String", # [Output Only] A human-readable description of the warning code.
4587 "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.
4588 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4589 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4590 {
4591 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4592 "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).
4593 },
4594 ],
4595 },
4596 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004597 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07004598 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004599 "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 -07004600 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4601 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004602 "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 -07004603 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4604 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4605 {
4606 "message": "A String", # [Output Only] An optional, human-readable error message.
4607 "code": "A String", # [Output Only] The error type identifier for this error.
4608 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4609 },
4610 ],
4611 },
4612 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4613 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004614 "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 -07004615 }</pre>
4616</div>
4617
4618<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004619 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004620 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
4621
4622Args:
4623 project: string, Project ID for this request. (required)
4624 zone: string, The name of the zone for this request. (required)
4625 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004626 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004627 The object takes the form of:
4628
4629{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004630 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004631 { # A specification of the type and number of accelerator cards attached to the instance.
4632 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004633 "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 -04004634 },
4635 ],
4636 }
4637
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004638 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.
4639
4640For 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.
4641
4642The 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 -04004643
4644Returns:
4645 An object of the form:
4646
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004647 { # Represents an Operation resource.
4648 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004649 # Google Compute Engine has three Operation resources:
4650 #
4651 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4652 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004653 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4654 #
4655 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004656 # - For global operations, use the `globalOperations` resource.
4657 # - For regional operations, use the `regionOperations` resource.
4658 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004659 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004660 # 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 -04004661 "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 -07004662 "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 -04004663 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004664 "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 -07004665 "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 -04004666 "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 -07004667 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4668 "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 -04004669 "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 -07004670 "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 -04004671 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004672 "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 -04004673 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4674 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4675 {
4676 "message": "A String", # [Output Only] A human-readable description of the warning code.
4677 "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.
4678 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4679 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4680 {
4681 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4682 "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).
4683 },
4684 ],
4685 },
4686 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004687 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07004688 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004689 "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 -07004690 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4691 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004692 "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 -04004693 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4694 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4695 {
4696 "message": "A String", # [Output Only] An optional, human-readable error message.
4697 "code": "A String", # [Output Only] The error type identifier for this error.
4698 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4699 },
4700 ],
4701 },
4702 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4703 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4704 "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.
4705 }</pre>
4706</div>
4707
4708<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004709 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004710 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
4711
4712Args:
4713 project: string, Project ID for this request. (required)
4714 zone: string, The name of the zone for this request. (required)
4715 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004716 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004717 The object takes the form of:
4718
4719{
4720 "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
4721 }
4722
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004723 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.
4724
4725For 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.
4726
4727The 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 -07004728
4729Returns:
4730 An object of the form:
4731
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004732 { # Represents an Operation resource.
4733 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004734 # Google Compute Engine has three Operation resources:
4735 #
4736 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4737 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004738 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4739 #
4740 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004741 # - For global operations, use the `globalOperations` resource.
4742 # - For regional operations, use the `regionOperations` resource.
4743 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004744 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004745 # 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 -07004746 "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 -07004747 "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 -04004748 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004749 "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 -07004750 "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 -07004751 "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 -07004752 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4753 "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 -07004754 "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 -07004755 "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 -07004756 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004757 "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 -07004758 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4759 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4760 {
4761 "message": "A String", # [Output Only] A human-readable description of the warning code.
4762 "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.
4763 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4764 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4765 {
4766 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4767 "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).
4768 },
4769 ],
4770 },
4771 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004772 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07004773 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004774 "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 -07004775 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4776 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004777 "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 -07004778 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4779 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4780 {
4781 "message": "A String", # [Output Only] An optional, human-readable error message.
4782 "code": "A String", # [Output Only] The error type identifier for this error.
4783 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4784 },
4785 ],
4786 },
4787 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4788 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004789 "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 -07004790 }</pre>
4791</div>
4792
4793<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004794 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004795 <pre>Sets metadata for the specified instance to the data included in the request.
4796
4797Args:
4798 project: string, Project ID for this request. (required)
4799 zone: string, The name of the zone for this request. (required)
4800 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004801 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004802 The object takes the form of:
4803
4804{ # A metadata key/value entry.
4805 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4806 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004807 "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 -07004808 "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.
4809 },
4810 ],
4811 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004812 "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.
4813 #
4814 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004815}
4816
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004817 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.
4818
4819For 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.
4820
4821The 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 -07004822
4823Returns:
4824 An object of the form:
4825
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004826 { # Represents an Operation resource.
4827 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004828 # Google Compute Engine has three Operation resources:
4829 #
4830 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4831 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004832 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4833 #
4834 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004835 # - For global operations, use the `globalOperations` resource.
4836 # - For regional operations, use the `regionOperations` resource.
4837 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004838 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004839 # 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 -07004840 "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 -07004841 "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 -04004842 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004843 "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 -07004844 "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 -07004845 "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 -07004846 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4847 "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 -07004848 "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 -07004849 "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 -07004850 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004851 "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 -07004852 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4853 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4854 {
4855 "message": "A String", # [Output Only] A human-readable description of the warning code.
4856 "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.
4857 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4858 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4859 {
4860 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4861 "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).
4862 },
4863 ],
4864 },
4865 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004866 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07004867 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07004868 "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 -07004869 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4870 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004871 "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 -07004872 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4873 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4874 {
4875 "message": "A String", # [Output Only] An optional, human-readable error message.
4876 "code": "A String", # [Output Only] The error type identifier for this error.
4877 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4878 },
4879 ],
4880 },
4881 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4882 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004883 "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 -07004884 }</pre>
4885</div>
4886
4887<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004888 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004889 <pre>Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004890
4891Args:
4892 project: string, Project ID for this request. (required)
4893 zone: string, The name of the zone for this request. (required)
4894 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004895 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004896 The object takes the form of:
4897
4898{
4899 "minCpuPlatform": "A String", # Minimum cpu/platform this instance should be started at.
4900 }
4901
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004902 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.
4903
4904For 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.
4905
4906The 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 -04004907
4908Returns:
4909 An object of the form:
4910
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004911 { # Represents an Operation resource.
4912 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004913 # Google Compute Engine has three Operation resources:
4914 #
4915 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4916 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004917 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4918 #
4919 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004920 # - For global operations, use the `globalOperations` resource.
4921 # - For regional operations, use the `regionOperations` resource.
4922 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004923 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004924 # 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 -04004925 "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 -07004926 "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 -04004927 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004928 "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 -07004929 "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 -04004930 "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 -07004931 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4932 "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 -04004933 "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 -07004934 "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 -04004935 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004936 "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 -04004937 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4938 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4939 {
4940 "message": "A String", # [Output Only] A human-readable description of the warning code.
4941 "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.
4942 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4943 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4944 {
4945 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4946 "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).
4947 },
4948 ],
4949 },
4950 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004951 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07004952 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04004953 "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 -07004954 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4955 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004956 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4957 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4958 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4959 {
4960 "message": "A String", # [Output Only] An optional, human-readable error message.
4961 "code": "A String", # [Output Only] The error type identifier for this error.
4962 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4963 },
4964 ],
4965 },
4966 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4967 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4968 "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.
4969 }</pre>
4970</div>
4971
4972<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004973 <code class="details" id="setName">setName(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004974 <pre>Sets name of an instance.
4975
4976Args:
4977 project: string, Project ID for this request. (required)
4978 zone: string, The name of the zone for this request. (required)
4979 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004980 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004981 The object takes the form of:
4982
4983{
4984 "currentName": "A String", # The current name of this resource, used to prevent conflicts. Provide the latest name when making a request to change name.
4985 "name": "A String", # The name to be applied to the instance. Needs to be RFC 1035 compliant.
4986 }
4987
4988 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.
4989
4990For 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.
4991
4992The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4993
4994Returns:
4995 An object of the form:
4996
4997 { # Represents an Operation resource.
4998 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004999 # Google Compute Engine has three Operation resources:
5000 #
5001 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5002 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005003 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5004 #
5005 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005006 # - For global operations, use the `globalOperations` resource.
5007 # - For regional operations, use the `regionOperations` resource.
5008 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005009 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005010 # 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 -07005011 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5012 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5013 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005014 "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 -07005015 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5016 "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 -07005017 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5018 "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 -07005019 "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 -07005020 "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 -07005021 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005022 "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 -07005023 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5024 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5025 {
5026 "message": "A String", # [Output Only] A human-readable description of the warning code.
5027 "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.
5028 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5029 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5030 {
5031 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5032 "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).
5033 },
5034 ],
5035 },
5036 ],
5037 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005038 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005039 "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 -07005040 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5041 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005042 "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 -04005043 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5044 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5045 {
5046 "message": "A String", # [Output Only] An optional, human-readable error message.
5047 "code": "A String", # [Output Only] The error type identifier for this error.
5048 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5049 },
5050 ],
5051 },
5052 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5053 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5054 "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.
5055 }</pre>
5056</div>
5057
5058<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005059 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005060 <pre>Sets an instance's scheduling options.
5061
5062Args:
5063 project: string, Project ID for this request. (required)
5064 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005065 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005066 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005067 The object takes the form of:
5068
Dan O'Mearadd494642020-05-01 07:42:23 -07005069{ # Sets the scheduling options for an Instance. NextID: 10
5070 "longTermRelease": True or False, # Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
5071 #
5072 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
5073 #
5074 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
5075 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
5076 "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.
5077 #
5078 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
5079 "locationHint": "A String", # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
5080 "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.
5081 "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 -07005082 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07005083 "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 -07005084 "values": [ # Corresponds to the label values of Node resource.
5085 "A String",
5086 ],
5087 "key": "A String", # Corresponds to the label key of Node resource.
5088 },
5089 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005090 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
Dan O'Mearadd494642020-05-01 07:42:23 -07005091 "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 -07005092}
5093
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005094 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.
5095
5096For 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.
5097
5098The 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 -07005099
5100Returns:
5101 An object of the form:
5102
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005103 { # Represents an Operation resource.
5104 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005105 # Google Compute Engine has three Operation resources:
5106 #
5107 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5108 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005109 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5110 #
5111 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005112 # - For global operations, use the `globalOperations` resource.
5113 # - For regional operations, use the `regionOperations` resource.
5114 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005115 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005116 # 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 -07005117 "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 -07005118 "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 -04005119 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005120 "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 -07005121 "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 -07005122 "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 -07005123 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5124 "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 -07005125 "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 -07005126 "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 -07005127 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005128 "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 -07005129 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5130 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5131 {
5132 "message": "A String", # [Output Only] A human-readable description of the warning code.
5133 "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.
5134 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5135 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5136 {
5137 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5138 "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).
5139 },
5140 ],
5141 },
5142 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005143 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005144 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005145 "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 -07005146 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5147 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005148 "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 -07005149 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5150 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5151 {
5152 "message": "A String", # [Output Only] An optional, human-readable error message.
5153 "code": "A String", # [Output Only] The error type identifier for this error.
5154 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5155 },
5156 ],
5157 },
5158 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5159 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005160 "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 -07005161 }</pre>
5162</div>
5163
5164<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005165 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005166 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005167
5168Args:
5169 project: string, Project ID for this request. (required)
5170 zone: string, The name of the zone for this request. (required)
5171 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005172 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005173 The object takes the form of:
5174
5175{
5176 "scopes": [ # The list of scopes to be made available for this service account.
5177 "A String",
5178 ],
5179 "email": "A String", # Email address of the service account.
5180 }
5181
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005182 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.
5183
5184For 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.
5185
5186The 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 -07005187
5188Returns:
5189 An object of the form:
5190
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005191 { # Represents an Operation resource.
5192 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005193 # Google Compute Engine has three Operation resources:
5194 #
5195 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5196 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005197 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5198 #
5199 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005200 # - For global operations, use the `globalOperations` resource.
5201 # - For regional operations, use the `regionOperations` resource.
5202 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005203 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005204 # 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 -07005205 "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 -07005206 "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 -04005207 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005208 "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 -07005209 "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 -07005210 "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 -07005211 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5212 "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 -07005213 "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 -07005214 "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 -07005215 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005216 "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 -07005217 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5218 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5219 {
5220 "message": "A String", # [Output Only] A human-readable description of the warning code.
5221 "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.
5222 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5223 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5224 {
5225 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5226 "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).
5227 },
5228 ],
5229 },
5230 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005231 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005232 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005233 "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 -07005234 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5235 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005236 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5237 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5238 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5239 {
5240 "message": "A String", # [Output Only] An optional, human-readable error message.
5241 "code": "A String", # [Output Only] The error type identifier for this error.
5242 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5243 },
5244 ],
5245 },
5246 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5247 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5248 "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.
5249 }</pre>
5250</div>
5251
5252<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005253 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005254 <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.
5255
5256Args:
5257 project: string, Project ID for this request. (required)
5258 zone: string, The name of the zone for this request. (required)
5259 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005260 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005261 The object takes the form of:
5262
5263{ # The policy describes the baseline against which Instance boot integrity is measured.
Dan O'Mearadd494642020-05-01 07:42:23 -07005264 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
5265}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005266
5267 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.
5268
5269For 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.
5270
5271The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5272
5273Returns:
5274 An object of the form:
5275
5276 { # Represents an Operation resource.
5277 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005278 # Google Compute Engine has three Operation resources:
5279 #
5280 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5281 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005282 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5283 #
5284 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005285 # - For global operations, use the `globalOperations` resource.
5286 # - For regional operations, use the `regionOperations` resource.
5287 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005288 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005289 # 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 -07005290 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5291 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5292 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005293 "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 -07005294 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5295 "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 -07005296 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5297 "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 -07005298 "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 -07005299 "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 -07005300 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005301 "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 -07005302 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5303 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5304 {
5305 "message": "A String", # [Output Only] A human-readable description of the warning code.
5306 "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.
5307 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5308 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5309 {
5310 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5311 "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).
5312 },
5313 ],
5314 },
5315 ],
5316 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005317 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005318 "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 -07005319 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5320 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005321 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5322 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5323 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5324 {
5325 "message": "A String", # [Output Only] An optional, human-readable error message.
5326 "code": "A String", # [Output Only] The error type identifier for this error.
5327 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5328 },
5329 ],
5330 },
5331 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5332 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5333 "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.
5334 }</pre>
5335</div>
5336
5337<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005338 <code class="details" id="setShieldedVmIntegrityPolicy">setShieldedVmIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005339 <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.
5340
5341Args:
5342 project: string, Project ID for this request. (required)
5343 zone: string, The name of the zone for this request. (required)
5344 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005345 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005346 The object takes the form of:
5347
5348{ # The policy describes the baseline against which VM instance boot integrity is measured.
5349 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
5350}
5351
5352 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.
5353
5354For 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.
5355
5356The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5357
5358Returns:
5359 An object of the form:
5360
5361 { # Represents an Operation resource.
5362 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005363 # Google Compute Engine has three Operation resources:
5364 #
5365 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5366 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005367 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5368 #
5369 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005370 # - For global operations, use the `globalOperations` resource.
5371 # - For regional operations, use the `regionOperations` resource.
5372 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005373 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005374 # 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 -07005375 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5376 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5377 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005378 "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 -07005379 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5380 "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 -07005381 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5382 "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 -07005383 "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 -07005384 "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 -07005385 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005386 "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 -07005387 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5388 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5389 {
5390 "message": "A String", # [Output Only] A human-readable description of the warning code.
5391 "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.
5392 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5393 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5394 {
5395 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5396 "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).
5397 },
5398 ],
5399 },
5400 ],
5401 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005402 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005403 "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 -07005404 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5405 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005406 "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 -07005407 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5408 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5409 {
5410 "message": "A String", # [Output Only] An optional, human-readable error message.
5411 "code": "A String", # [Output Only] The error type identifier for this error.
5412 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5413 },
5414 ],
5415 },
5416 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5417 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005418 "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 -07005419 }</pre>
5420</div>
5421
5422<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005423 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005424 <pre>Sets network tags for the specified instance to the data included in the request.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005425
5426Args:
5427 project: string, Project ID for this request. (required)
5428 zone: string, The name of the zone for this request. (required)
5429 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005430 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005431 The object takes the form of:
5432
5433{ # A set of instance tags.
5434 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
5435 "A String",
5436 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005437 "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 -07005438 #
5439 # To see the latest fingerprint, make get() request to the instance.
5440}
5441
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005442 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.
5443
5444For 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.
5445
5446The 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 -07005447
5448Returns:
5449 An object of the form:
5450
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005451 { # Represents an Operation resource.
5452 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005453 # Google Compute Engine has three Operation resources:
5454 #
5455 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5456 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005457 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5458 #
5459 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005460 # - For global operations, use the `globalOperations` resource.
5461 # - For regional operations, use the `regionOperations` resource.
5462 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005463 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005464 # 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 -07005465 "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 -07005466 "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 -04005467 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005468 "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 -07005469 "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 -07005470 "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 -07005471 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5472 "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 -07005473 "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 -07005474 "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 -07005475 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005476 "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 -07005477 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5478 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5479 {
5480 "message": "A String", # [Output Only] A human-readable description of the warning code.
5481 "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.
5482 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5483 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5484 {
5485 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5486 "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).
5487 },
5488 ],
5489 },
5490 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005491 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005492 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005493 "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 -07005494 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5495 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005496 "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 -07005497 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5498 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5499 {
5500 "message": "A String", # [Output Only] An optional, human-readable error message.
5501 "code": "A String", # [Output Only] The error type identifier for this error.
5502 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5503 },
5504 ],
5505 },
5506 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5507 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005508 "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 -07005509 }</pre>
5510</div>
5511
5512<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005513 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
5514 <pre>Simulates a maintenance event on the instance.
5515
5516Args:
5517 project: string, Project ID for this request. (required)
5518 zone: string, The name of the zone for this request. (required)
5519 instance: string, Name of the instance scoping this request. (required)
5520
5521Returns:
5522 An object of the form:
5523
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005524 { # Represents an Operation resource.
5525 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005526 # Google Compute Engine has three Operation resources:
5527 #
5528 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5529 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005530 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5531 #
5532 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005533 # - For global operations, use the `globalOperations` resource.
5534 # - For regional operations, use the `regionOperations` resource.
5535 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005536 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005537 # 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 -04005538 "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 -07005539 "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 -04005540 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005541 "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 -07005542 "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 -04005543 "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 -07005544 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5545 "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 -04005546 "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 -07005547 "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 -04005548 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005549 "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 -04005550 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5551 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5552 {
5553 "message": "A String", # [Output Only] A human-readable description of the warning code.
5554 "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.
5555 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5556 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5557 {
5558 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5559 "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).
5560 },
5561 ],
5562 },
5563 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005564 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005565 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005566 "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 -07005567 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5568 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005569 "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 -04005570 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5571 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5572 {
5573 "message": "A String", # [Output Only] An optional, human-readable error message.
5574 "code": "A String", # [Output Only] The error type identifier for this error.
5575 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5576 },
5577 ],
5578 },
5579 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5580 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5581 "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.
5582 }</pre>
5583</div>
5584
5585<div class="method">
5586 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005587 <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 -07005588
5589Args:
5590 project: string, Project ID for this request. (required)
5591 zone: string, The name of the zone for this request. (required)
5592 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005593 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.
5594
5595For 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.
5596
5597The 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 -07005598
5599Returns:
5600 An object of the form:
5601
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005602 { # Represents an Operation resource.
5603 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005604 # Google Compute Engine has three Operation resources:
5605 #
5606 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5607 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005608 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5609 #
5610 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005611 # - For global operations, use the `globalOperations` resource.
5612 # - For regional operations, use the `regionOperations` resource.
5613 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005614 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005615 # 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 -07005616 "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 -07005617 "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 -04005618 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005619 "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 -07005620 "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 -07005621 "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 -07005622 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5623 "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 -07005624 "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 -07005625 "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 -07005626 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005627 "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 -07005628 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5629 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5630 {
5631 "message": "A String", # [Output Only] A human-readable description of the warning code.
5632 "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.
5633 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5634 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5635 {
5636 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5637 "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).
5638 },
5639 ],
5640 },
5641 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005642 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005643 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005644 "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 -07005645 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5646 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005647 "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 -07005648 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5649 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5650 {
5651 "message": "A String", # [Output Only] An optional, human-readable error message.
5652 "code": "A String", # [Output Only] The error type identifier for this error.
5653 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5654 },
5655 ],
5656 },
5657 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5658 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005659 "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 -07005660 }</pre>
5661</div>
5662
5663<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005664 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005665 <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 -07005666
5667Args:
5668 project: string, Project ID for this request. (required)
5669 zone: string, The name of the zone for this request. (required)
5670 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005671 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005672 The object takes the form of:
5673
5674{
5675 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with an instance that is protected with a customer-supplied encryption key.
5676 #
5677 # If the instance you are starting is protected with a customer-supplied encryption key, the correct key must be provided otherwise the instance start will not succeed.
5678 "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 -07005679 "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 -07005680 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
5681 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
5682 #
5683 # The key must meet the following requirements before you can provide it to Compute Engine:
5684 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005685 # - 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 -07005686 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04005687 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005688 },
5689 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
5690 #
5691 # In order to start the instance, the disk url and its corresponding key must be provided.
5692 #
5693 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
5694 {
5695 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
5696 "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 -07005697 "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 -07005698 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
5699 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
5700 #
5701 # The key must meet the following requirements before you can provide it to Compute Engine:
5702 # - The key is wrapped using a RSA public key certificate provided by Google.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005703 # - 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 -07005704 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04005705 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005706 },
5707 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
5708 },
5709 ],
5710 }
5711
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005712 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.
5713
5714For 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.
5715
5716The 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 -07005717
5718Returns:
5719 An object of the form:
5720
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005721 { # Represents an Operation resource.
5722 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005723 # Google Compute Engine has three Operation resources:
5724 #
5725 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5726 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005727 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5728 #
5729 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005730 # - For global operations, use the `globalOperations` resource.
5731 # - For regional operations, use the `regionOperations` resource.
5732 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005733 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005734 # 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 -07005735 "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 -07005736 "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 -04005737 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005738 "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 -07005739 "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 -07005740 "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 -07005741 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5742 "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 -07005743 "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 -07005744 "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 -07005745 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005746 "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 -07005747 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5748 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5749 {
5750 "message": "A String", # [Output Only] A human-readable description of the warning code.
5751 "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.
5752 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5753 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5754 {
5755 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5756 "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).
5757 },
5758 ],
5759 },
5760 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005761 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005762 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005763 "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 -07005764 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5765 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005766 "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 -07005767 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5768 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5769 {
5770 "message": "A String", # [Output Only] An optional, human-readable error message.
5771 "code": "A String", # [Output Only] The error type identifier for this error.
5772 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5773 },
5774 ],
5775 },
5776 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5777 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005778 "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 -07005779 }</pre>
5780</div>
5781
5782<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005783 <code class="details" id="stop">stop(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005784 <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 -07005785
5786Args:
5787 project: string, Project ID for this request. (required)
5788 zone: string, The name of the zone for this request. (required)
5789 instance: string, Name of the instance resource to stop. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005790 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005791 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.
5792
5793For 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.
5794
5795The 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 -07005796
5797Returns:
5798 An object of the form:
5799
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005800 { # Represents an Operation resource.
5801 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005802 # Google Compute Engine has three Operation resources:
5803 #
5804 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5805 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005806 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5807 #
5808 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005809 # - For global operations, use the `globalOperations` resource.
5810 # - For regional operations, use the `regionOperations` resource.
5811 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005812 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005813 # 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 -07005814 "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 -07005815 "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 -04005816 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005817 "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 -07005818 "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 -07005819 "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 -07005820 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5821 "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 -07005822 "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 -07005823 "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 -07005824 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005825 "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 -07005826 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5827 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5828 {
5829 "message": "A String", # [Output Only] A human-readable description of the warning code.
5830 "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.
5831 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5832 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5833 {
5834 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5835 "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).
5836 },
5837 ],
5838 },
5839 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005840 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005841 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005842 "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 -07005843 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5844 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005845 "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 -07005846 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5847 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5848 {
5849 "message": "A String", # [Output Only] An optional, human-readable error message.
5850 "code": "A String", # [Output Only] The error type identifier for this error.
5851 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5852 },
5853 ],
5854 },
5855 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5856 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005857 "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 -07005858 }</pre>
5859</div>
5860
5861<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005862 <code class="details" id="suspend">suspend(project, zone, instance, discardLocalSsd=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005863 <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.
5864
5865Args:
5866 project: string, Project ID for this request. (required)
5867 zone: string, The name of the zone for this request. (required)
5868 instance: string, Name of the instance resource to suspend. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04005869 discardLocalSsd: boolean, If true, discard the contents of any attached localSSD partitions. Default value is false (== preserve localSSD data).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005870 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.
5871
5872For 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.
5873
5874The 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 -07005875
5876Returns:
5877 An object of the form:
5878
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005879 { # Represents an Operation resource.
5880 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005881 # Google Compute Engine has three Operation resources:
5882 #
5883 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5884 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005885 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5886 #
5887 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005888 # - For global operations, use the `globalOperations` resource.
5889 # - For regional operations, use the `regionOperations` resource.
5890 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005891 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005892 # 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 -07005893 "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 -07005894 "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 -04005895 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005896 "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 -07005897 "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 -07005898 "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 -07005899 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5900 "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 -07005901 "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 -07005902 "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 -07005903 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005904 "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 -07005905 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5906 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5907 {
5908 "message": "A String", # [Output Only] A human-readable description of the warning code.
5909 "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.
5910 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5911 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5912 {
5913 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5914 "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).
5915 },
5916 ],
5917 },
5918 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005919 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07005920 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005921 "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 -07005922 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5923 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005924 "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 -07005925 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5926 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5927 {
5928 "message": "A String", # [Output Only] An optional, human-readable error message.
5929 "code": "A String", # [Output Only] The error type identifier for this error.
5930 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5931 },
5932 ],
5933 },
5934 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5935 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005936 "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 -07005937 }</pre>
5938</div>
5939
5940<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005941 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005942 <pre>Returns permissions that a caller has on the specified resource.
5943
5944Args:
5945 project: string, Project ID for this request. (required)
5946 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005947 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005948 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07005949 The object takes the form of:
5950
5951{
5952 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
5953 "A String",
5954 ],
5955 }
5956
5957
5958Returns:
5959 An object of the form:
5960
5961 {
5962 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
5963 "A String",
5964 ],
5965 }</pre>
5966</div>
5967
5968<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005969 <code class="details" id="update">update(project, zone, instance, body=None, minimalAction=None, requestId=None, mostDisruptiveAllowedAction=None)</code>
5970 <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.
5971
5972Args:
5973 project: string, Project ID for this request. (required)
5974 zone: string, The name of the zone for this request. (required)
5975 instance: string, Name of the instance resource to update. (required)
5976 body: object, The request body.
5977 The object takes the form of:
5978
5979{ # Represents an Instance resource.
5980 #
5981 # 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 ==)
5982 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
5983 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
5984 "values": [ # Corresponds to the label values of a reservation resource.
5985 "A String",
5986 ],
5987 "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.
5988 "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.
5989 },
5990 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
5991 { # A specification of the type and number of accelerator cards attached to the instance.
5992 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
5993 "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.
5994 },
5995 ],
5996 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
5997 "a_key": "A String",
5998 },
5999 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
6000 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
6001 },
6002 "privateIpv6GoogleAccess": "A String", # The private IPv6 google access type for the VM. If not specified, use INHERIT_FROM_SUBNETWORK as default.
6003 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
6004 "longTermRelease": True or False, # Compute Engine Long Term Release. When specified, VMs that have this policy become long term release (internal: stable fleet) VMs.
6005 #
6006 # For all VM shapes, this should result in fewer disruptions due to software updates and greater predictability via 1 week extended notifications.
6007 #
6008 # For GPU VMs, this should also result in an 2 week uptime guarantee. See go/stable-fleet-gpus-design for more details.
6009 "minNodeCpus": 42, # The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
6010 "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.
6011 #
6012 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
6013 "locationHint": "A String", # An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API.
6014 "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.
6015 "nodeAffinities": [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
6016 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
6017 "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
6018 "values": [ # Corresponds to the label values of Node resource.
6019 "A String",
6020 ],
6021 "key": "A String", # Corresponds to the label key of Node resource.
6022 },
6023 ],
6024 "latencyTolerant": True or False, # Defines whether the instance is tolerant of higher cpu latency. This can only be set during instance creation, or when the instance is not currently running. It must not be set if the preemptible option is also set.
6025 "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.
6026 },
6027 "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".
6028 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
6029 #
6030 # 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.
6031 { # A service account.
6032 "scopes": [ # The list of scopes to be made available for this service account.
6033 "A String",
6034 ],
6035 "email": "A String", # Email address of the service account.
6036 },
6037 ],
6038 "preservedStateSizeGb": "A String", # Total amount of preserved state for SUSPENDED instances. Read-only in the api.
6039 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
6040 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
6041 "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.
6042 { # A network interface resource attached to an instance.
6043 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
6044 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
6045 { # An alias IP range attached to an instance's network interface.
6046 "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.
6047 "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).
6048 },
6049 ],
6050 "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.
6051 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
6052 "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.
6053 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
6054 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6055 "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.
6056 "setPublicDns": True or False, # Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
6057 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
6058 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
6059 #
6060 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6061 #
6062 # 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.
6063 "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.
6064 "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.
6065 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
6066 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
6067 },
6068 ],
6069 "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.
6070 "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.
6071 "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:
6072 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
6073 # - regions/region/subnetworks/subnetwork
6074 "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.
6075 #
6076 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
6077 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
6078 # - projects/project/global/networks/network
6079 # - global/networks/default
6080 },
6081 ],
6082 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
6083 "confidentialInstanceConfig": { # A set of Confidential Instance options.
6084 "enableConfidentialCompute": True or False, # Defines whether the instance should have confidential compute enabled.
6085 },
6086 "shieldedInstanceConfig": { # A set of Shielded Instance options.
6087 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
6088 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
6089 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
6090 },
6091 "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.
6092 "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.
6093 "sourceMachineImage": "A String", # Source machine image
6094 "postKeyRevocationActionType": "A String", # Specifies whether this instance will be shut down on key revocation.
6095 "instanceEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts data for an instance with a customer-supplied encryption key.
6096 #
6097 # If you are creating a new instance, this field encrypts the local SSD and in-memory contents of the instance using a key that you provide.
6098 #
6099 # If you are restarting an instance protected with a customer-supplied encryption key, you must provide the correct key in order to successfully restart the instance.
6100 #
6101 # If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key and you do not need to provide a key to start the instance later.
6102 #
6103 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt local SSDs and in-memory content in a managed instance group.
6104 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
6105 "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.
6106 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
6107 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
6108 #
6109 # The key must meet the following requirements before you can provide it to Compute Engine:
6110 # - The key is wrapped using a RSA public key certificate provided by Google.
6111 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6112 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6113 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
6114 },
6115 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
6116 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
6117 },
6118 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
6119 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
6120 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
6121 {
6122 "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).
6123 "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.
6124 },
6125 ],
6126 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
6127 "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.
6128 #
6129 # To see the latest fingerprint, make a get() request to retrieve the resource.
6130 },
6131 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
6132 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
6133 "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.
6134 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
6135 "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.
6136 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
6137 "A String",
6138 ],
6139 "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.
6140 #
6141 # To see the latest fingerprint, make get() request to the instance.
6142 },
6143 "sourceMachineImageEncryptionKey": { # Represents a customer-supplied encryption key # Source GMI encryption key when creating an instance from GMI.
6144 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
6145 "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.
6146 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
6147 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
6148 #
6149 # The key must meet the following requirements before you can provide it to Compute Engine:
6150 # - The key is wrapped using a RSA public key certificate provided by Google.
6151 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6152 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6153 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
6154 },
6155 "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.
6156 #
6157 # To see the latest fingerprint, make get() request to the instance.
6158 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
6159 "resourcePolicies": [ # Resource policies applied to this instance.
6160 "A String",
6161 ],
6162 "eraseWindowsVssSignature": True or False, # Specifies whether the disks restored from source snapshots or source machine image should erase Windows specific VSS signature.
6163 "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.
6164 #
6165 # To see the latest fingerprint, make get() request to the instance.
6166 "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:
6167 # zones/us-central1-f/machineTypes/n1-standard-1
6168 #
6169 #
6170 # 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):
6171 # zones/zone/machineTypes/custom-CPUS-MEMORY
6172 #
6173 #
6174 # For example: zones/us-central1-f/machineTypes/custom-4-5120
6175 #
6176 # For a full list of restrictions, read the Specifications for custom machine types.
6177 "shieldedVmConfig": { # A set of Shielded VM options.
6178 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
6179 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
6180 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
6181 },
6182 "shieldedVmIntegrityPolicy": { # The policy describes the baseline against which VM instance boot integrity is measured.
6183 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
6184 },
6185 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
6186 "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.
6187 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
6188 { # An instance-attached disk resource.
6189 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
6190 #
6191 # 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.
6192 #
6193 # 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.
6194 #
6195 # 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.
6196 #
6197 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
6198 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
6199 "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.
6200 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
6201 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
6202 #
6203 # The key must meet the following requirements before you can provide it to Compute Engine:
6204 # - The key is wrapped using a RSA public key certificate provided by Google.
6205 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6206 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6207 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
6208 },
6209 "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.
6210 #
6211 # 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.
6212 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
6213 "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.
6214 #
6215 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
6216 #
6217 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
6218 "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.
6219 #
6220 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
6221 # global/snapshots/my-backup
6222 #
6223 #
6224 # If the source snapshot is deleted later, this field will not be set.
6225 "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.
6226 "description": "A String", # An optional description. Provide this property when creating the disk.
6227 "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
6228 "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.
6229 "a_key": "A String",
6230 },
6231 "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.
6232 #
6233 # 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.
6234 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
6235 "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.
6236 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
6237 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
6238 #
6239 # The key must meet the following requirements before you can provide it to Compute Engine:
6240 # - The key is wrapped using a RSA public key certificate provided by Google.
6241 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6242 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6243 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
6244 },
6245 "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:
6246 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
6247 #
6248 #
6249 # 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:
6250 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
6251 # - projects/project/zones/zone/diskTypes/diskType
6252 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
6253 "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.
6254 #
6255 # Guest OS features are applied by merging initializeParams.guestOsFeatures and disks.guestOsFeatures
6256 { # Guest OS features.
6257 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
6258 },
6259 ],
6260 "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.
6261 "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.
6262 "A String",
6263 ],
6264 "replicaZones": [ # URLs of the zones where the disk should be replicated to. Only applicable for regional resources.
6265 "A String",
6266 ],
6267 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
6268 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
6269 "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.
6270 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
6271 "rsaEncryptedKey": "A String", # Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource.
6272 #
6273 # The key must meet the following requirements before you can provide it to Compute Engine:
6274 # - The key is wrapped using a RSA public key certificate provided by Google.
6275 # - After being wrapped, the key must be encoded in RFC 4648 base64 encoding. Gets the RSA public key certificate provided by Google at:
6276 # https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingress.pem
6277 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
6278 },
6279 "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.
6280 #
6281 # 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:
6282 # projects/debian-cloud/global/images/family/debian-9
6283 #
6284 #
6285 # Alternatively, use a specific version of a public operating system image:
6286 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
6287 #
6288 #
6289 # To create a disk with a custom image that you created, specify the image name in the following format:
6290 # global/images/my-custom-image
6291 #
6292 #
6293 # 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:
6294 # global/images/family/my-image-family
6295 #
6296 #
6297 # If the source image is deleted later, this field will not be set.
6298 },
6299 "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).
6300 "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.
6301 "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.
6302 "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
6303 "dbxs": [ # The forbidden key database (dbx).
6304 {
6305 "content": "A String", # The raw content in the secure keys file.
6306 "fileType": "A String",
6307 },
6308 ],
6309 "dbs": [ # The Key Database (db).
6310 {
6311 "content": "A String", # The raw content in the secure keys file.
6312 "fileType": "A String",
6313 },
6314 ],
6315 "keks": [ # The Key Exchange Key (KEK).
6316 {
6317 "content": "A String", # The raw content in the secure keys file.
6318 "fileType": "A String",
6319 },
6320 ],
6321 "pk": { # The Platform Key (PK).
6322 "content": "A String", # The raw content in the secure keys file.
6323 "fileType": "A String",
6324 },
6325 },
6326 "savedState": "A String", # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api.
6327 "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.
6328 { # Guest OS features.
6329 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
6330 },
6331 ],
6332 "diskSizeGb": "A String", # The size of the disk in GB.
6333 "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.
6334 "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.
6335 "licenses": [ # [Output Only] Any valid publicly visible licenses.
6336 "A String",
6337 ],
6338 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
6339 "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.
6340 #
6341 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
6342 #
6343 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
6344 },
6345 ],
6346 "upcomingMaintenance": { # Upcoming Maintenance notification information. # [Output Only] Specifies upcoming maintenance for the instance.
6347 "date": "A String", # [Output Only] The date when the maintenance will take place. This value is in RFC3339 text format.
6348 "type": "A String", # Defines the type of maintenance.
6349 "time": "A String", # [Output Only] The time when the maintenance will take place. This value is in RFC3339 text format.
6350 },
6351 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
6352}
6353
6354 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.
6355 Allowed values
6356 INVALID -
6357 NO_EFFECT -
6358 REFRESH -
6359 RESTART -
6360 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.
6361
6362For 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.
6363
6364The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6365 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.
6366 Allowed values
6367 INVALID -
6368 NO_EFFECT -
6369 REFRESH -
6370 RESTART -
6371
6372Returns:
6373 An object of the form:
6374
6375 { # Represents an Operation resource.
6376 #
6377 # Google Compute Engine has three Operation resources:
6378 #
6379 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6380 #
6381 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6382 #
6383 # Operations can be global, regional or zonal.
6384 # - For global operations, use the `globalOperations` resource.
6385 # - For regional operations, use the `regionOperations` resource.
6386 # - For zonal operations, use the `zonalOperations` resource.
6387 #
6388 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
6389 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6390 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6391 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
6392 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
6393 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
6394 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
6395 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6396 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
6397 "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.
6398 "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.
6399 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
6400 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
6401 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
6402 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6403 {
6404 "message": "A String", # [Output Only] A human-readable description of the warning code.
6405 "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.
6406 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
6407 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6408 {
6409 "value": "A String", # [Output Only] A warning data value corresponding to the key.
6410 "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).
6411 },
6412 ],
6413 },
6414 ],
6415 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
6416 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
6417 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
6418 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6419 "name": "A String", # [Output Only] Name of the operation.
6420 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6421 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6422 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
6423 {
6424 "message": "A String", # [Output Only] An optional, human-readable error message.
6425 "code": "A String", # [Output Only] The error type identifier for this error.
6426 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6427 },
6428 ],
6429 },
6430 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6431 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
6432 "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.
6433 }</pre>
6434</div>
6435
6436<div class="method">
6437 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006438 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006439
6440Args:
6441 project: string, Project ID for this request. (required)
6442 zone: string, The name of the zone for this request. (required)
6443 instance: string, The instance name for this request. (required)
6444 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006445 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006446 The object takes the form of:
6447
6448{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
6449 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006450 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07006451 "setPublicDns": True or False, # Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04006452 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006453 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
6454 #
6455 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6456 #
6457 # 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 -07006458 "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 -07006459 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006460 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006461 "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 -07006462}
6463
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006464 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.
6465
6466For 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.
6467
6468The 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 -07006469
6470Returns:
6471 An object of the form:
6472
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006473 { # Represents an Operation resource.
6474 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006475 # Google Compute Engine has three Operation resources:
6476 #
6477 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6478 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006479 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6480 #
6481 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006482 # - For global operations, use the `globalOperations` resource.
6483 # - For regional operations, use the `regionOperations` resource.
6484 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006485 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006486 # 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 -07006487 "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 -07006488 "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 -04006489 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07006490 "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 -07006491 "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 -07006492 "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 -07006493 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6494 "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 -07006495 "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 -07006496 "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 -07006497 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07006498 "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 -07006499 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
6500 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6501 {
6502 "message": "A String", # [Output Only] A human-readable description of the warning code.
6503 "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.
6504 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
6505 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6506 {
6507 "value": "A String", # [Output Only] A warning data value corresponding to the key.
6508 "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).
6509 },
6510 ],
6511 },
6512 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006513 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07006514 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006515 "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 -07006516 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6517 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006518 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6519 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6520 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
6521 {
6522 "message": "A String", # [Output Only] An optional, human-readable error message.
6523 "code": "A String", # [Output Only] The error type identifier for this error.
6524 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6525 },
6526 ],
6527 },
6528 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6529 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
6530 "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.
6531 }</pre>
6532</div>
6533
6534<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006535 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006536 <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.
6537
6538Args:
6539 project: string, Project ID for this request. (required)
6540 zone: string, The name of the zone for this request. (required)
6541 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006542 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006543 The object takes the form of:
6544
6545{ # A set of Display Device options
6546 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
6547}
6548
6549 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.
6550
6551For 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.
6552
6553The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6554
6555Returns:
6556 An object of the form:
6557
6558 { # Represents an Operation resource.
6559 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006560 # Google Compute Engine has three Operation resources:
6561 #
6562 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6563 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006564 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6565 #
6566 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006567 # - For global operations, use the `globalOperations` resource.
6568 # - For regional operations, use the `regionOperations` resource.
6569 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006570 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006571 # 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 -07006572 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6573 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6574 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07006575 "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 -07006576 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
6577 "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 -07006578 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6579 "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 -07006580 "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 -07006581 "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 -07006582 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07006583 "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 -07006584 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
6585 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6586 {
6587 "message": "A String", # [Output Only] A human-readable description of the warning code.
6588 "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.
6589 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
6590 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6591 {
6592 "value": "A String", # [Output Only] A warning data value corresponding to the key.
6593 "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).
6594 },
6595 ],
6596 },
6597 ],
6598 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07006599 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006600 "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 -07006601 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6602 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006603 "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 -07006604 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6605 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
6606 {
6607 "message": "A String", # [Output Only] An optional, human-readable error message.
6608 "code": "A String", # [Output Only] The error type identifier for this error.
6609 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6610 },
6611 ],
6612 },
6613 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6614 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08006615 "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 -07006616 }</pre>
6617</div>
6618
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006619<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006620 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006621 <pre>Updates an instance's network interface. This method follows PATCH semantics.
6622
6623Args:
6624 project: string, Project ID for this request. (required)
6625 zone: string, The name of the zone for this request. (required)
6626 instance: string, The instance name for this request. (required)
6627 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006628 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006629 The object takes the form of:
6630
6631{ # A network interface resource attached to an instance.
6632 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006633 "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 -04006634 { # An alias IP range attached to an instance's network interface.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006635 "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.
6636 "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 -04006637 },
6638 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006639 "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.
6640 "ipv6Address": "A String", # [Output Only] An IPv6 internal network address for this network interface.
6641 "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.
6642 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
6643 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
6644 "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.
Dan O'Mearadd494642020-05-01 07:42:23 -07006645 "setPublicDns": True or False, # Specifies whether a public DNS 'A' record should be created for the external IP address of this access configuration.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006646 "publicDnsName": "A String", # [Output Only] The public DNS domain name for the instance.
6647 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
6648 #
6649 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
6650 #
6651 # 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.
6652 "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.
6653 "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.
6654 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
6655 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
6656 },
6657 ],
6658 "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.
6659 "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.
6660 "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:
6661 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
6662 # - regions/region/subnetworks/subnetwork
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006663 "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.
6664 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006665 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
6666 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
6667 # - projects/project/global/networks/network
6668 # - global/networks/default
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006669}
6670
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006671 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.
6672
6673For 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.
6674
6675The 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 -04006676
6677Returns:
6678 An object of the form:
6679
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006680 { # Represents an Operation resource.
6681 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006682 # Google Compute Engine has three Operation resources:
6683 #
6684 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6685 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006686 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6687 #
6688 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006689 # - For global operations, use the `globalOperations` resource.
6690 # - For regional operations, use the `regionOperations` resource.
6691 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006692 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006693 # 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 -04006694 "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 -07006695 "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 -04006696 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07006697 "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 -07006698 "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 -04006699 "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 -07006700 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6701 "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 -04006702 "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 -07006703 "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 -04006704 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07006705 "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 -04006706 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
6707 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6708 {
6709 "message": "A String", # [Output Only] A human-readable description of the warning code.
6710 "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.
6711 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
6712 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6713 {
6714 "value": "A String", # [Output Only] A warning data value corresponding to the key.
6715 "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).
6716 },
6717 ],
6718 },
6719 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006720 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07006721 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04006722 "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 -07006723 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6724 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006725 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6726 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6727 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
6728 {
6729 "message": "A String", # [Output Only] An optional, human-readable error message.
6730 "code": "A String", # [Output Only] The error type identifier for this error.
6731 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6732 },
6733 ],
6734 },
6735 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6736 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
6737 "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.
6738 }</pre>
6739</div>
6740
6741<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006742 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006743 <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.
6744
6745Args:
6746 project: string, Project ID for this request. (required)
6747 zone: string, The name of the zone for this request. (required)
6748 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006749 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006750 The object takes the form of:
6751
6752{ # A set of Shielded Instance options.
6753 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
6754 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
6755 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
6756}
6757
6758 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.
6759
6760For 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.
6761
6762The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6763
6764Returns:
6765 An object of the form:
6766
6767 { # Represents an Operation resource.
6768 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006769 # Google Compute Engine has three Operation resources:
6770 #
6771 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6772 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006773 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6774 #
6775 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006776 # - For global operations, use the `globalOperations` resource.
6777 # - For regional operations, use the `regionOperations` resource.
6778 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006779 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006780 # 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 -07006781 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6782 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6783 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07006784 "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 -07006785 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
6786 "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 -07006787 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6788 "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 -07006789 "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 -07006790 "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 -07006791 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07006792 "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 -07006793 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
6794 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6795 {
6796 "message": "A String", # [Output Only] A human-readable description of the warning code.
6797 "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.
6798 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
6799 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6800 {
6801 "value": "A String", # [Output Only] A warning data value corresponding to the key.
6802 "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).
6803 },
6804 ],
6805 },
6806 ],
6807 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07006808 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006809 "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 -07006810 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6811 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006812 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
6813 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6814 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
6815 {
6816 "message": "A String", # [Output Only] An optional, human-readable error message.
6817 "code": "A String", # [Output Only] The error type identifier for this error.
6818 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6819 },
6820 ],
6821 },
6822 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6823 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
6824 "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.
6825 }</pre>
6826</div>
6827
6828<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07006829 <code class="details" id="updateShieldedVmConfig">updateShieldedVmConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006830 <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.
6831
6832Args:
6833 project: string, Project ID for this request. (required)
6834 zone: string, The name of the zone for this request. (required)
6835 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07006836 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006837 The object takes the form of:
6838
6839{ # A set of Shielded VM options.
6840 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
6841 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
6842 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
6843}
6844
6845 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.
6846
6847For 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.
6848
6849The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
6850
6851Returns:
6852 An object of the form:
6853
6854 { # Represents an Operation resource.
6855 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006856 # Google Compute Engine has three Operation resources:
6857 #
6858 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
6859 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006860 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
6861 #
6862 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07006863 # - For global operations, use the `globalOperations` resource.
6864 # - For regional operations, use the `regionOperations` resource.
6865 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006866 #
Dan O'Mearadd494642020-05-01 07:42:23 -07006867 # 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 -07006868 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
6869 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
6870 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07006871 "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 -07006872 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
6873 "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 -07006874 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
6875 "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 -07006876 "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 -07006877 "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 -07006878 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07006879 "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 -07006880 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
6881 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
6882 {
6883 "message": "A String", # [Output Only] A human-readable description of the warning code.
6884 "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.
6885 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
6886 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6887 {
6888 "value": "A String", # [Output Only] A warning data value corresponding to the key.
6889 "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).
6890 },
6891 ],
6892 },
6893 ],
6894 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07006895 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006896 "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 -07006897 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
6898 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07006899 "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 -04006900 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
6901 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
6902 {
6903 "message": "A String", # [Output Only] An optional, human-readable error message.
6904 "code": "A String", # [Output Only] The error type identifier for this error.
6905 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
6906 },
6907 ],
6908 },
6909 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
6910 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
6911 "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.
6912 }</pre>
6913</div>
6914
Sai Cheemalapatidf613972016-10-21 13:59:49 -07006915</body></html>