blob: 7f10900fb07d32ea6740b093c712e1c27f74bc66 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040079<p class="firstline">Adds an access config to an instance's network interface.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
82<p class="firstline">Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Retrieves aggregated list of all of the instances in your project across all regions and zones.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<p class="toc_element">
87 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040091<p class="firstline">Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093 <code><a href="#delete">delete(project, zone, instance, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<p class="firstline">Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040097<p class="firstline">Deletes an access config from an instance's network interface.</p>
98<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400100<p class="firstline">Detaches a disk from an instance.</p>
101<p class="toc_element">
102 <code><a href="#get">get(project, zone, instance)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Returns the specified Instance resource. Gets a list of available instances by making a list() request.</p>
104<p class="toc_element">
105 <code><a href="#getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</a></code></p>
106<p class="firstline">Returns the specified guest attributes entry.</p>
107<p class="toc_element">
108 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p>
109<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
John Asmuth614db982014-04-24 15:46:26 -0400110<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800111 <code><a href="#getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Returns the last 1 MB of serial port output from the specified instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400113<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <code><a href="#getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</a></code></p>
115<p class="firstline">Returns the Shielded Instance Identity of an instance</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#insert">insert(project, zone, body=None, sourceInstanceTemplate=None, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400118<p class="firstline">Creates an instance resource in the specified project using the data included in the request.</p>
119<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700120 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800121<p class="firstline">Retrieves the list of instances contained within the specified zone.</p>
John Asmuth614db982014-04-24 15:46:26 -0400122<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 <code><a href="#listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, maxResults=None, pageToken=None)</a></code></p>
124<p class="firstline">Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.</p>
125<p class="toc_element">
126 <code><a href="#listReferrers_next">listReferrers_next(previous_request, previous_response)</a></code></p>
127<p class="firstline">Retrieves the next page of results.</p>
128<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -0400129 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
130<p class="firstline">Retrieves the next page of results.</p>
131<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 <code><a href="#removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</a></code></p>
133<p class="firstline">Removes resource policies from an instance.</p>
134<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 <code><a href="#reset">reset(project, zone, instance, requestId=None)</a></code></p>
136<p class="firstline">Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400137<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 <code><a href="#setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</a></code></p>
139<p class="firstline">Sets deletion protection on the instance.</p>
140<p class="toc_element">
141 <code><a href="#setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000142<p class="firstline">Sets the auto-delete flag for a disk attached to an instance.</p>
John Asmuth614db982014-04-24 15:46:26 -0400143<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#setLabels">setLabels(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148<p class="firstline">Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.</p>
149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151<p class="firstline">Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.</p>
152<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 <code><a href="#setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800154<p class="firstline">Changes the machine type for a stopped instance to the machine type specified in the request.</p>
155<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 <code><a href="#setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400157<p class="firstline">Sets metadata for the specified instance to the data included in the request.</p>
158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160<p class="firstline">Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.</p>
161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400163<p class="firstline">Sets an instance's scheduling options.</p>
164<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700165 <code><a href="#setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400166<p class="firstline">Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.</p>
167<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 <code><a href="#setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700169<p class="firstline">Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800170<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 <code><a href="#setTags">setTags(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172<p class="firstline">Sets network tags for the specified instance to the data included in the request.</p>
Craig Citroe633be12015-03-02 13:40:36 -0800173<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 <code><a href="#simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</a></code></p>
175<p class="firstline">Simulates a maintenance event on the instance.</p>
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700176<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700177 <code><a href="#start">start(project, zone, instance, requestId=None)</a></code></p>
178<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
179<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 <code><a href="#startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700181<p class="firstline">Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.</p>
182<p class="toc_element">
183 <code><a href="#stop">stop(project, zone, instance, requestId=None)</a></code></p>
184<p class="firstline">Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.</p>
185<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700187<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
188<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 <code><a href="#update">update(project, zone, instance, body=None, minimalAction=None, requestId=None, mostDisruptiveAllowedAction=None)</a></code></p>
190<p class="firstline">Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.</p>
191<p class="toc_element">
192 <code><a href="#updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193<p class="firstline">Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
194<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 <code><a href="#updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</a></code></p>
196<p class="firstline">Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
197<p class="toc_element">
198 <code><a href="#updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199<p class="firstline">Updates an instance's network interface. This method follows PATCH semantics.</p>
200<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 <code><a href="#updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202<p class="firstline">Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
John Asmuth614db982014-04-24 15:46:26 -0400203<h3>Method Details</h3>
204<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 <code class="details" id="addAccessConfig">addAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400206 <pre>Adds an access config to an instance's network interface.
207
208Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000209 project: string, Project ID for this request. (required)
210 zone: string, The name of the zone for this request. (required)
211 instance: string, The instance name for this request. (required)
212 networkInterface: string, The name of the network interface to add to this instance. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700213 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400214 The object takes the form of:
215
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700216{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000217 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 "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.
219 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
220 #
221 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
222 #
223 # 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000224 "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 -0700225 "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.
226 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
227 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
John Asmuth614db982014-04-24 15:46:26 -0400228}
229
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700230 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
231
232For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
233
234The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400235
236Returns:
237 An object of the form:
238
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 { # Represents an Operation resource.
240 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 # Google Compute Engine has three Operation resources:
242 #
243 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
244 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
246 #
247 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700248 # - For global operations, use the `globalOperations` resource.
249 # - For regional operations, use the `regionOperations` resource.
250 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700252 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800253 "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 -0700254 "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 -0400255 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 "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 -0700257 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800258 "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 -0700259 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
260 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800261 "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 -0700262 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800263 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700264 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800265 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000266 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400267 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800268 "message": "A String", # [Output Only] A human-readable description of the warning code.
269 "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.
270 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
271 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400272 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000273 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700274 "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).
John Asmuth614db982014-04-24 15:46:26 -0400275 },
276 ],
277 },
278 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800280 "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 -0700281 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
282 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000284 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800285 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400286 {
Craig Citroe633be12015-03-02 13:40:36 -0800287 "message": "A String", # [Output Only] An optional, human-readable error message.
288 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700289 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400290 },
291 ],
292 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800293 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700294 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800295 "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.
John Asmuth614db982014-04-24 15:46:26 -0400296 }</pre>
297</div>
298
299<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 <code class="details" id="addResourcePolicies">addResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
301 <pre>Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
302
303Args:
304 project: string, Project ID for this request. (required)
305 zone: string, The name of the zone for this request. (required)
306 instance: string, The instance name for this request. (required)
307 body: object, The request body.
308 The object takes the form of:
309
310{
311 "resourcePolicies": [ # Resource policies to be added to this instance.
312 "A String",
313 ],
314 }
315
316 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
317
318For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
319
320The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
321
322Returns:
323 An object of the form:
324
325 { # Represents an Operation resource.
326 #
327 # Google Compute Engine has three Operation resources:
328 #
329 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
330 #
331 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
332 #
333 # Operations can be global, regional or zonal.
334 # - For global operations, use the `globalOperations` resource.
335 # - For regional operations, use the `regionOperations` resource.
336 # - For zonal operations, use the `zonalOperations` resource.
337 #
338 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
339 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
340 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
341 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
342 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
343 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
344 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
345 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
346 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
347 "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.
348 "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.
349 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
350 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
351 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
352 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
353 {
354 "message": "A String", # [Output Only] A human-readable description of the warning code.
355 "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.
356 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
357 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
358 {
359 "value": "A String", # [Output Only] A warning data value corresponding to the key.
360 "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).
361 },
362 ],
363 },
364 ],
365 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
366 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
367 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
368 "name": "A String", # [Output Only] Name of the operation.
369 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
370 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
371 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
372 {
373 "message": "A String", # [Output Only] An optional, human-readable error message.
374 "code": "A String", # [Output Only] The error type identifier for this error.
375 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
376 },
377 ],
378 },
379 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
380 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
381 "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.
382 }</pre>
383</div>
384
385<div class="method">
386 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700387 <pre>Retrieves aggregated list of all of the instances in your project across all regions and zones.
John Asmuth614db982014-04-24 15:46:26 -0400388
389Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000390 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700391 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
392
Dan O'Mearadd494642020-05-01 07:42:23 -0700393You 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 Cheemalapatiea3a5e12016-10-12 14:05:53 -0700394
Dan O'Mearadd494642020-05-01 07:42:23 -0700395Currently, only sorting by `name` or `creationTimestamp desc` is supported.
396 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`)
397 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.
398 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700399
Dan O'Mearadd494642020-05-01 07:42:23 -0700400For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700401
Dan O'Mearadd494642020-05-01 07:42:23 -0700402You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800403
Dan O'Mearadd494642020-05-01 07:42:23 -0700404To 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) ```
405 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.
John Asmuth614db982014-04-24 15:46:26 -0400406
407Returns:
408 An object of the form:
409
410 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800411 "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 -0700412 "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 -0700413 "items": { # An object that contains a list of instances scoped by zone.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800414 "a_key": { # [Output Only] Name of the scope containing this set of instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 "instances": [ # [Output Only] A list of instances contained in this scope.
416 { # Represents an Instance resource.
417 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700418 # 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 -0700419 "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 -0700420 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
421 "values": [ # Corresponds to the label values of a reservation resource.
422 "A String",
423 ],
424 "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.
425 "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.
426 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
428 { # A specification of the type and number of accelerator cards attached to the instance.
429 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
430 "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.
431 },
432 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400433 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
434 "a_key": "A String",
435 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
437 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
438 },
439 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700440 "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.
441 "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.
442 #
443 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -0700444 "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 -0700445 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -0700446 "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 -0700447 "values": [ # Corresponds to the label values of Node resource.
448 "A String",
449 ],
450 "key": "A String", # Corresponds to the label key of Node resource.
451 },
452 ],
453 "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.
454 },
455 "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".
456 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
457 #
458 # 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.
459 { # A service account.
460 "scopes": [ # The list of scopes to be made available for this service account.
461 "A String",
462 ],
463 "email": "A String", # Email address of the service account.
464 },
465 ],
466 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
467 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
468 "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.
469 { # A network interface resource attached to an instance.
470 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
471 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
472 { # An alias IP range attached to an instance's network interface.
473 "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.
474 "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).
475 },
476 ],
477 "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.
478 #
479 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
480 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
481 # - projects/project/global/networks/network
482 # - global/networks/default
483 "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.
484 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
485 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
486 "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.
487 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
488 #
489 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
490 #
491 # 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.
492 "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.
493 "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.
494 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
495 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
496 },
497 ],
498 "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.
499 "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.
500 "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:
501 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
502 # - regions/region/subnetworks/subnetwork
503 "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.
504 },
505 ],
506 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
507 "shieldedInstanceConfig": { # A set of Shielded Instance options.
508 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
509 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
510 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
511 },
512 "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 -0700513 "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 -0700514 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
515 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
516 },
517 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
518 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
519 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
520 {
521 "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).
522 "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.
523 },
524 ],
525 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
526 "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.
527 #
528 # To see the latest fingerprint, make a get() request to retrieve the resource.
529 },
530 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
531 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000532 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800533 "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 -0700534 "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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700535 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
536 "A String",
537 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700538 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000539 #
540 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700541 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 "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 Cheemalapati4ba8c232017-06-06 18:46:08 -0400543 #
544 # To see the latest fingerprint, make get() request to the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700545 "resourcePolicies": [ # Resource policies applied to this instance.
546 "A String",
547 ],
548 "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.
549 #
550 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 "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:
552 # zones/us-central1-f/machineTypes/n1-standard-1
553 #
554 #
555 # 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):
556 # zones/zone/machineTypes/custom-CPUS-MEMORY
557 #
558 #
559 # For example: zones/us-central1-f/machineTypes/custom-4-5120
560 #
561 # For a full list of restrictions, read the Specifications for custom machine types.
562 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
563 "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.
John Asmuth614db982014-04-24 15:46:26 -0400564 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
565 { # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700566 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
567 #
568 # 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.
569 #
570 # 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.
571 #
572 # 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.
573 #
574 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
575 "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 -0700576 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700577 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700579 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700580 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000581 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 # 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000583 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
584 "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.
585 #
586 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
587 #
588 # 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 -0700589 "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 -0700590 #
591 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
592 # global/snapshots/my-backup
593 #
594 #
595 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700596 "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 -0700597 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -0700598 "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 -0700599 "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.
600 "a_key": "A String",
601 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700602 "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.
603 #
604 # 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.
605 "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 -0700606 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700607 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700609 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000610 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000611 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
612 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700613 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000614 # 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:
615 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
616 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700617 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700618 "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 -0700619 "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.
620 "A String",
621 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700622 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700623 #
624 # 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:
625 # projects/debian-cloud/global/images/family/debian-9
626 #
627 #
628 # Alternatively, use a specific version of a public operating system image:
629 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
630 #
631 #
632 # To create a disk with a custom image that you created, specify the image name in the following format:
633 # global/images/my-custom-image
634 #
635 #
636 # 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:
637 # global/images/family/my-image-family
638 #
639 #
640 # If the source image is deleted later, this field will not be set.
641 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
642 "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 -0700643 "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 -0700644 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
645 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
646 },
John Asmuth614db982014-04-24 15:46:26 -0400647 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000648 "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 -0700649 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000650 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
Dan O'Mearadd494642020-05-01 07:42:23 -0700651 "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
652 "dbxs": [ # The forbidden key database (dbx).
653 {
654 "content": "A String", # The raw content in the secure keys file.
655 "fileType": "A String",
656 },
657 ],
658 "dbs": [ # The Key Database (db).
659 {
660 "content": "A String", # The raw content in the secure keys file.
661 "fileType": "A String",
662 },
663 ],
664 "keks": [ # The Key Exchange Key (KEK).
665 {
666 "content": "A String", # The raw content in the secure keys file.
667 "fileType": "A String",
668 },
669 ],
670 "pk": { # The Platform Key (PK).
671 "content": "A String", # The raw content in the secure keys file.
672 "fileType": "A String",
673 },
674 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700675 "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.
676 { # Guest OS features.
677 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
678 },
679 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700680 "diskSizeGb": "A String", # The size of the disk in GB.
681 "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.
682 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000683 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700684 "A String",
685 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000686 "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 -0700687 "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 -0800688 #
689 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
690 #
691 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700692 },
John Asmuth614db982014-04-24 15:46:26 -0400693 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800694 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400695 },
696 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000697 "warning": { # [Output Only] Informational warning which replaces the list of instances when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800698 "message": "A String", # [Output Only] A human-readable description of the warning code.
699 "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.
700 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
701 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400702 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000703 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700704 "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).
John Asmuth614db982014-04-24 15:46:26 -0400705 },
706 ],
707 },
708 },
709 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 "warning": { # [Output Only] Informational warning message.
711 "message": "A String", # [Output Only] A human-readable description of the warning code.
712 "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.
713 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
714 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
715 {
716 "value": "A String", # [Output Only] A warning data value corresponding to the key.
717 "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).
718 },
719 ],
720 },
721 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800722 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -0400723 }</pre>
724</div>
725
726<div class="method">
727 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
728 <pre>Retrieves the next page of results.
729
730Args:
731 previous_request: The request for the previous page. (required)
732 previous_response: The response from the request for the previous page. (required)
733
734Returns:
735 A request object that you can call 'execute()' on to request the next
736 page. Returns None if there are no more items in the collection.
737 </pre>
738</div>
739
740<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700741 <code class="details" id="attachDisk">attachDisk(project, zone, instance, body=None, forceAttach=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400742 <pre>Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
John Asmuth614db982014-04-24 15:46:26 -0400743
744Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000745 project: string, Project ID for this request. (required)
746 zone: string, The name of the zone for this request. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800747 instance: string, The instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700748 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400749 The object takes the form of:
750
751{ # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700752 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
753 #
754 # 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.
755 #
756 # 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.
757 #
758 # 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.
759 #
760 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
761 "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 -0700762 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700763 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700764 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700765 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700766 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000767 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768 # 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000769 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
770 "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.
771 #
772 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
773 #
774 # 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 -0700775 "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 -0700776 #
777 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
778 # global/snapshots/my-backup
779 #
780 #
781 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -0700782 "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 -0700783 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -0700784 "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 -0700785 "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.
786 "a_key": "A String",
787 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700788 "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.
789 #
790 # 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.
791 "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 -0700792 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700793 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700794 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700795 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000796 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000797 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
798 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700799 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000800 # 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:
801 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
802 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700803 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700804 "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 -0700805 "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.
806 "A String",
807 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700808 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700809 #
810 # 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:
811 # projects/debian-cloud/global/images/family/debian-9
812 #
813 #
814 # Alternatively, use a specific version of a public operating system image:
815 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
816 #
817 #
818 # To create a disk with a custom image that you created, specify the image name in the following format:
819 # global/images/my-custom-image
820 #
821 #
822 # 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:
823 # global/images/family/my-image-family
824 #
825 #
826 # If the source image is deleted later, this field will not be set.
827 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
828 "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 -0700829 "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 -0700830 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
831 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
832 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700833 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000834 "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 -0700835 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000836 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
Dan O'Mearadd494642020-05-01 07:42:23 -0700837 "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
838 "dbxs": [ # The forbidden key database (dbx).
839 {
840 "content": "A String", # The raw content in the secure keys file.
841 "fileType": "A String",
842 },
843 ],
844 "dbs": [ # The Key Database (db).
845 {
846 "content": "A String", # The raw content in the secure keys file.
847 "fileType": "A String",
848 },
849 ],
850 "keks": [ # The Key Exchange Key (KEK).
851 {
852 "content": "A String", # The raw content in the secure keys file.
853 "fileType": "A String",
854 },
855 ],
856 "pk": { # The Platform Key (PK).
857 "content": "A String", # The raw content in the secure keys file.
858 "fileType": "A String",
859 },
860 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 "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.
862 { # Guest OS features.
863 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
864 },
865 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700866 "diskSizeGb": "A String", # The size of the disk in GB.
867 "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.
868 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000869 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700870 "A String",
871 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000872 "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 -0700873 "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 -0800874 #
875 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
876 #
877 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700878}
John Asmuth614db982014-04-24 15:46:26 -0400879
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700880 forceAttach: boolean, Whether to force attach the disk even if it's currently attached to another instance.
881 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
882
883For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
884
885The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400886
887Returns:
888 An object of the form:
889
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700890 { # Represents an Operation resource.
891 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700892 # Google Compute Engine has three Operation resources:
893 #
894 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
895 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
897 #
898 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700899 # - For global operations, use the `globalOperations` resource.
900 # - For regional operations, use the `regionOperations` resource.
901 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800904 "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 -0700905 "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 -0400906 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700907 "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 -0700908 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800909 "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 -0700910 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
911 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800912 "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 -0700913 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800914 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700915 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800916 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000917 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400918 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800919 "message": "A String", # [Output Only] A human-readable description of the warning code.
920 "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.
921 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
922 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400923 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000924 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700925 "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).
John Asmuth614db982014-04-24 15:46:26 -0400926 },
927 ],
928 },
929 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700930 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800931 "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 -0700932 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
933 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700934 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000935 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800936 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400937 {
Craig Citroe633be12015-03-02 13:40:36 -0800938 "message": "A String", # [Output Only] An optional, human-readable error message.
939 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700940 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400941 },
942 ],
943 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800944 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700945 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800946 "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.
John Asmuth614db982014-04-24 15:46:26 -0400947 }</pre>
948</div>
949
950<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700951 <code class="details" id="delete">delete(project, zone, instance, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800952 <pre>Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
John Asmuth614db982014-04-24 15:46:26 -0400953
954Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000955 project: string, Project ID for this request. (required)
956 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400957 instance: string, Name of the instance resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
959
960For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
961
962The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400963
964Returns:
965 An object of the form:
966
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967 { # Represents an Operation resource.
968 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700969 # Google Compute Engine has three Operation resources:
970 #
971 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
972 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
974 #
975 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 # - For global operations, use the `globalOperations` resource.
977 # - For regional operations, use the `regionOperations` resource.
978 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700980 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800981 "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 -0700982 "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 -0400983 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700984 "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 -0700985 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800986 "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 -0700987 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
988 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800989 "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 -0700990 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800991 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700992 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800993 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000994 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400995 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800996 "message": "A String", # [Output Only] A human-readable description of the warning code.
997 "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.
998 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
999 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001000 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001001 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001002 "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).
John Asmuth614db982014-04-24 15:46:26 -04001003 },
1004 ],
1005 },
1006 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001007 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001008 "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 -07001009 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1010 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001011 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001012 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001013 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001014 {
Craig Citroe633be12015-03-02 13:40:36 -08001015 "message": "A String", # [Output Only] An optional, human-readable error message.
1016 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001017 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001018 },
1019 ],
1020 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001021 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001022 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001023 "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.
John Asmuth614db982014-04-24 15:46:26 -04001024 }</pre>
1025</div>
1026
1027<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001028 <code class="details" id="deleteAccessConfig">deleteAccessConfig(project, zone, instance, accessConfig, networkInterface, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001029 <pre>Deletes an access config from an instance's network interface.
1030
1031Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001032 project: string, Project ID for this request. (required)
1033 zone: string, The name of the zone for this request. (required)
1034 instance: string, The instance name for this request. (required)
1035 accessConfig: string, The name of the access config to delete. (required)
1036 networkInterface: string, The name of the network interface. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001037 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1038
1039For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1040
1041The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04001042
1043Returns:
1044 An object of the form:
1045
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 { # Represents an Operation resource.
1047 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001048 # Google Compute Engine has three Operation resources:
1049 #
1050 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1051 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1053 #
1054 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001055 # - For global operations, use the `globalOperations` resource.
1056 # - For regional operations, use the `regionOperations` resource.
1057 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001059 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001060 "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 -07001061 "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 -04001062 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001063 "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 -07001064 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001065 "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 -07001066 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1067 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001068 "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 -07001069 "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.
Craig Citroe633be12015-03-02 13:40:36 -08001070 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001071 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001072 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001073 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04001074 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001075 "message": "A String", # [Output Only] A human-readable description of the warning code.
1076 "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.
1077 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1078 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001079 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001080 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001081 "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).
John Asmuth614db982014-04-24 15:46:26 -04001082 },
1083 ],
1084 },
1085 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001086 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001087 "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 -07001088 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1089 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001090 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001091 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001092 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001093 {
Craig Citroe633be12015-03-02 13:40:36 -08001094 "message": "A String", # [Output Only] An optional, human-readable error message.
1095 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001096 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001097 },
1098 ],
1099 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001100 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001101 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001102 "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.
John Asmuth614db982014-04-24 15:46:26 -04001103 }</pre>
1104</div>
1105
1106<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107 <code class="details" id="detachDisk">detachDisk(project, zone, instance, deviceName, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001108 <pre>Detaches a disk from an instance.
1109
1110Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001111 project: string, Project ID for this request. (required)
1112 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001113 instance: string, Instance name for this request. (required)
1114 deviceName: string, The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. (required)
1115 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1116
1117For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1118
1119The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04001120
1121Returns:
1122 An object of the form:
1123
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001124 { # Represents an Operation resource.
1125 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001126 # Google Compute Engine has three Operation resources:
1127 #
1128 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1129 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001130 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1131 #
1132 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001133 # - For global operations, use the `globalOperations` resource.
1134 # - For regional operations, use the `regionOperations` resource.
1135 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001136 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001137 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001138 "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 -07001139 "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 -04001140 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001141 "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 -07001142 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001143 "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 -07001144 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1145 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001146 "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 -07001147 "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.
Craig Citroe633be12015-03-02 13:40:36 -08001148 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001149 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001150 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001151 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04001152 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001153 "message": "A String", # [Output Only] A human-readable description of the warning code.
1154 "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.
1155 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1156 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04001157 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001158 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001159 "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).
John Asmuth614db982014-04-24 15:46:26 -04001160 },
1161 ],
1162 },
1163 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001164 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001165 "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 -07001166 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1167 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001168 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001169 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001170 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04001171 {
Craig Citroe633be12015-03-02 13:40:36 -08001172 "message": "A String", # [Output Only] An optional, human-readable error message.
1173 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001174 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04001175 },
1176 ],
1177 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001178 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001179 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001180 "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.
John Asmuth614db982014-04-24 15:46:26 -04001181 }</pre>
1182</div>
1183
1184<div class="method">
1185 <code class="details" id="get">get(project, zone, instance)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001186 <pre>Returns the specified Instance resource. Gets a list of available instances by making a list() request.
John Asmuth614db982014-04-24 15:46:26 -04001187
1188Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001189 project: string, Project ID for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001190 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001191 instance: string, Name of the instance resource to return. (required)
1192
1193Returns:
1194 An object of the form:
1195
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001196 { # Represents an Instance resource.
1197 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001198 # An instance is a virtual machine that is hosted on Google Cloud Platform. For more information, read Virtual Machine Instances. (== resource_for {$api_version}.instances ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001199 "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 -07001200 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1201 "values": [ # Corresponds to the label values of a reservation resource.
1202 "A String",
1203 ],
1204 "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.
1205 "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.
1206 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
1208 { # A specification of the type and number of accelerator cards attached to the instance.
1209 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
1210 "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.
1211 },
1212 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001213 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
1214 "a_key": "A String",
1215 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001216 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
1217 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
1218 },
1219 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 "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.
1221 "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.
1222 #
1223 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -07001224 "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 -07001225 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001226 "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 -07001227 "values": [ # Corresponds to the label values of Node resource.
1228 "A String",
1229 ],
1230 "key": "A String", # Corresponds to the label key of Node resource.
1231 },
1232 ],
1233 "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.
1234 },
1235 "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".
1236 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
1237 #
1238 # 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.
1239 { # A service account.
1240 "scopes": [ # The list of scopes to be made available for this service account.
1241 "A String",
1242 ],
1243 "email": "A String", # Email address of the service account.
1244 },
1245 ],
1246 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1247 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1248 "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.
1249 { # A network interface resource attached to an instance.
1250 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1251 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
1252 { # An alias IP range attached to an instance's network interface.
1253 "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.
1254 "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).
1255 },
1256 ],
1257 "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.
1258 #
1259 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1260 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1261 # - projects/project/global/networks/network
1262 # - global/networks/default
1263 "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.
1264 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1265 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1266 "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.
1267 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1268 #
1269 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1270 #
1271 # 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.
1272 "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.
1273 "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.
1274 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1275 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1276 },
1277 ],
1278 "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.
1279 "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.
1280 "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:
1281 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1282 # - regions/region/subnetworks/subnetwork
1283 "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.
1284 },
1285 ],
1286 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
1287 "shieldedInstanceConfig": { # A set of Shielded Instance options.
1288 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1289 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1290 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1291 },
1292 "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 -07001293 "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 -07001294 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
1295 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1296 },
1297 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1298 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1299 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1300 {
1301 "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).
1302 "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.
1303 },
1304 ],
1305 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1306 "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.
1307 #
1308 # To see the latest fingerprint, make a get() request to retrieve the resource.
1309 },
1310 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
1311 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001312 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001313 "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 -07001314 "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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001315 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1316 "A String",
1317 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001318 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001319 #
1320 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001321 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001322 "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 Cheemalapati4ba8c232017-06-06 18:46:08 -04001323 #
1324 # To see the latest fingerprint, make get() request to the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07001325 "resourcePolicies": [ # Resource policies applied to this instance.
1326 "A String",
1327 ],
1328 "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.
1329 #
1330 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001331 "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:
1332 # zones/us-central1-f/machineTypes/n1-standard-1
1333 #
1334 #
1335 # 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):
1336 # zones/zone/machineTypes/custom-CPUS-MEMORY
1337 #
1338 #
1339 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1340 #
1341 # For a full list of restrictions, read the Specifications for custom machine types.
1342 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
1343 "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.
John Asmuth614db982014-04-24 15:46:26 -04001344 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1345 { # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001346 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1347 #
1348 # 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.
1349 #
1350 # 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.
1351 #
1352 # 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.
1353 #
1354 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1355 "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 -07001356 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001357 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001358 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001359 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001360 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001361 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001362 # 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001363 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1364 "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.
1365 #
1366 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1367 #
1368 # 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 -07001369 "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 -07001370 #
1371 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1372 # global/snapshots/my-backup
1373 #
1374 #
1375 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001376 "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 -07001377 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07001378 "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 -07001379 "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.
1380 "a_key": "A String",
1381 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001382 "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.
1383 #
1384 # 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.
1385 "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 -07001386 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001387 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001388 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001389 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001390 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001391 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1392 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001393 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001394 # 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:
1395 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1396 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001397 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001398 "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 -07001399 "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.
1400 "A String",
1401 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001402 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001403 #
1404 # 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:
1405 # projects/debian-cloud/global/images/family/debian-9
1406 #
1407 #
1408 # Alternatively, use a specific version of a public operating system image:
1409 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1410 #
1411 #
1412 # To create a disk with a custom image that you created, specify the image name in the following format:
1413 # global/images/my-custom-image
1414 #
1415 #
1416 # 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:
1417 # global/images/family/my-image-family
1418 #
1419 #
1420 # If the source image is deleted later, this field will not be set.
1421 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1422 "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 -07001423 "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 -07001424 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1425 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1426 },
John Asmuth614db982014-04-24 15:46:26 -04001427 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001428 "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 -07001429 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001430 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
Dan O'Mearadd494642020-05-01 07:42:23 -07001431 "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
1432 "dbxs": [ # The forbidden key database (dbx).
1433 {
1434 "content": "A String", # The raw content in the secure keys file.
1435 "fileType": "A String",
1436 },
1437 ],
1438 "dbs": [ # The Key Database (db).
1439 {
1440 "content": "A String", # The raw content in the secure keys file.
1441 "fileType": "A String",
1442 },
1443 ],
1444 "keks": [ # The Key Exchange Key (KEK).
1445 {
1446 "content": "A String", # The raw content in the secure keys file.
1447 "fileType": "A String",
1448 },
1449 ],
1450 "pk": { # The Platform Key (PK).
1451 "content": "A String", # The raw content in the secure keys file.
1452 "fileType": "A String",
1453 },
1454 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001455 "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.
1456 { # Guest OS features.
1457 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
1458 },
1459 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001460 "diskSizeGb": "A String", # The size of the disk in GB.
1461 "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.
1462 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001463 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001464 "A String",
1465 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001466 "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 -07001467 "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 -08001468 #
1469 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
1470 #
1471 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001472 },
John Asmuth614db982014-04-24 15:46:26 -04001473 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001474 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001475 }</pre>
1476</div>
1477
1478<div class="method">
1479 <code class="details" id="getGuestAttributes">getGuestAttributes(project, zone, instance, variableKey=None, queryPath=None)</code>
1480 <pre>Returns the specified guest attributes entry.
1481
1482Args:
1483 project: string, Project ID for this request. (required)
1484 zone: string, The name of the zone for this request. (required)
1485 instance: string, Name of the instance scoping this request. (required)
1486 variableKey: string, Specifies the key for the guest attributes entry.
1487 queryPath: string, Specifies the guest attributes path to be queried.
1488
1489Returns:
1490 An object of the form:
1491
1492 { # A guest attributes entry.
1493 "kind": "compute#guestAttributes", # [Output Only] Type of the resource. Always compute#guestAttributes for guest attributes entry.
1494 "variableKey": "A String", # The key to search for.
1495 "queryValue": { # Array of guest attribute namespace/key/value tuples. # [Output Only] The value of the requested queried path.
1496 "items": [
1497 { # A guest attributes namespace/key/value entry.
1498 "namespace": "A String", # Namespace for the guest attribute entry.
1499 "value": "A String", # Value for the guest attribute entry.
1500 "key": "A String", # Key for the guest attribute entry.
John Asmuth614db982014-04-24 15:46:26 -04001501 },
1502 ],
John Asmuth614db982014-04-24 15:46:26 -04001503 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001504 "variableValue": "A String", # [Output Only] The value found for the requested key.
Dan O'Mearadd494642020-05-01 07:42:23 -07001505 "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 -07001506 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
1507 }</pre>
1508</div>
1509
1510<div class="method">
1511 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
1512 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
1513
1514Args:
1515 project: string, Project ID for this request. (required)
1516 zone: string, The name of the zone for this request. (required)
1517 resource: string, Name or id of the resource for this request. (required)
1518
1519Returns:
1520 An object of the form:
1521
Dan O'Mearadd494642020-05-01 07:42:23 -07001522 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001523 #
1524 #
1525 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001526 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001527 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001528 # 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 -07001529 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001530 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001531 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001532 # { "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 -07001533 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001534 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001535 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001536 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001537 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001538 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001539 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
1540 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
1541 #
1542 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
1543 #
1544 # Example Policy with multiple AuditConfigs:
1545 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001546 # { "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 -07001547 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001548 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001549 "exemptedMembers": [
1550 "A String",
1551 ],
1552 "auditLogConfigs": [ # The configuration for logging of each type of permission.
1553 { # Provides the configuration for logging a type of permissions. Example:
1554 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001555 # { "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 -07001556 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001557 # 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 -07001558 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1559 "A String",
1560 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001561 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001562 "logType": "A String", # The log type that this config enables.
1563 },
1564 ],
1565 "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.
1566 },
1567 ],
1568 "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.
1569 { # A rule to be applied in a Policy.
1570 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1571 { # Specifies what kind of log the caller must write
1572 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
1573 #
1574 # 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.
1575 #
1576 # Field names correspond to IAM request parameters and field values are their respective values.
1577 #
1578 # 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.
1579 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001580 # 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 -07001581 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07001582 "customFields": [ # Custom fields.
1583 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1584 "name": "A String", # Name is the field name.
1585 "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.
1586 },
1587 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001588 "metric": "A String", # The metric to update.
1589 },
1590 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07001591 "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 -07001592 },
1593 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
1594 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
1595 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1596 "permissionType": "A String", # The type of the permission that was checked.
1597 },
1598 },
1599 },
1600 ],
1601 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1602 "A String",
1603 ],
1604 "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.
1605 "A String",
1606 ],
1607 "action": "A String", # Required
1608 "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.
1609 "A String",
1610 ],
1611 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1612 { # A condition to be met.
1613 "iam": "A String", # Trusted attributes supplied by the IAM system.
1614 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1615 "values": [ # The objects of the condition.
1616 "A String",
1617 ],
1618 "svc": "A String", # Trusted attributes discharged by the service.
1619 "op": "A String", # An operator to apply the subject with.
1620 },
1621 ],
1622 "description": "A String", # Human-readable description of the rule.
1623 },
1624 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001625 "version": 42, # Specifies the format of the policy.
1626 #
1627 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1628 #
1629 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1630 #
1631 # * 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
1632 #
1633 # **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.
1634 #
1635 # 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 -07001636 "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.
1637 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001638 # **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.
1639 "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 -07001640 { # Associates `members` with a `role`.
1641 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1642 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1643 #
1644 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1645 #
1646 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1647 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001648 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001649 #
1650 #
1651 #
1652 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1653 #
1654 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1655 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001656 # * `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.
1657 #
1658 # * `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.
1659 #
1660 # * `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.
1661 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001662 #
1663 #
1664 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1665 "A String",
1666 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001667 "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 -07001668 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001669 # Example (Comparison):
1670 #
1671 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
1672 #
1673 # Example (Equality):
1674 #
1675 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
1676 #
1677 # Example (Logic):
1678 #
1679 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1680 #
1681 # Example (Data Manipulation):
1682 #
1683 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
1684 #
1685 # 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.
1686 "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 -07001687 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07001688 "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.
1689 "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 -07001690 },
1691 },
1692 ],
1693 "iamOwned": True or False,
John Asmuth614db982014-04-24 15:46:26 -04001694 }</pre>
1695</div>
1696
1697<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001698 <code class="details" id="getSerialPortOutput">getSerialPortOutput(project, zone, instance, start=None, port=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001699 <pre>Returns the last 1 MB of serial port output from the specified instance.
John Asmuth614db982014-04-24 15:46:26 -04001700
1701Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001702 project: string, Project ID for this request. (required)
1703 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04001704 instance: string, Name of the instance scoping this request. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001705 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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001706 port: integer, Specifies which COM or serial port to retrieve data from.
John Asmuth614db982014-04-24 15:46:26 -04001707
1708Returns:
1709 An object of the form:
1710
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001711 { # An instance's serial console output.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001712 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001713 "kind": "compute#serialPortOutput", # [Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001714 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001715 "contents": "A String", # [Output Only] The contents of the console output.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001716 "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.
John Asmuth614db982014-04-24 15:46:26 -04001717 }</pre>
1718</div>
1719
1720<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001721 <code class="details" id="getShieldedInstanceIdentity">getShieldedInstanceIdentity(project, zone, instance)</code>
1722 <pre>Returns the Shielded Instance Identity of an instance
1723
1724Args:
1725 project: string, Project ID for this request. (required)
1726 zone: string, The name of the zone for this request. (required)
1727 instance: string, Name or id of the instance scoping this request. (required)
1728
1729Returns:
1730 An object of the form:
1731
1732 { # A shielded Instance identity entry.
Dan O'Mearadd494642020-05-01 07:42:23 -07001733 "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 -07001734 "ekPub": "A String", # A PEM-encoded public key.
1735 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
1736 },
1737 "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 -07001738 "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 -07001739 "ekPub": "A String", # A PEM-encoded public key.
1740 "ekCert": "A String", # A PEM-encoded X.509 certificate. This field can be empty.
1741 },
1742 }</pre>
1743</div>
1744
1745<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001746 <code class="details" id="insert">insert(project, zone, body=None, sourceInstanceTemplate=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04001747 <pre>Creates an instance resource in the specified project using the data included in the request.
1748
1749Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001750 project: string, Project ID for this request. (required)
1751 zone: string, The name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001752 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04001753 The object takes the form of:
1754
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001755{ # Represents an Instance resource.
1756 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001757 # 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 -07001758 "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 -07001759 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
1760 "values": [ # Corresponds to the label values of a reservation resource.
1761 "A String",
1762 ],
1763 "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.
1764 "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.
1765 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001766 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
1767 { # A specification of the type and number of accelerator cards attached to the instance.
1768 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
1769 "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.
1770 },
1771 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001772 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
1773 "a_key": "A String",
1774 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001775 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
1776 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
1777 },
1778 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001779 "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.
1780 "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.
1781 #
1782 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -07001783 "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 -07001784 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07001785 "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 -07001786 "values": [ # Corresponds to the label values of Node resource.
1787 "A String",
1788 ],
1789 "key": "A String", # Corresponds to the label key of Node resource.
1790 },
1791 ],
1792 "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.
1793 },
1794 "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".
1795 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
1796 #
1797 # 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.
1798 { # A service account.
1799 "scopes": [ # The list of scopes to be made available for this service account.
1800 "A String",
1801 ],
1802 "email": "A String", # Email address of the service account.
1803 },
1804 ],
1805 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1806 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1807 "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.
1808 { # A network interface resource attached to an instance.
1809 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
1810 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
1811 { # An alias IP range attached to an instance's network interface.
1812 "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.
1813 "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).
1814 },
1815 ],
1816 "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.
1817 #
1818 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
1819 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
1820 # - projects/project/global/networks/network
1821 # - global/networks/default
1822 "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.
1823 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
1824 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
1825 "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.
1826 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
1827 #
1828 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
1829 #
1830 # 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.
1831 "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.
1832 "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.
1833 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
1834 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
1835 },
1836 ],
1837 "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.
1838 "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.
1839 "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:
1840 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
1841 # - regions/region/subnetworks/subnetwork
1842 "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.
1843 },
1844 ],
1845 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
1846 "shieldedInstanceConfig": { # A set of Shielded Instance options.
1847 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
1848 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
1849 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
1850 },
1851 "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 -07001852 "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 -07001853 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
1854 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
1855 },
1856 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
1857 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
1858 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
1859 {
1860 "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).
1861 "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.
1862 },
1863 ],
1864 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
1865 "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.
1866 #
1867 # To see the latest fingerprint, make a get() request to retrieve the resource.
1868 },
1869 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
1870 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001871 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001872 "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 -07001873 "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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001874 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
1875 "A String",
1876 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001877 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001878 #
1879 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001880 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001881 "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 Cheemalapati4ba8c232017-06-06 18:46:08 -04001882 #
1883 # To see the latest fingerprint, make get() request to the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07001884 "resourcePolicies": [ # Resource policies applied to this instance.
1885 "A String",
1886 ],
1887 "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.
1888 #
1889 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001890 "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:
1891 # zones/us-central1-f/machineTypes/n1-standard-1
1892 #
1893 #
1894 # 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):
1895 # zones/zone/machineTypes/custom-CPUS-MEMORY
1896 #
1897 #
1898 # For example: zones/us-central1-f/machineTypes/custom-4-5120
1899 #
1900 # For a full list of restrictions, read the Specifications for custom machine types.
1901 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
1902 "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.
John Asmuth614db982014-04-24 15:46:26 -04001903 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
1904 { # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001905 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
1906 #
1907 # 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.
1908 #
1909 # 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.
1910 #
1911 # 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.
1912 #
1913 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
1914 "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 -07001915 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001916 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001917 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001918 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001919 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001920 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001921 # 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001922 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
1923 "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.
1924 #
1925 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
1926 #
1927 # 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 -07001928 "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 -07001929 #
1930 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
1931 # global/snapshots/my-backup
1932 #
1933 #
1934 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07001935 "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 -07001936 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07001937 "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 -07001938 "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.
1939 "a_key": "A String",
1940 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001941 "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.
1942 #
1943 # 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.
1944 "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 -07001945 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001946 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001947 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001948 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001949 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001950 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
1951 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001952 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001953 # 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:
1954 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1955 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001956 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001957 "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 -07001958 "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.
1959 "A String",
1960 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001961 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001962 #
1963 # 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:
1964 # projects/debian-cloud/global/images/family/debian-9
1965 #
1966 #
1967 # Alternatively, use a specific version of a public operating system image:
1968 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
1969 #
1970 #
1971 # To create a disk with a custom image that you created, specify the image name in the following format:
1972 # global/images/my-custom-image
1973 #
1974 #
1975 # 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:
1976 # global/images/family/my-image-family
1977 #
1978 #
1979 # If the source image is deleted later, this field will not be set.
1980 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
1981 "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 -07001982 "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 -07001983 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
1984 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
1985 },
John Asmuth614db982014-04-24 15:46:26 -04001986 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001987 "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 -07001988 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001989 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
Dan O'Mearadd494642020-05-01 07:42:23 -07001990 "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
1991 "dbxs": [ # The forbidden key database (dbx).
1992 {
1993 "content": "A String", # The raw content in the secure keys file.
1994 "fileType": "A String",
1995 },
1996 ],
1997 "dbs": [ # The Key Database (db).
1998 {
1999 "content": "A String", # The raw content in the secure keys file.
2000 "fileType": "A String",
2001 },
2002 ],
2003 "keks": [ # The Key Exchange Key (KEK).
2004 {
2005 "content": "A String", # The raw content in the secure keys file.
2006 "fileType": "A String",
2007 },
2008 ],
2009 "pk": { # The Platform Key (PK).
2010 "content": "A String", # The raw content in the secure keys file.
2011 "fileType": "A String",
2012 },
2013 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002014 "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.
2015 { # Guest OS features.
2016 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2017 },
2018 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002019 "diskSizeGb": "A String", # The size of the disk in GB.
2020 "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.
2021 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002022 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002023 "A String",
2024 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002025 "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 -07002026 "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 -08002027 #
2028 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2029 #
2030 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002031 },
John Asmuth614db982014-04-24 15:46:26 -04002032 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002033 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -04002034}
2035
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002036 sourceInstanceTemplate: string, Specifies instance template to create the instance.
2037
2038This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
2039- https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
2040- projects/project/global/instanceTemplates/instanceTemplate
2041- global/instanceTemplates/instanceTemplate
2042 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.
2043
2044For 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.
2045
2046The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04002047
2048Returns:
2049 An object of the form:
2050
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002051 { # Represents an Operation resource.
2052 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002053 # Google Compute Engine has three Operation resources:
2054 #
2055 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2056 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002057 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2058 #
2059 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002060 # - For global operations, use the `globalOperations` resource.
2061 # - For regional operations, use the `regionOperations` resource.
2062 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002063 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002064 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002065 "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 -07002066 "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 -04002067 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002068 "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 -07002069 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002070 "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 -07002071 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2072 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002073 "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 -07002074 "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.
Craig Citroe633be12015-03-02 13:40:36 -08002075 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002076 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002077 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002078 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04002079 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002080 "message": "A String", # [Output Only] A human-readable description of the warning code.
2081 "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.
2082 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2083 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04002084 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002085 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002086 "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).
John Asmuth614db982014-04-24 15:46:26 -04002087 },
2088 ],
2089 },
2090 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002091 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002092 "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 -07002093 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2094 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002095 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002096 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08002097 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002098 {
Craig Citroe633be12015-03-02 13:40:36 -08002099 "message": "A String", # [Output Only] An optional, human-readable error message.
2100 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002101 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04002102 },
2103 ],
2104 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002105 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07002106 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002107 "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.
John Asmuth614db982014-04-24 15:46:26 -04002108 }</pre>
2109</div>
2110
2111<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002112 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002113 <pre>Retrieves the list of instances contained within the specified zone.
John Asmuth614db982014-04-24 15:46:26 -04002114
2115Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002116 project: string, Project ID for this request. (required)
2117 zone: string, The name of the zone for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07002118 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2119
Dan O'Mearadd494642020-05-01 07:42:23 -07002120You 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 Cheemalapatiea3a5e12016-10-12 14:05:53 -07002121
Dan O'Mearadd494642020-05-01 07:42:23 -07002122Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2123 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`)
2124 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.
2125 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -07002126
Dan O'Mearadd494642020-05-01 07:42:23 -07002127For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -07002128
Dan O'Mearadd494642020-05-01 07:42:23 -07002129You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002130
Dan O'Mearadd494642020-05-01 07:42:23 -07002131To 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) ```
John Asmuth614db982014-04-24 15:46:26 -04002132
2133Returns:
2134 An object of the form:
2135
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002136 { # Contains a list of instances.
2137 "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 -07002138 "kind": "compute#instanceList", # [Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.
2139 "items": [ # A list of Instance resources.
2140 { # Represents an Instance resource.
2141 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002142 # 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 -07002143 "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 -07002144 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
2145 "values": [ # Corresponds to the label values of a reservation resource.
2146 "A String",
2147 ],
2148 "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.
2149 "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.
2150 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002151 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
2152 { # A specification of the type and number of accelerator cards attached to the instance.
2153 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
2154 "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.
2155 },
2156 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002157 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
2158 "a_key": "A String",
2159 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002160 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
2161 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
2162 },
2163 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002164 "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.
2165 "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.
2166 #
2167 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -07002168 "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 -07002169 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07002170 "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 -07002171 "values": [ # Corresponds to the label values of Node resource.
2172 "A String",
2173 ],
2174 "key": "A String", # Corresponds to the label key of Node resource.
2175 },
2176 ],
2177 "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.
2178 },
2179 "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".
2180 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
2181 #
2182 # 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.
2183 { # A service account.
2184 "scopes": [ # The list of scopes to be made available for this service account.
2185 "A String",
2186 ],
2187 "email": "A String", # Email address of the service account.
2188 },
2189 ],
2190 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
2191 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2192 "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.
2193 { # A network interface resource attached to an instance.
2194 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
2195 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
2196 { # An alias IP range attached to an instance's network interface.
2197 "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.
2198 "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).
2199 },
2200 ],
2201 "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.
2202 #
2203 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
2204 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
2205 # - projects/project/global/networks/network
2206 # - global/networks/default
2207 "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.
2208 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
2209 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
2210 "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.
2211 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
2212 #
2213 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
2214 #
2215 # 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.
2216 "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.
2217 "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.
2218 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
2219 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
2220 },
2221 ],
2222 "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.
2223 "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.
2224 "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:
2225 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
2226 # - regions/region/subnetworks/subnetwork
2227 "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.
2228 },
2229 ],
2230 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
2231 "shieldedInstanceConfig": { # A set of Shielded Instance options.
2232 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
2233 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
2234 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
2235 },
2236 "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 -07002237 "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 -07002238 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
2239 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
2240 },
2241 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
2242 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
2243 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
2244 {
2245 "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).
2246 "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.
2247 },
2248 ],
2249 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
2250 "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.
2251 #
2252 # To see the latest fingerprint, make a get() request to retrieve the resource.
2253 },
2254 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
2255 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002256 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002257 "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 -07002258 "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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002259 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
2260 "A String",
2261 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002262 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002263 #
2264 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002265 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002266 "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 Cheemalapati4ba8c232017-06-06 18:46:08 -04002267 #
2268 # To see the latest fingerprint, make get() request to the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002269 "resourcePolicies": [ # Resource policies applied to this instance.
2270 "A String",
2271 ],
2272 "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.
2273 #
2274 # To see the latest fingerprint, make get() request to the instance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002275 "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:
2276 # zones/us-central1-f/machineTypes/n1-standard-1
2277 #
2278 #
2279 # 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):
2280 # zones/zone/machineTypes/custom-CPUS-MEMORY
2281 #
2282 #
2283 # For example: zones/us-central1-f/machineTypes/custom-4-5120
2284 #
2285 # For a full list of restrictions, read the Specifications for custom machine types.
2286 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
2287 "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.
John Asmuth614db982014-04-24 15:46:26 -04002288 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
2289 { # An instance-attached disk resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002290 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
2291 #
2292 # 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.
2293 #
2294 # 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.
2295 #
2296 # 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.
2297 #
2298 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
2299 "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 -07002300 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002301 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002302 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002303 },
Takashi Matsuo06694102015-09-11 13:55:40 -07002304 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002305 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002306 # 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002307 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
2308 "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.
2309 #
2310 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
2311 #
2312 # 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 -07002313 "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 -07002314 #
2315 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
2316 # global/snapshots/my-backup
2317 #
2318 #
2319 # If the source snapshot is deleted later, this field will not be set.
Dan O'Mearadd494642020-05-01 07:42:23 -07002320 "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 -07002321 "description": "A String", # An optional description. Provide this property when creating the disk.
Dan O'Mearadd494642020-05-01 07:42:23 -07002322 "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 -07002323 "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.
2324 "a_key": "A String",
2325 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002326 "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.
2327 #
2328 # 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.
2329 "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 -07002330 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002331 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002332 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002333 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002334 "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:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002335 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
2336 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002337 #
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002338 # 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:
2339 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
2340 # - projects/project/zones/zone/diskTypes/diskType
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07002341 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
Dan O'Mearadd494642020-05-01 07:42:23 -07002342 "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 -07002343 "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.
2344 "A String",
2345 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002346 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002347 #
2348 # 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:
2349 # projects/debian-cloud/global/images/family/debian-9
2350 #
2351 #
2352 # Alternatively, use a specific version of a public operating system image:
2353 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
2354 #
2355 #
2356 # To create a disk with a custom image that you created, specify the image name in the following format:
2357 # global/images/my-custom-image
2358 #
2359 #
2360 # 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:
2361 # global/images/family/my-image-family
2362 #
2363 #
2364 # If the source image is deleted later, this field will not be set.
2365 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
2366 "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 -07002367 "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 -07002368 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
2369 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
2370 },
John Asmuth614db982014-04-24 15:46:26 -04002371 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002372 "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 -07002373 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002374 "boot": True or False, # Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
Dan O'Mearadd494642020-05-01 07:42:23 -07002375 "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
2376 "dbxs": [ # The forbidden key database (dbx).
2377 {
2378 "content": "A String", # The raw content in the secure keys file.
2379 "fileType": "A String",
2380 },
2381 ],
2382 "dbs": [ # The Key Database (db).
2383 {
2384 "content": "A String", # The raw content in the secure keys file.
2385 "fileType": "A String",
2386 },
2387 ],
2388 "keks": [ # The Key Exchange Key (KEK).
2389 {
2390 "content": "A String", # The raw content in the secure keys file.
2391 "fileType": "A String",
2392 },
2393 ],
2394 "pk": { # The Platform Key (PK).
2395 "content": "A String", # The raw content in the secure keys file.
2396 "fileType": "A String",
2397 },
2398 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002399 "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.
2400 { # Guest OS features.
2401 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
2402 },
2403 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002404 "diskSizeGb": "A String", # The size of the disk in GB.
2405 "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.
2406 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002407 "licenses": [ # [Output Only] Any valid publicly visible licenses.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002408 "A String",
2409 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002410 "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 -07002411 "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 -08002412 #
2413 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
2414 #
2415 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07002416 },
John Asmuth614db982014-04-24 15:46:26 -04002417 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002418 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -04002419 },
2420 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002421 "warning": { # [Output Only] Informational warning message.
2422 "message": "A String", # [Output Only] A human-readable description of the warning code.
2423 "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.
2424 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2425 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2426 {
2427 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2428 "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).
2429 },
2430 ],
2431 },
2432 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002433 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
John Asmuth614db982014-04-24 15:46:26 -04002434 }</pre>
2435</div>
2436
2437<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002438 <code class="details" id="listReferrers">listReferrers(project, zone, instance, orderBy=None, filter=None, maxResults=None, pageToken=None)</code>
2439 <pre>Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.
2440
2441Args:
2442 project: string, Project ID for this request. (required)
2443 zone: string, The name of the zone for this request. (required)
2444 instance: string, Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. (required)
2445 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
2446
Dan O'Mearadd494642020-05-01 07:42:23 -07002447You 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002448
Dan O'Mearadd494642020-05-01 07:42:23 -07002449Currently, only sorting by `name` or `creationTimestamp desc` is supported.
2450 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002451
Dan O'Mearadd494642020-05-01 07:42:23 -07002452For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002453
Dan O'Mearadd494642020-05-01 07:42:23 -07002454You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002455
Dan O'Mearadd494642020-05-01 07:42:23 -07002456To 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) ```
2457 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`)
2458 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002459
2460Returns:
2461 An object of the form:
2462
2463 { # Contains a list of instance referrers.
2464 "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.
2465 "kind": "compute#instanceListReferrers", # [Output Only] Type of resource. Always compute#instanceListReferrers for lists of Instance referrers.
2466 "items": [ # A list of Reference resources.
2467 { # Represents a reference to a resource.
2468 "referrer": "A String", # URL of the resource which refers to the target.
2469 "kind": "compute#reference", # [Output Only] Type of the resource. Always compute#reference for references.
2470 "referenceType": "A String", # A description of the reference type with no implied semantics. Possible values include:
2471 # - MEMBER_OF
2472 "target": "A String", # URL of the resource to which this reference points.
2473 },
2474 ],
2475 "warning": { # [Output Only] Informational warning message.
2476 "message": "A String", # [Output Only] A human-readable description of the warning code.
2477 "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.
2478 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2479 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2480 {
2481 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2482 "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).
2483 },
2484 ],
2485 },
2486 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
2487 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
2488 }</pre>
2489</div>
2490
2491<div class="method">
2492 <code class="details" id="listReferrers_next">listReferrers_next(previous_request, previous_response)</code>
2493 <pre>Retrieves the next page of results.
2494
2495Args:
2496 previous_request: The request for the previous page. (required)
2497 previous_response: The response from the request for the previous page. (required)
2498
2499Returns:
2500 A request object that you can call 'execute()' on to request the next
2501 page. Returns None if there are no more items in the collection.
2502 </pre>
2503</div>
2504
2505<div class="method">
John Asmuth614db982014-04-24 15:46:26 -04002506 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2507 <pre>Retrieves the next page of results.
2508
2509Args:
2510 previous_request: The request for the previous page. (required)
2511 previous_response: The response from the request for the previous page. (required)
2512
2513Returns:
2514 A request object that you can call 'execute()' on to request the next
2515 page. Returns None if there are no more items in the collection.
2516 </pre>
2517</div>
2518
2519<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002520 <code class="details" id="removeResourcePolicies">removeResourcePolicies(project, zone, instance, body=None, requestId=None)</code>
2521 <pre>Removes resource policies from an instance.
2522
2523Args:
2524 project: string, Project ID for this request. (required)
2525 zone: string, The name of the zone for this request. (required)
2526 instance: string, The instance name for this request. (required)
2527 body: object, The request body.
2528 The object takes the form of:
2529
2530{
2531 "resourcePolicies": [ # Resource policies to be removed from this instance.
2532 "A String",
2533 ],
2534 }
2535
2536 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.
2537
2538For 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.
2539
2540The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2541
2542Returns:
2543 An object of the form:
2544
2545 { # Represents an Operation resource.
2546 #
2547 # Google Compute Engine has three Operation resources:
2548 #
2549 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2550 #
2551 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2552 #
2553 # Operations can be global, regional or zonal.
2554 # - For global operations, use the `globalOperations` resource.
2555 # - For regional operations, use the `regionOperations` resource.
2556 # - For zonal operations, use the `zonalOperations` resource.
2557 #
2558 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2559 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2560 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2561 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
2562 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2563 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2564 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2565 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2566 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2567 "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.
2568 "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.
2569 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
2570 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2571 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2572 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2573 {
2574 "message": "A String", # [Output Only] A human-readable description of the warning code.
2575 "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.
2576 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2577 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2578 {
2579 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2580 "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).
2581 },
2582 ],
2583 },
2584 ],
2585 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
2586 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2587 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2588 "name": "A String", # [Output Only] Name of the operation.
2589 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2590 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2591 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2592 {
2593 "message": "A String", # [Output Only] An optional, human-readable error message.
2594 "code": "A String", # [Output Only] The error type identifier for this error.
2595 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2596 },
2597 ],
2598 },
2599 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2600 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2601 "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.
2602 }</pre>
2603</div>
2604
2605<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002606 <code class="details" id="reset">reset(project, zone, instance, requestId=None)</code>
2607 <pre>Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.
John Asmuth614db982014-04-24 15:46:26 -04002608
2609Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002610 project: string, Project ID for this request. (required)
2611 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04002612 instance: string, Name of the instance scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002613 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.
2614
2615For 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.
2616
2617The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04002618
2619Returns:
2620 An object of the form:
2621
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002622 { # Represents an Operation resource.
2623 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002624 # Google Compute Engine has three Operation resources:
2625 #
2626 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2627 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002628 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2629 #
2630 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002631 # - For global operations, use the `globalOperations` resource.
2632 # - For regional operations, use the `regionOperations` resource.
2633 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002634 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002635 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002636 "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 -07002637 "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 -04002638 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002639 "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 -07002640 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002641 "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 -07002642 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2643 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002644 "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 -07002645 "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.
Craig Citroe633be12015-03-02 13:40:36 -08002646 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002647 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002648 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002649 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04002650 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002651 "message": "A String", # [Output Only] A human-readable description of the warning code.
2652 "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.
2653 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2654 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04002655 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002656 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002657 "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).
John Asmuth614db982014-04-24 15:46:26 -04002658 },
2659 ],
2660 },
2661 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002662 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002663 "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 -07002664 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2665 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002666 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002667 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08002668 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002669 {
Craig Citroe633be12015-03-02 13:40:36 -08002670 "message": "A String", # [Output Only] An optional, human-readable error message.
2671 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002672 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04002673 },
2674 ],
2675 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002676 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07002677 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002678 "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.
John Asmuth614db982014-04-24 15:46:26 -04002679 }</pre>
2680</div>
2681
2682<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002683 <code class="details" id="setDeletionProtection">setDeletionProtection(project, zone, resource, deletionProtection=None, requestId=None)</code>
2684 <pre>Sets deletion protection on the instance.
2685
2686Args:
2687 project: string, Project ID for this request. (required)
2688 zone: string, The name of the zone for this request. (required)
2689 resource: string, Name or id of the resource for this request. (required)
2690 deletionProtection: boolean, Whether the resource should be protected against deletion.
2691 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.
2692
2693For 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.
2694
2695The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2696
2697Returns:
2698 An object of the form:
2699
2700 { # Represents an Operation resource.
2701 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002702 # Google Compute Engine has three Operation resources:
2703 #
2704 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2705 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002706 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2707 #
2708 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002709 # - For global operations, use the `globalOperations` resource.
2710 # - For regional operations, use the `regionOperations` resource.
2711 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002712 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002713 # 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 -07002714 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2715 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2716 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002717 "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 -07002718 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2719 "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 -07002720 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2721 "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 -07002722 "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 -07002723 "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 -07002724 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002725 "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 -07002726 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2727 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2728 {
2729 "message": "A String", # [Output Only] A human-readable description of the warning code.
2730 "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.
2731 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2732 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2733 {
2734 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2735 "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).
2736 },
2737 ],
2738 },
2739 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002740 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002741 "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 -07002742 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2743 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002744 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2745 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2746 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
2747 {
2748 "message": "A String", # [Output Only] An optional, human-readable error message.
2749 "code": "A String", # [Output Only] The error type identifier for this error.
2750 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2751 },
2752 ],
2753 },
2754 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2755 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2756 "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.
2757 }</pre>
2758</div>
2759
2760<div class="method">
2761 <code class="details" id="setDiskAutoDelete">setDiskAutoDelete(project, zone, instance, autoDelete, deviceName, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002762 <pre>Sets the auto-delete flag for a disk attached to an instance.
John Asmuth614db982014-04-24 15:46:26 -04002763
2764Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002765 project: string, Project ID for this request. (required)
2766 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002767 instance: string, The instance name for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04002768 autoDelete: boolean, Whether to auto-delete the disk when the instance is deleted. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002769 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)
2770 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.
2771
2772For 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.
2773
2774The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04002775
2776Returns:
2777 An object of the form:
2778
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002779 { # Represents an Operation resource.
2780 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002781 # Google Compute Engine has three Operation resources:
2782 #
2783 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2784 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002785 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2786 #
2787 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002788 # - For global operations, use the `globalOperations` resource.
2789 # - For regional operations, use the `regionOperations` resource.
2790 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002791 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002792 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002793 "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 -07002794 "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 -04002795 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002796 "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 -07002797 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002798 "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 -07002799 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2800 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002801 "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 -07002802 "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.
Craig Citroe633be12015-03-02 13:40:36 -08002803 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002804 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002805 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002806 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04002807 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002808 "message": "A String", # [Output Only] A human-readable description of the warning code.
2809 "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.
2810 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2811 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04002812 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002813 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002814 "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).
John Asmuth614db982014-04-24 15:46:26 -04002815 },
2816 ],
2817 },
2818 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002819 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002820 "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 -07002821 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2822 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002823 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002824 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08002825 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04002826 {
Craig Citroe633be12015-03-02 13:40:36 -08002827 "message": "A String", # [Output Only] An optional, human-readable error message.
2828 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002829 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04002830 },
2831 ],
2832 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002833 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07002834 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002835 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002836 }</pre>
2837</div>
2838
2839<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002840 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002841 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
2842
2843Args:
2844 project: string, Project ID for this request. (required)
2845 zone: string, The name of the zone for this request. (required)
2846 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002847 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002848 The object takes the form of:
2849
2850{
Dan O'Mearadd494642020-05-01 07:42:23 -07002851 "policy": { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the 'resource'. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002852 #
2853 #
2854 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002855 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002856 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002857 # 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 -07002858 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002859 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002860 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002861 # { "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 -07002862 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002863 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002864 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002865 # 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 -07002866 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002867 # 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 -07002868 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
2869 { # 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.
2870 #
2871 # 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.
2872 #
2873 # Example Policy with multiple AuditConfigs:
2874 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002875 # { "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 -07002876 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002877 # 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 -07002878 "exemptedMembers": [
2879 "A String",
2880 ],
2881 "auditLogConfigs": [ # The configuration for logging of each type of permission.
2882 { # Provides the configuration for logging a type of permissions. Example:
2883 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002884 # { "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 -07002885 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002886 # 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 -07002887 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
2888 "A String",
2889 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002890 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002891 "logType": "A String", # The log type that this config enables.
2892 },
2893 ],
2894 "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.
2895 },
2896 ],
2897 "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.
2898 { # A rule to be applied in a Policy.
2899 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
2900 { # Specifies what kind of log the caller must write
2901 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
2902 #
2903 # 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.
2904 #
2905 # Field names correspond to IAM request parameters and field values are their respective values.
2906 #
2907 # 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.
2908 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002909 # 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 -07002910 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07002911 "customFields": [ # Custom fields.
2912 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
2913 "name": "A String", # Name is the field name.
2914 "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.
2915 },
2916 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002917 "metric": "A String", # The metric to update.
2918 },
2919 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07002920 "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 -07002921 },
2922 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
2923 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
2924 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
2925 "permissionType": "A String", # The type of the permission that was checked.
2926 },
2927 },
2928 },
2929 ],
2930 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
2931 "A String",
2932 ],
2933 "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.
2934 "A String",
2935 ],
2936 "action": "A String", # Required
2937 "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.
2938 "A String",
2939 ],
2940 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
2941 { # A condition to be met.
2942 "iam": "A String", # Trusted attributes supplied by the IAM system.
2943 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
2944 "values": [ # The objects of the condition.
2945 "A String",
2946 ],
2947 "svc": "A String", # Trusted attributes discharged by the service.
2948 "op": "A String", # An operator to apply the subject with.
2949 },
2950 ],
2951 "description": "A String", # Human-readable description of the rule.
2952 },
2953 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002954 "version": 42, # Specifies the format of the policy.
2955 #
2956 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
2957 #
2958 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
2959 #
2960 # * 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
2961 #
2962 # **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.
2963 #
2964 # 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 -07002965 "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.
2966 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002967 # **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.
2968 "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 -07002969 { # Associates `members` with a `role`.
2970 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2971 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
2972 #
2973 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
2974 #
2975 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
2976 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002977 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002978 #
2979 #
2980 #
2981 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
2982 #
2983 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
2984 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002985 # * `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.
2986 #
2987 # * `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.
2988 #
2989 # * `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.
2990 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002991 #
2992 #
2993 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
2994 "A String",
2995 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002996 "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 -07002997 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002998 # Example (Comparison):
2999 #
3000 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
3001 #
3002 # Example (Equality):
3003 #
3004 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
3005 #
3006 # Example (Logic):
3007 #
3008 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
3009 #
3010 # Example (Data Manipulation):
3011 #
3012 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
3013 #
3014 # 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.
3015 "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 -07003016 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07003017 "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.
3018 "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 -07003019 },
3020 },
3021 ],
3022 "iamOwned": True or False,
3023 },
3024 "bindings": [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings.
3025 { # Associates `members` with a `role`.
3026 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3027 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3028 #
3029 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3030 #
3031 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3032 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003033 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003034 #
3035 #
3036 #
3037 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3038 #
3039 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3040 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003041 # * `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.
3042 #
3043 # * `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.
3044 #
3045 # * `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.
3046 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003047 #
3048 #
3049 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
3050 "A String",
3051 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003052 "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 -07003053 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003054 # Example (Comparison):
3055 #
3056 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
3057 #
3058 # Example (Equality):
3059 #
3060 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
3061 #
3062 # Example (Logic):
3063 #
3064 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
3065 #
3066 # Example (Data Manipulation):
3067 #
3068 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
3069 #
3070 # 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.
3071 "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 -07003072 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07003073 "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.
3074 "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 -07003075 },
3076 },
3077 ],
3078 "etag": "A String", # Flatten Policy to create a backward compatible wire-format. Deprecated. Use 'policy' to specify the etag.
3079 }
3080
3081
3082Returns:
3083 An object of the form:
3084
Dan O'Mearadd494642020-05-01 07:42:23 -07003085 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003086 #
3087 #
3088 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003089 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003090 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003091 # 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 -07003092 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003093 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003094 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003095 # { "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 -07003096 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003097 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003098 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003099 # 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 -07003100 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003101 # 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 -07003102 "auditConfigs": [ # Specifies cloud audit logging configuration for this policy.
3103 { # 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.
3104 #
3105 # 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.
3106 #
3107 # Example Policy with multiple AuditConfigs:
3108 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003109 # { "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 -07003110 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003111 # 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 -07003112 "exemptedMembers": [
3113 "A String",
3114 ],
3115 "auditLogConfigs": [ # The configuration for logging of each type of permission.
3116 { # Provides the configuration for logging a type of permissions. Example:
3117 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003118 # { "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 -07003119 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003120 # 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 -07003121 "exemptedMembers": [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
3122 "A String",
3123 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003124 "ignoreChildExemptions": True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003125 "logType": "A String", # The log type that this config enables.
3126 },
3127 ],
3128 "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.
3129 },
3130 ],
3131 "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.
3132 { # A rule to be applied in a Policy.
3133 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
3134 { # Specifies what kind of log the caller must write
3135 "counter": { # Increment a streamz counter with the specified metric and field names. # Counter options.
3136 #
3137 # 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.
3138 #
3139 # Field names correspond to IAM request parameters and field values are their respective values.
3140 #
3141 # 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.
3142 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003143 # 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 -07003144 "field": "A String", # The field value to attribute.
Dan O'Mearadd494642020-05-01 07:42:23 -07003145 "customFields": [ # Custom fields.
3146 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
3147 "name": "A String", # Name is the field name.
3148 "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.
3149 },
3150 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003151 "metric": "A String", # The metric to update.
3152 },
3153 "dataAccess": { # Write a Data Access (Gin) log # Data access options.
Dan O'Mearadd494642020-05-01 07:42:23 -07003154 "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 -07003155 },
3156 "cloudAudit": { # Write a Cloud Audit log # Cloud audit options.
3157 "logName": "A String", # The log_name to populate in the Cloud Audit Record.
3158 "authorizationLoggingOptions": { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
3159 "permissionType": "A String", # The type of the permission that was checked.
3160 },
3161 },
3162 },
3163 ],
3164 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
3165 "A String",
3166 ],
3167 "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.
3168 "A String",
3169 ],
3170 "action": "A String", # Required
3171 "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.
3172 "A String",
3173 ],
3174 "conditions": [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
3175 { # A condition to be met.
3176 "iam": "A String", # Trusted attributes supplied by the IAM system.
3177 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
3178 "values": [ # The objects of the condition.
3179 "A String",
3180 ],
3181 "svc": "A String", # Trusted attributes discharged by the service.
3182 "op": "A String", # An operator to apply the subject with.
3183 },
3184 ],
3185 "description": "A String", # Human-readable description of the rule.
3186 },
3187 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003188 "version": 42, # Specifies the format of the policy.
3189 #
3190 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
3191 #
3192 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
3193 #
3194 # * 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
3195 #
3196 # **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.
3197 #
3198 # 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 -07003199 "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.
3200 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003201 # **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.
3202 "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 -07003203 { # Associates `members` with a `role`.
3204 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3205 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
3206 #
3207 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
3208 #
3209 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
3210 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003211 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003212 #
3213 #
3214 #
3215 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
3216 #
3217 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
3218 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003219 # * `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.
3220 #
3221 # * `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.
3222 #
3223 # * `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.
3224 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003225 #
3226 #
3227 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
3228 "A String",
3229 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003230 "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 -07003231 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003232 # Example (Comparison):
3233 #
3234 # title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() &lt; 100"
3235 #
3236 # Example (Equality):
3237 #
3238 # title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email"
3239 #
3240 # Example (Logic):
3241 #
3242 # title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
3243 #
3244 # Example (Data Manipulation):
3245 #
3246 # title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)"
3247 #
3248 # 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.
3249 "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 -07003250 "expression": "A String", # Textual representation of an expression in Common Expression Language syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -07003251 "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.
3252 "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 -07003253 },
3254 },
3255 ],
3256 "iamOwned": True or False,
3257 }</pre>
3258</div>
3259
3260<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003261 <code class="details" id="setLabels">setLabels(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003262 <pre>Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003263
3264Args:
3265 project: string, Project ID for this request. (required)
3266 zone: string, The name of the zone for this request. (required)
3267 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003268 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003269 The object takes the form of:
3270
3271{
3272 "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.
3273 "labels": {
3274 "a_key": "A String",
3275 },
3276 }
3277
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003278 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.
3279
3280For 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.
3281
3282The 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 -04003283
3284Returns:
3285 An object of the form:
3286
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003287 { # Represents an Operation resource.
3288 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003289 # Google Compute Engine has three Operation resources:
3290 #
3291 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3292 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003293 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3294 #
3295 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003296 # - For global operations, use the `globalOperations` resource.
3297 # - For regional operations, use the `regionOperations` resource.
3298 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003299 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003300 # 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 -04003301 "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 -07003302 "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 -04003303 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003304 "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 -07003305 "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 -04003306 "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 -07003307 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3308 "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 -04003309 "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 -07003310 "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 -04003311 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003312 "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 -04003313 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3314 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3315 {
3316 "message": "A String", # [Output Only] A human-readable description of the warning code.
3317 "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.
3318 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3319 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3320 {
3321 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3322 "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).
3323 },
3324 ],
3325 },
3326 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003327 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003328 "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 -07003329 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3330 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003331 "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 -04003332 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3333 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3334 {
3335 "message": "A String", # [Output Only] An optional, human-readable error message.
3336 "code": "A String", # [Output Only] The error type identifier for this error.
3337 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3338 },
3339 ],
3340 },
3341 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3342 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3343 "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.
3344 }</pre>
3345</div>
3346
3347<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003348 <code class="details" id="setMachineResources">setMachineResources(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003349 <pre>Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
3350
3351Args:
3352 project: string, Project ID for this request. (required)
3353 zone: string, The name of the zone for this request. (required)
3354 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003355 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003356 The object takes the form of:
3357
3358{
3359 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
3360 { # A specification of the type and number of accelerator cards attached to the instance.
3361 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
3362 "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.
3363 },
3364 ],
3365 }
3366
3367 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.
3368
3369For 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.
3370
3371The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3372
3373Returns:
3374 An object of the form:
3375
3376 { # Represents an Operation resource.
3377 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003378 # Google Compute Engine has three Operation resources:
3379 #
3380 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3381 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003382 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3383 #
3384 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003385 # - For global operations, use the `globalOperations` resource.
3386 # - For regional operations, use the `regionOperations` resource.
3387 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003388 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003389 # 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 -07003390 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3391 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3392 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003393 "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 -07003394 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3395 "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 -07003396 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3397 "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 -07003398 "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 -07003399 "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 -07003400 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003401 "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 -07003402 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3403 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3404 {
3405 "message": "A String", # [Output Only] A human-readable description of the warning code.
3406 "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.
3407 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3408 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3409 {
3410 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3411 "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).
3412 },
3413 ],
3414 },
3415 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003416 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003417 "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 -07003418 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3419 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003420 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3421 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3422 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3423 {
3424 "message": "A String", # [Output Only] An optional, human-readable error message.
3425 "code": "A String", # [Output Only] The error type identifier for this error.
3426 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3427 },
3428 ],
3429 },
3430 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3431 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3432 "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.
3433 }</pre>
3434</div>
3435
3436<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003437 <code class="details" id="setMachineType">setMachineType(project, zone, instance, body=None, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003438 <pre>Changes the machine type for a stopped instance to the machine type specified in the request.
3439
3440Args:
3441 project: string, Project ID for this request. (required)
3442 zone: string, The name of the zone for this request. (required)
3443 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003444 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003445 The object takes the form of:
3446
3447{
3448 "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
3449 }
3450
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003451 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.
3452
3453For 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.
3454
3455The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003456
3457Returns:
3458 An object of the form:
3459
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003460 { # Represents an Operation resource.
3461 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003462 # Google Compute Engine has three Operation resources:
3463 #
3464 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3465 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003466 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3467 #
3468 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003469 # - For global operations, use the `globalOperations` resource.
3470 # - For regional operations, use the `regionOperations` resource.
3471 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003472 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003473 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003474 "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 -07003475 "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 -04003476 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003477 "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 -07003478 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003479 "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 -07003480 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3481 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003482 "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 -07003483 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003484 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003485 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003486 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3487 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3488 {
3489 "message": "A String", # [Output Only] A human-readable description of the warning code.
3490 "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.
3491 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3492 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3493 {
3494 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003495 "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).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003496 },
3497 ],
3498 },
3499 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003500 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003501 "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 -07003502 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3503 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003504 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003505 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3506 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3507 {
3508 "message": "A String", # [Output Only] An optional, human-readable error message.
3509 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003510 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003511 },
3512 ],
3513 },
3514 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3515 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003516 "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.
John Asmuth614db982014-04-24 15:46:26 -04003517 }</pre>
3518</div>
3519
3520<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003521 <code class="details" id="setMetadata">setMetadata(project, zone, instance, body=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003522 <pre>Sets metadata for the specified instance to the data included in the request.
3523
3524Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003525 project: string, Project ID for this request. (required)
3526 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04003527 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003528 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04003529 The object takes the form of:
3530
3531{ # A metadata key/value entry.
3532 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
3533 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003534 "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).
John Asmuth614db982014-04-24 15:46:26 -04003535 "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.
3536 },
3537 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003538 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003539 "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.
3540 #
3541 # To see the latest fingerprint, make a get() request to retrieve the resource.
John Asmuth614db982014-04-24 15:46:26 -04003542}
3543
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003544 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.
3545
3546For 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.
3547
3548The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04003549
3550Returns:
3551 An object of the form:
3552
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003553 { # Represents an Operation resource.
3554 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003555 # Google Compute Engine has three Operation resources:
3556 #
3557 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3558 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003559 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3560 #
3561 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003562 # - For global operations, use the `globalOperations` resource.
3563 # - For regional operations, use the `regionOperations` resource.
3564 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003565 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003566 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003567 "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 -07003568 "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 -04003569 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003570 "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 -07003571 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003572 "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 -07003573 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3574 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003575 "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 -07003576 "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.
Craig Citroe633be12015-03-02 13:40:36 -08003577 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003578 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003579 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003580 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04003581 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003582 "message": "A String", # [Output Only] A human-readable description of the warning code.
3583 "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.
3584 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3585 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04003586 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003587 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003588 "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).
John Asmuth614db982014-04-24 15:46:26 -04003589 },
3590 ],
3591 },
3592 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003593 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003594 "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 -07003595 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3596 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003597 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003598 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08003599 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003600 {
Craig Citroe633be12015-03-02 13:40:36 -08003601 "message": "A String", # [Output Only] An optional, human-readable error message.
3602 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003603 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04003604 },
3605 ],
3606 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003607 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07003608 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003609 "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.
John Asmuth614db982014-04-24 15:46:26 -04003610 }</pre>
3611</div>
3612
3613<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003614 <code class="details" id="setMinCpuPlatform">setMinCpuPlatform(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003615 <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.
3616
3617Args:
3618 project: string, Project ID for this request. (required)
3619 zone: string, The name of the zone for this request. (required)
3620 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003621 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003622 The object takes the form of:
3623
3624{
3625 "minCpuPlatform": "A String", # Minimum cpu/platform this instance should be started at.
3626 }
3627
3628 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.
3629
3630For 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.
3631
3632The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3633
3634Returns:
3635 An object of the form:
3636
3637 { # Represents an Operation resource.
3638 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003639 # Google Compute Engine has three Operation resources:
3640 #
3641 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3642 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003643 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3644 #
3645 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003646 # - For global operations, use the `globalOperations` resource.
3647 # - For regional operations, use the `regionOperations` resource.
3648 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003649 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003650 # 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 -07003651 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3652 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3653 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003654 "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 -07003655 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3656 "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 -07003657 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3658 "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 -07003659 "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 -07003660 "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 -07003661 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003662 "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 -07003663 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3664 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3665 {
3666 "message": "A String", # [Output Only] A human-readable description of the warning code.
3667 "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.
3668 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3669 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3670 {
3671 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3672 "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).
3673 },
3674 ],
3675 },
3676 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003677 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003678 "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 -07003679 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3680 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003681 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3682 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3683 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3684 {
3685 "message": "A String", # [Output Only] An optional, human-readable error message.
3686 "code": "A String", # [Output Only] The error type identifier for this error.
3687 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3688 },
3689 ],
3690 },
3691 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3692 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3693 "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.
3694 }</pre>
3695</div>
3696
3697<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003698 <code class="details" id="setScheduling">setScheduling(project, zone, instance, body=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -04003699 <pre>Sets an instance's scheduling options.
3700
3701Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003702 project: string, Project ID for this request. (required)
3703 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003704 instance: string, Instance name for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003705 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04003706 The object takes the form of:
3707
Dan O'Mearadd494642020-05-01 07:42:23 -07003708{ # Sets the scheduling options for an Instance. NextID: 10
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003709 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07003710 "automaticRestart": True or False, # Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04003711 #
3712 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
Dan O'Mearadd494642020-05-01 07:42:23 -07003713 "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 -07003714 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
Dan O'Mearadd494642020-05-01 07:42:23 -07003715 "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 -07003716 "values": [ # Corresponds to the label values of Node resource.
3717 "A String",
3718 ],
3719 "key": "A String", # Corresponds to the label key of Node resource.
3720 },
3721 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003722 "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.
John Asmuth614db982014-04-24 15:46:26 -04003723}
3724
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003725 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.
3726
3727For 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.
3728
3729The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04003730
3731Returns:
3732 An object of the form:
3733
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003734 { # Represents an Operation resource.
3735 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003736 # Google Compute Engine has three Operation resources:
3737 #
3738 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3739 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003740 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3741 #
3742 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003743 # - For global operations, use the `globalOperations` resource.
3744 # - For regional operations, use the `regionOperations` resource.
3745 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003746 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003747 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003748 "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 -07003749 "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 -04003750 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003751 "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 -07003752 "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 -04003753 "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 -07003754 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3755 "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 -04003756 "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 -07003757 "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 -04003758 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003759 "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 -04003760 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3761 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3762 {
3763 "message": "A String", # [Output Only] A human-readable description of the warning code.
3764 "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.
3765 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3766 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3767 {
3768 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3769 "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).
3770 },
3771 ],
3772 },
3773 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003774 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003775 "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 -07003776 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3777 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003778 "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 -04003779 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3780 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3781 {
3782 "message": "A String", # [Output Only] An optional, human-readable error message.
3783 "code": "A String", # [Output Only] The error type identifier for this error.
3784 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3785 },
3786 ],
3787 },
3788 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3789 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3790 "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.
3791 }</pre>
3792</div>
3793
3794<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003795 <code class="details" id="setServiceAccount">setServiceAccount(project, zone, instance, body=None, requestId=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003796 <pre>Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
3797
3798Args:
3799 project: string, Project ID for this request. (required)
3800 zone: string, The name of the zone for this request. (required)
3801 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003802 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04003803 The object takes the form of:
3804
3805{
3806 "scopes": [ # The list of scopes to be made available for this service account.
3807 "A String",
3808 ],
3809 "email": "A String", # Email address of the service account.
3810 }
3811
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003812 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.
3813
3814For 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.
3815
3816The 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 -04003817
3818Returns:
3819 An object of the form:
3820
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003821 { # Represents an Operation resource.
3822 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003823 # Google Compute Engine has three Operation resources:
3824 #
3825 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3826 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003827 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3828 #
3829 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003830 # - For global operations, use the `globalOperations` resource.
3831 # - For regional operations, use the `regionOperations` resource.
3832 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003833 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003834 # 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 -04003835 "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 -07003836 "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 -04003837 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003838 "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 -07003839 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003840 "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 -07003841 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3842 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003843 "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 -07003844 "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.
Craig Citroe633be12015-03-02 13:40:36 -08003845 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003846 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003847 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003848 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04003849 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003850 "message": "A String", # [Output Only] A human-readable description of the warning code.
3851 "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.
3852 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3853 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04003854 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003855 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003856 "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).
John Asmuth614db982014-04-24 15:46:26 -04003857 },
3858 ],
3859 },
3860 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003861 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003862 "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 -07003863 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3864 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003865 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003866 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08003867 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04003868 {
Craig Citroe633be12015-03-02 13:40:36 -08003869 "message": "A String", # [Output Only] An optional, human-readable error message.
3870 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07003871 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04003872 },
3873 ],
3874 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08003875 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07003876 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08003877 "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.
John Asmuth614db982014-04-24 15:46:26 -04003878 }</pre>
3879</div>
3880
3881<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003882 <code class="details" id="setShieldedInstanceIntegrityPolicy">setShieldedInstanceIntegrityPolicy(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003883 <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.
3884
3885Args:
3886 project: string, Project ID for this request. (required)
3887 zone: string, The name of the zone for this request. (required)
3888 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003889 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003890 The object takes the form of:
3891
3892{ # The policy describes the baseline against which Instance boot integrity is measured.
3893 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
3894 }
3895
3896 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.
3897
3898For 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.
3899
3900The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3901
3902Returns:
3903 An object of the form:
3904
3905 { # Represents an Operation resource.
3906 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003907 # Google Compute Engine has three Operation resources:
3908 #
3909 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3910 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003911 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
3912 #
3913 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07003914 # - For global operations, use the `globalOperations` resource.
3915 # - For regional operations, use the `regionOperations` resource.
3916 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003917 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003918 # 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 -07003919 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
3920 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
3921 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07003922 "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 -07003923 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
3924 "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 -07003925 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
3926 "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 -07003927 "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 -07003928 "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 -07003929 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07003930 "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 -07003931 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
3932 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
3933 {
3934 "message": "A String", # [Output Only] A human-readable description of the warning code.
3935 "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.
3936 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
3937 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3938 {
3939 "value": "A String", # [Output Only] A warning data value corresponding to the key.
3940 "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).
3941 },
3942 ],
3943 },
3944 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07003945 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003946 "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 -07003947 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
3948 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003949 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
3950 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
3951 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
3952 {
3953 "message": "A String", # [Output Only] An optional, human-readable error message.
3954 "code": "A String", # [Output Only] The error type identifier for this error.
3955 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
3956 },
3957 ],
3958 },
3959 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
3960 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
3961 "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.
3962 }</pre>
3963</div>
3964
3965<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003966 <code class="details" id="setTags">setTags(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003967 <pre>Sets network tags for the specified instance to the data included in the request.
John Asmuth614db982014-04-24 15:46:26 -04003968
3969Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003970 project: string, Project ID for this request. (required)
3971 zone: string, The name of the zone for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -04003972 instance: string, Name of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003973 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -04003974 The object takes the form of:
3975
3976{ # A set of instance tags.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003977 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
3978 "A String",
3979 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003980 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00003981 #
3982 # To see the latest fingerprint, make get() request to the instance.
Craig Citro0e5b9bf2014-10-15 10:26:14 -07003983}
John Asmuth614db982014-04-24 15:46:26 -04003984
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003985 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.
3986
3987For 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.
3988
3989The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -04003990
3991Returns:
3992 An object of the form:
3993
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003994 { # Represents an Operation resource.
3995 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003996 # Google Compute Engine has three Operation resources:
3997 #
3998 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
3999 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004000 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4001 #
4002 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004003 # - For global operations, use the `globalOperations` resource.
4004 # - For regional operations, use the `regionOperations` resource.
4005 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004006 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004007 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004008 "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 -07004009 "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 -04004010 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004011 "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 -07004012 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004013 "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 -07004014 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4015 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004016 "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 -07004017 "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.
Craig Citroe633be12015-03-02 13:40:36 -08004018 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004019 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004020 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004021 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -04004022 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004023 "message": "A String", # [Output Only] A human-readable description of the warning code.
4024 "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.
4025 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4026 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -04004027 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004028 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004029 "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).
John Asmuth614db982014-04-24 15:46:26 -04004030 },
4031 ],
4032 },
4033 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004034 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004035 "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 -07004036 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4037 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004038 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004039 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08004040 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -04004041 {
Craig Citroe633be12015-03-02 13:40:36 -08004042 "message": "A String", # [Output Only] An optional, human-readable error message.
4043 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004044 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -04004045 },
4046 ],
4047 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004048 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07004049 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004050 "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.
Craig Citroe633be12015-03-02 13:40:36 -08004051 }</pre>
4052</div>
4053
4054<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004055 <code class="details" id="simulateMaintenanceEvent">simulateMaintenanceEvent(project, zone, instance)</code>
4056 <pre>Simulates a maintenance event on the instance.
4057
4058Args:
4059 project: string, Project ID for this request. (required)
4060 zone: string, The name of the zone for this request. (required)
4061 instance: string, Name of the instance scoping this request. (required)
4062
4063Returns:
4064 An object of the form:
4065
4066 { # Represents an Operation resource.
4067 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004068 # Google Compute Engine has three Operation resources:
4069 #
4070 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4071 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004072 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4073 #
4074 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004075 # - For global operations, use the `globalOperations` resource.
4076 # - For regional operations, use the `regionOperations` resource.
4077 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004078 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004079 # 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 -07004080 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4081 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4082 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004083 "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 -07004084 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4085 "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 -07004086 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4087 "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 -07004088 "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 -07004089 "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 -07004090 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004091 "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 -07004092 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4093 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4094 {
4095 "message": "A String", # [Output Only] A human-readable description of the warning code.
4096 "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.
4097 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4098 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4099 {
4100 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4101 "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).
4102 },
4103 ],
4104 },
4105 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004106 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004107 "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 -07004108 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4109 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004110 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4111 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4112 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4113 {
4114 "message": "A String", # [Output Only] An optional, human-readable error message.
4115 "code": "A String", # [Output Only] The error type identifier for this error.
4116 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4117 },
4118 ],
4119 },
4120 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4121 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4122 "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.
4123 }</pre>
4124</div>
4125
4126<div class="method">
4127 <code class="details" id="start">start(project, zone, instance, requestId=None)</code>
4128 <pre>Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Craig Citroe633be12015-03-02 13:40:36 -08004129
4130Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004131 project: string, Project ID for this request. (required)
4132 zone: string, The name of the zone for this request. (required)
Craig Citroe633be12015-03-02 13:40:36 -08004133 instance: string, Name of the instance resource to start. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004134 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.
4135
4136For 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.
4137
4138The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citroe633be12015-03-02 13:40:36 -08004139
4140Returns:
4141 An object of the form:
4142
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004143 { # Represents an Operation resource.
4144 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004145 # Google Compute Engine has three Operation resources:
4146 #
4147 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4148 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004149 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4150 #
4151 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004152 # - For global operations, use the `globalOperations` resource.
4153 # - For regional operations, use the `regionOperations` resource.
4154 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004155 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004156 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004157 "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 -07004158 "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 -04004159 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004160 "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 -07004161 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004162 "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 -07004163 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4164 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004165 "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 -07004166 "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.
Craig Citroe633be12015-03-02 13:40:36 -08004167 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004168 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004169 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004170 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08004171 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004172 "message": "A String", # [Output Only] A human-readable description of the warning code.
4173 "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.
4174 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4175 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citroe633be12015-03-02 13:40:36 -08004176 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004177 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004178 "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).
Craig Citroe633be12015-03-02 13:40:36 -08004179 },
4180 ],
4181 },
4182 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004183 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004184 "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 -07004185 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4186 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004187 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004188 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08004189 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4190 {
4191 "message": "A String", # [Output Only] An optional, human-readable error message.
4192 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004193 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citroe633be12015-03-02 13:40:36 -08004194 },
4195 ],
4196 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004197 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07004198 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004199 "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.
Craig Citroe633be12015-03-02 13:40:36 -08004200 }</pre>
4201</div>
4202
4203<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004204 <code class="details" id="startWithEncryptionKey">startWithEncryptionKey(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004205 <pre>Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004206
4207Args:
4208 project: string, Project ID for this request. (required)
4209 zone: string, The name of the zone for this request. (required)
4210 instance: string, Name of the instance resource to start. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004211 body: object, The request body.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004212 The object takes the form of:
4213
4214{
4215 "disks": [ # Array of disks associated with this instance that are protected with a customer-supplied encryption key.
4216 #
4217 # In order to start the instance, the disk url and its corresponding key must be provided.
4218 #
4219 # If the disk is not protected with a customer-supplied encryption key it should not be specified.
4220 {
4221 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Decrypts data associated with the disk with a customer-supplied encryption key.
4222 "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 -07004223 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004224 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004225 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004226 },
4227 "source": "A String", # Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks.
4228 },
4229 ],
4230 }
4231
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004232 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.
4233
4234For 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.
4235
4236The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004237
4238Returns:
4239 An object of the form:
4240
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004241 { # Represents an Operation resource.
4242 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004243 # Google Compute Engine has three Operation resources:
4244 #
4245 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4246 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004247 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4248 #
4249 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004250 # - For global operations, use the `globalOperations` resource.
4251 # - For regional operations, use the `regionOperations` resource.
4252 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004253 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004254 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004255 "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 -07004256 "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 -04004257 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004258 "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 -07004259 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004260 "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 -07004261 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4262 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004263 "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 -07004264 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004265 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004266 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004267 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4268 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4269 {
4270 "message": "A String", # [Output Only] A human-readable description of the warning code.
4271 "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.
4272 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4273 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4274 {
4275 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4276 "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).
4277 },
4278 ],
4279 },
4280 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004281 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004282 "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 -07004283 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4284 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004285 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004286 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4287 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4288 {
4289 "message": "A String", # [Output Only] An optional, human-readable error message.
4290 "code": "A String", # [Output Only] The error type identifier for this error.
4291 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4292 },
4293 ],
4294 },
4295 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4296 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08004297 "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.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07004298 }</pre>
4299</div>
4300
4301<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004302 <code class="details" id="stop">stop(project, zone, instance, requestId=None)</code>
4303 <pre>Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Craig Citroe633be12015-03-02 13:40:36 -08004304
4305Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004306 project: string, Project ID for this request. (required)
4307 zone: string, The name of the zone for this request. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +00004308 instance: string, Name of the instance resource to stop. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004309 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.
4310
4311For 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.
4312
4313The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citroe633be12015-03-02 13:40:36 -08004314
4315Returns:
4316 An object of the form:
4317
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004318 { # Represents an Operation resource.
4319 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004320 # Google Compute Engine has three Operation resources:
4321 #
4322 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4323 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004324 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4325 #
4326 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004327 # - For global operations, use the `globalOperations` resource.
4328 # - For regional operations, use the `regionOperations` resource.
4329 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004330 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004331 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004332 "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 -07004333 "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 -04004334 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004335 "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 -07004336 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004337 "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 -07004338 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4339 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004340 "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 -07004341 "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.
Craig Citroe633be12015-03-02 13:40:36 -08004342 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004343 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004344 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004345 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08004346 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004347 "message": "A String", # [Output Only] A human-readable description of the warning code.
4348 "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.
4349 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4350 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citroe633be12015-03-02 13:40:36 -08004351 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00004352 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07004353 "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).
Craig Citroe633be12015-03-02 13:40:36 -08004354 },
4355 ],
4356 },
4357 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004358 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08004359 "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 -07004360 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4361 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004362 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4363 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4364 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4365 {
4366 "message": "A String", # [Output Only] An optional, human-readable error message.
4367 "code": "A String", # [Output Only] The error type identifier for this error.
4368 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4369 },
4370 ],
4371 },
4372 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4373 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4374 "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.
4375 }</pre>
4376</div>
4377
4378<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004379 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004380 <pre>Returns permissions that a caller has on the specified resource.
4381
4382Args:
4383 project: string, Project ID for this request. (required)
4384 zone: string, The name of the zone for this request. (required)
4385 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004386 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004387 The object takes the form of:
4388
4389{
4390 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
4391 "A String",
4392 ],
4393 }
4394
4395
4396Returns:
4397 An object of the form:
4398
4399 {
4400 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
4401 "A String",
4402 ],
4403 }</pre>
4404</div>
4405
4406<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004407 <code class="details" id="update">update(project, zone, instance, body=None, minimalAction=None, requestId=None, mostDisruptiveAllowedAction=None)</code>
4408 <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.
4409
4410Args:
4411 project: string, Project ID for this request. (required)
4412 zone: string, The name of the zone for this request. (required)
4413 instance: string, Name of the instance resource to update. (required)
4414 body: object, The request body.
4415 The object takes the form of:
4416
4417{ # Represents an Instance resource.
4418 #
4419 # 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 ==)
4420 "status": "A String", # [Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.
4421 "reservationAffinity": { # Specifies the reservations that this instance can consume from. # Specifies the reservations that this instance can consume from.
4422 "values": [ # Corresponds to the label values of a reservation resource.
4423 "A String",
4424 ],
4425 "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.
4426 "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.
4427 },
4428 "guestAccelerators": [ # A list of the type and count of accelerator cards attached to the instance.
4429 { # A specification of the type and number of accelerator cards attached to the instance.
4430 "acceleratorCount": 42, # The number of the guest accelerator cards exposed to this instance.
4431 "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.
4432 },
4433 ],
4434 "labels": { # Labels to apply to this instance. These can be later modified by the setLabels method.
4435 "a_key": "A String",
4436 },
4437 "displayDevice": { # A set of Display Device options # Enables display device for the instance.
4438 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
4439 },
4440 "scheduling": { # Sets the scheduling options for an Instance. NextID: 10 # Sets the scheduling options for this instance.
4441 "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.
4442 "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.
4443 #
4444 # By default, this is set to true so an instance is automatically restarted if it is terminated by Compute Engine.
4445 "nodeAffinities": [ # A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
4446 { # Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
4447 "operator": "A String", # Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.
4448 "values": [ # Corresponds to the label values of Node resource.
4449 "A String",
4450 ],
4451 "key": "A String", # Corresponds to the label key of Node resource.
4452 },
4453 ],
4454 "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.
4455 },
4456 "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".
4457 "serviceAccounts": [ # A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported.
4458 #
4459 # 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.
4460 { # A service account.
4461 "scopes": [ # The list of scopes to be made available for this service account.
4462 "A String",
4463 ],
4464 "email": "A String", # Email address of the service account.
4465 },
4466 ],
4467 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
4468 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
4469 "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.
4470 { # A network interface resource attached to an instance.
4471 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
4472 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
4473 { # An alias IP range attached to an instance's network interface.
4474 "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.
4475 "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).
4476 },
4477 ],
4478 "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.
4479 #
4480 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
4481 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
4482 # - projects/project/global/networks/network
4483 # - global/networks/default
4484 "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.
4485 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
4486 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4487 "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.
4488 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
4489 #
4490 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4491 #
4492 # 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.
4493 "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.
4494 "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.
4495 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
4496 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
4497 },
4498 ],
4499 "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.
4500 "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.
4501 "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:
4502 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
4503 # - regions/region/subnetworks/subnetwork
4504 "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.
4505 },
4506 ],
4507 "startRestricted": True or False, # [Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity.
4508 "shieldedInstanceConfig": { # A set of Shielded Instance options.
4509 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
4510 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
4511 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
4512 },
4513 "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.
4514 "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.
4515 "shieldedInstanceIntegrityPolicy": { # The policy describes the baseline against which Instance boot integrity is measured.
4516 "updateAutoLearnPolicy": True or False, # Updates the integrity policy baseline using the measurements from the VM instance's most recent boot.
4517 },
4518 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
4519 "metadata": { # A metadata key/value entry. # The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys.
4520 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
4521 {
4522 "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).
4523 "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.
4524 },
4525 ],
4526 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
4527 "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.
4528 #
4529 # To see the latest fingerprint, make a get() request to retrieve the resource.
4530 },
4531 "cpuPlatform": "A String", # [Output Only] The CPU platform used by this instance.
4532 "deletionProtection": True or False, # Whether the resource should be protected against deletion.
4533 "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.
4534 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
4535 "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.
4536 "items": [ # An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.
4537 "A String",
4538 ],
4539 "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.
4540 #
4541 # To see the latest fingerprint, make get() request to the instance.
4542 },
4543 "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.
4544 #
4545 # To see the latest fingerprint, make get() request to the instance.
4546 "resourcePolicies": [ # Resource policies applied to this instance.
4547 "A String",
4548 ],
4549 "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.
4550 #
4551 # To see the latest fingerprint, make get() request to the instance.
4552 "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:
4553 # zones/us-central1-f/machineTypes/n1-standard-1
4554 #
4555 #
4556 # 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):
4557 # zones/zone/machineTypes/custom-CPUS-MEMORY
4558 #
4559 #
4560 # For example: zones/us-central1-f/machineTypes/custom-4-5120
4561 #
4562 # For a full list of restrictions, read the Specifications for custom machine types.
4563 "kind": "compute#instance", # [Output Only] Type of the resource. Always compute#instance for instances.
4564 "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.
4565 "disks": [ # Array of disks associated with this instance. Persistent disks must be created before you can assign them.
4566 { # An instance-attached disk resource.
4567 "diskEncryptionKey": { # Represents a customer-supplied encryption key # Encrypts or decrypts a disk using a customer-supplied encryption key.
4568 #
4569 # 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.
4570 #
4571 # 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.
4572 #
4573 # 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.
4574 #
4575 # Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.
4576 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
4577 "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.
4578 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
4579 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
4580 },
4581 "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.
4582 #
4583 # 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.
4584 "kind": "compute#attachedDisk", # [Output Only] Type of the resource. Always compute#attachedDisk for attached disks.
4585 "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.
4586 #
4587 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
4588 #
4589 # This property is mutually exclusive with the source property; you can only define one or the other, but not both.
4590 "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.
4591 #
4592 # To create a disk with a snapshot that you created, specify the snapshot name in the following format:
4593 # global/snapshots/my-backup
4594 #
4595 #
4596 # If the source snapshot is deleted later, this field will not be set.
4597 "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.
4598 "description": "A String", # An optional description. Provide this property when creating the disk.
4599 "onUpdateAction": "A String", # Specifies which action to take on instance update with this disk. Default is to use the existing disk.
4600 "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.
4601 "a_key": "A String",
4602 },
4603 "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.
4604 #
4605 # 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.
4606 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
4607 "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.
4608 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
4609 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
4610 },
4611 "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:
4612 # https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard
4613 #
4614 #
4615 # 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:
4616 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
4617 # - projects/project/zones/zone/diskTypes/diskType
4618 # - zones/zone/diskTypes/diskType Note that for InstanceTemplate, this is the name of the disk type, not URL.
4619 "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.
4620 "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.
4621 "A String",
4622 ],
4623 "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.
4624 #
4625 # 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:
4626 # projects/debian-cloud/global/images/family/debian-9
4627 #
4628 #
4629 # Alternatively, use a specific version of a public operating system image:
4630 # projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD
4631 #
4632 #
4633 # To create a disk with a custom image that you created, specify the image name in the following format:
4634 # global/images/my-custom-image
4635 #
4636 #
4637 # 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:
4638 # global/images/family/my-image-family
4639 #
4640 #
4641 # If the source image is deleted later, this field will not be set.
4642 "sourceSnapshotEncryptionKey": { # Represents a customer-supplied encryption key # The customer-supplied encryption key of the source snapshot.
4643 "rawKey": "A String", # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
4644 "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.
4645 "sha256": "A String", # [Output only] The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
4646 "kmsKeyName": "A String", # The name of the encryption key that is stored in Google Cloud KMS.
4647 },
4648 },
4649 "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).
4650 "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.
4651 "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.
4652 "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
4653 "dbxs": [ # The forbidden key database (dbx).
4654 {
4655 "content": "A String", # The raw content in the secure keys file.
4656 "fileType": "A String",
4657 },
4658 ],
4659 "dbs": [ # The Key Database (db).
4660 {
4661 "content": "A String", # The raw content in the secure keys file.
4662 "fileType": "A String",
4663 },
4664 ],
4665 "keks": [ # The Key Exchange Key (KEK).
4666 {
4667 "content": "A String", # The raw content in the secure keys file.
4668 "fileType": "A String",
4669 },
4670 ],
4671 "pk": { # The Platform Key (PK).
4672 "content": "A String", # The raw content in the secure keys file.
4673 "fileType": "A String",
4674 },
4675 },
4676 "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.
4677 { # Guest OS features.
4678 "type": "A String", # The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.
4679 },
4680 ],
4681 "diskSizeGb": "A String", # The size of the disk in GB.
4682 "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.
4683 "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.
4684 "licenses": [ # [Output Only] Any valid publicly visible licenses.
4685 "A String",
4686 ],
4687 "type": "A String", # Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.
4688 "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.
4689 #
4690 # If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks.
4691 #
4692 # Note that for InstanceTemplate, specify the disk name, not the URL for the disk.
4693 },
4694 ],
4695 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
4696}
4697
4698 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.
4699 Allowed values
4700 INVALID -
4701 NO_EFFECT -
4702 REFRESH -
4703 RESTART -
4704 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.
4705
4706For 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.
4707
4708The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4709 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.
4710 Allowed values
4711 INVALID -
4712 NO_EFFECT -
4713 REFRESH -
4714 RESTART -
4715
4716Returns:
4717 An object of the form:
4718
4719 { # Represents an Operation resource.
4720 #
4721 # Google Compute Engine has three Operation resources:
4722 #
4723 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4724 #
4725 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4726 #
4727 # Operations can be global, regional or zonal.
4728 # - For global operations, use the `globalOperations` resource.
4729 # - For regional operations, use the `regionOperations` resource.
4730 # - For zonal operations, use the `zonalOperations` resource.
4731 #
4732 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4733 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4734 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4735 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4736 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4737 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4738 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4739 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4740 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4741 "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.
4742 "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.
4743 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4744 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4745 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4746 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4747 {
4748 "message": "A String", # [Output Only] A human-readable description of the warning code.
4749 "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.
4750 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4751 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4752 {
4753 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4754 "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).
4755 },
4756 ],
4757 },
4758 ],
4759 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
4760 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4761 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4762 "name": "A String", # [Output Only] Name of the operation.
4763 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4764 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4765 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4766 {
4767 "message": "A String", # [Output Only] An optional, human-readable error message.
4768 "code": "A String", # [Output Only] The error type identifier for this error.
4769 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4770 },
4771 ],
4772 },
4773 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4774 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4775 "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.
4776 }</pre>
4777</div>
4778
4779<div class="method">
4780 <code class="details" id="updateAccessConfig">updateAccessConfig(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004781 <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.
4782
4783Args:
4784 project: string, Project ID for this request. (required)
4785 zone: string, The name of the zone for this request. (required)
4786 instance: string, The instance name for this request. (required)
4787 networkInterface: string, The name of the network interface where the access config is attached. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004788 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004789 The object takes the form of:
4790
4791{ # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
4792 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4793 "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.
4794 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
4795 #
4796 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4797 #
4798 # 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.
4799 "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.
4800 "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.
4801 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
4802 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
4803}
4804
4805 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.
4806
4807For 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.
4808
4809The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4810
4811Returns:
4812 An object of the form:
4813
4814 { # Represents an Operation resource.
4815 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004816 # Google Compute Engine has three Operation resources:
4817 #
4818 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4819 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004820 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4821 #
4822 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07004823 # - For global operations, use the `globalOperations` resource.
4824 # - For regional operations, use the `regionOperations` resource.
4825 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004826 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004827 # 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 -07004828 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4829 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4830 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07004831 "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 -07004832 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4833 "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 -07004834 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4835 "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 -07004836 "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 -07004837 "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 -07004838 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07004839 "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 -07004840 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4841 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4842 {
4843 "message": "A String", # [Output Only] A human-readable description of the warning code.
4844 "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.
4845 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4846 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4847 {
4848 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4849 "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).
4850 },
4851 ],
4852 },
4853 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07004854 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004855 "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 -07004856 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4857 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004858 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4859 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4860 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4861 {
4862 "message": "A String", # [Output Only] An optional, human-readable error message.
4863 "code": "A String", # [Output Only] The error type identifier for this error.
4864 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4865 },
4866 ],
4867 },
4868 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4869 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4870 "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.
4871 }</pre>
4872</div>
4873
4874<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004875 <code class="details" id="updateDisplayDevice">updateDisplayDevice(project, zone, instance, body=None, requestId=None)</code>
4876 <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.
4877
4878Args:
4879 project: string, Project ID for this request. (required)
4880 zone: string, The name of the zone for this request. (required)
4881 instance: string, Name of the instance scoping this request. (required)
4882 body: object, The request body.
4883 The object takes the form of:
4884
4885{ # A set of Display Device options
4886 "enableDisplay": True or False, # Defines whether the instance has Display enabled.
4887}
4888
4889 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.
4890
4891For 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.
4892
4893The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
4894
4895Returns:
4896 An object of the form:
4897
4898 { # Represents an Operation resource.
4899 #
4900 # Google Compute Engine has three Operation resources:
4901 #
4902 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
4903 #
4904 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
4905 #
4906 # Operations can be global, regional or zonal.
4907 # - For global operations, use the `globalOperations` resource.
4908 # - For regional operations, use the `regionOperations` resource.
4909 # - For zonal operations, use the `zonalOperations` resource.
4910 #
4911 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
4912 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
4913 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
4914 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
4915 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
4916 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
4917 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
4918 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
4919 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
4920 "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.
4921 "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.
4922 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
4923 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
4924 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
4925 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
4926 {
4927 "message": "A String", # [Output Only] A human-readable description of the warning code.
4928 "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.
4929 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
4930 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4931 {
4932 "value": "A String", # [Output Only] A warning data value corresponding to the key.
4933 "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).
4934 },
4935 ],
4936 },
4937 ],
4938 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
4939 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
4940 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
4941 "name": "A String", # [Output Only] Name of the operation.
4942 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
4943 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
4944 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
4945 {
4946 "message": "A String", # [Output Only] An optional, human-readable error message.
4947 "code": "A String", # [Output Only] The error type identifier for this error.
4948 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
4949 },
4950 ],
4951 },
4952 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
4953 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
4954 "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.
4955 }</pre>
4956</div>
4957
4958<div class="method">
4959 <code class="details" id="updateNetworkInterface">updateNetworkInterface(project, zone, instance, networkInterface, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004960 <pre>Updates an instance's network interface. This method follows PATCH semantics.
4961
4962Args:
4963 project: string, Project ID for this request. (required)
4964 zone: string, The name of the zone for this request. (required)
4965 instance: string, The instance name for this request. (required)
4966 networkInterface: string, The name of the network interface to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004967 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004968 The object takes the form of:
4969
4970{ # A network interface resource attached to an instance.
4971 "kind": "compute#networkInterface", # [Output Only] Type of the resource. Always compute#networkInterface for network interfaces.
4972 "aliasIpRanges": [ # An array of alias IP ranges for this network interface. You can only specify this field for network interfaces in VPC networks.
4973 { # An alias IP range attached to an instance's network interface.
4974 "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.
4975 "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).
4976 },
4977 ],
4978 "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.
4979 #
4980 # If you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs:
4981 # - https://www.googleapis.com/compute/v1/projects/project/global/networks/network
4982 # - projects/project/global/networks/network
4983 # - global/networks/default
4984 "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.
4985 { # An access configuration attached to an instance's network interface. Only one access config per instance is supported.
4986 "kind": "compute#accessConfig", # [Output Only] Type of the resource. Always compute#accessConfig for access configs.
4987 "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.
4988 "networkTier": "A String", # This signifies the networking tier used for configuring this access configuration and can only take the following values: PREMIUM, STANDARD.
4989 #
4990 # If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier.
4991 #
4992 # 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.
4993 "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.
4994 "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.
4995 "type": "ONE_TO_ONE_NAT", # The type of configuration. The default and only option is ONE_TO_ONE_NAT.
4996 "publicPtrDomainName": "A String", # The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled.
4997 },
4998 ],
4999 "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.
5000 "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.
5001 "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:
5002 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
5003 # - regions/region/subnetworks/subnetwork
5004 "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.
5005}
5006
5007 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.
5008
5009For 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.
5010
5011The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5012
5013Returns:
5014 An object of the form:
5015
5016 { # Represents an Operation resource.
5017 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005018 # Google Compute Engine has three Operation resources:
5019 #
5020 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5021 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005022 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5023 #
5024 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005025 # - For global operations, use the `globalOperations` resource.
5026 # - For regional operations, use the `regionOperations` resource.
5027 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005028 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005029 # 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 -07005030 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5031 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5032 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005033 "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 -07005034 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5035 "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 -07005036 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5037 "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 -07005038 "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 -07005039 "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 -07005040 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005041 "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 -07005042 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5043 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5044 {
5045 "message": "A String", # [Output Only] A human-readable description of the warning code.
5046 "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.
5047 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5048 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5049 {
5050 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5051 "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).
5052 },
5053 ],
5054 },
5055 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005056 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005057 "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 -07005058 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5059 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005060 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
5061 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
5062 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5063 {
5064 "message": "A String", # [Output Only] An optional, human-readable error message.
5065 "code": "A String", # [Output Only] The error type identifier for this error.
5066 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
5067 },
5068 ],
5069 },
5070 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
5071 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
5072 "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.
5073 }</pre>
5074</div>
5075
5076<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07005077 <code class="details" id="updateShieldedInstanceConfig">updateShieldedInstanceConfig(project, zone, instance, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005078 <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.
5079
5080Args:
5081 project: string, Project ID for this request. (required)
5082 zone: string, The name of the zone for this request. (required)
5083 instance: string, Name or id of the instance scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07005084 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005085 The object takes the form of:
5086
5087{ # A set of Shielded Instance options.
5088 "enableVtpm": True or False, # Defines whether the instance has the vTPM enabled.
5089 "enableIntegrityMonitoring": True or False, # Defines whether the instance has integrity monitoring enabled.
5090 "enableSecureBoot": True or False, # Defines whether the instance has Secure Boot enabled.
5091}
5092
5093 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.
5094
5095For 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.
5096
5097The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
5098
5099Returns:
5100 An object of the form:
5101
5102 { # Represents an Operation resource.
5103 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005104 # Google Compute Engine has three Operation resources:
5105 #
5106 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
5107 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005108 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
5109 #
5110 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07005111 # - For global operations, use the `globalOperations` resource.
5112 # - For regional operations, use the `regionOperations` resource.
5113 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005114 #
Dan O'Mearadd494642020-05-01 07:42:23 -07005115 # 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 -07005116 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
5117 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
5118 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07005119 "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 -07005120 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
5121 "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 -07005122 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
5123 "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 -07005124 "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 -07005125 "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 -07005126 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07005127 "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 -07005128 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
5129 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
5130 {
5131 "message": "A String", # [Output Only] A human-readable description of the warning code.
5132 "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.
5133 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
5134 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5135 {
5136 "value": "A String", # [Output Only] A warning data value corresponding to the key.
5137 "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).
5138 },
5139 ],
5140 },
5141 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07005142 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005143 "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 -07005144 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
5145 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07005146 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00005147 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08005148 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
5149 {
5150 "message": "A String", # [Output Only] An optional, human-readable error message.
5151 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07005152 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citroe633be12015-03-02 13:40:36 -08005153 },
5154 ],
5155 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08005156 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07005157 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08005158 "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.
John Asmuth614db982014-04-24 15:46:26 -04005159 }</pre>
5160</div>
5161
5162</body></html>