blob: 68d4989b5dd9a526f3397858dc9b8a032a786221 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.projects.html">projects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#disableXpnHost">disableXpnHost(project, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Disable this project as a shared VPC host project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#disableXpnResource">disableXpnResource(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Disable a service resource (also known as service project) associated with this host project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070083<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#enableXpnHost">enableXpnHost(project, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Enable this project as a shared VPC host project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#enableXpnResource">enableXpnResource(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
90 <code><a href="#get">get(project)</a></code></p>
91<p class="firstline">Returns the specified Project resource.</p>
92<p class="toc_element">
93 <code><a href="#getXpnHost">getXpnHost(project)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Gets the shared VPC host project that this project links to. May be empty if no link exists.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#getXpnResources">getXpnResources(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Gets service resources (a.k.a service project) associated with this host project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070098<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#getXpnResources_next">getXpnResources_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#listXpnHosts">listXpnHosts(project, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Lists all shared VPC host projects visible to the user in an organization.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400105 <code><a href="#listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#moveDisk">moveDisk(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109<p class="firstline">Moves a persistent disk from one zone to another.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#moveInstance">moveInstance(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Moves an instance and its attached persistent disks from one zone to another.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Sets metadata common to all instances within the specified project using the data included in the request.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118<p class="firstline">Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#setDefaultServiceAccount">setDefaultServiceAccount(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700121<p class="firstline">Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to "default".</p>
122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#setUsageExportBucket">setUsageExportBucket(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700124<p class="firstline">Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.</p>
125<h3>Method Details</h3>
126<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400127 <code class="details" id="disableXpnHost">disableXpnHost(project, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128 <pre>Disable this project as a shared VPC host project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700129
130Args:
131 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 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.
133
134For 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.
135
136The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700137
138Returns:
139 An object of the form:
140
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 { # Represents an Operation resource.
142 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 # Google Compute Engine has three Operation resources:
144 #
145 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
146 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
148 #
149 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 # - For global operations, use the `globalOperations` resource.
151 # - For regional operations, use the `regionOperations` resource.
152 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
156 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
157 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
158 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
159 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
160 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700161 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
163 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
164 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700165 },
166 ],
167 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
169 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
170 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
171 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
172 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
173 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
174 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
175 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
176 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
177 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
178 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
179 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
180 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
181 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
182 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
183 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
184 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
185 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
186 {
187 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
188 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
189 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
190 {
191 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
192 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
193 },
194 ],
195 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
196 },
197 ],
198 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700199 }</pre>
200</div>
201
202<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700203 <code class="details" id="disableXpnResource">disableXpnResource(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 <pre>Disable a service resource (also known as service project) associated with this host project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700205
206Args:
207 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700209 The object takes the form of:
210
211{
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 &quot;xpnResource&quot;: { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
213 &quot;id&quot;: &quot;A String&quot;, # The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678).
214 &quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700215 },
216 }
217
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 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.
219
220For 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.
221
222The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700223
224Returns:
225 An object of the form:
226
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 { # Represents an Operation resource.
228 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700229 # Google Compute Engine has three Operation resources:
230 #
231 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
232 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
234 #
235 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700236 # - For global operations, use the `globalOperations` resource.
237 # - For regional operations, use the `regionOperations` resource.
238 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
242 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
243 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
244 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
245 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
246 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700247 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700248 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
249 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
250 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700251 },
252 ],
253 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
255 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
256 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
257 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
258 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
259 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
260 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
261 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
262 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
263 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
264 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
265 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
266 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
267 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
268 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
269 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
270 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
271 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
272 {
273 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
274 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
275 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
276 {
277 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
278 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
279 },
280 ],
281 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
282 },
283 ],
284 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700285 }</pre>
286</div>
287
288<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400289 <code class="details" id="enableXpnHost">enableXpnHost(project, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 <pre>Enable this project as a shared VPC host project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700291
292Args:
293 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 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.
295
296For 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.
297
298The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700299
300Returns:
301 An object of the form:
302
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 { # Represents an Operation resource.
304 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 # Google Compute Engine has three Operation resources:
306 #
307 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
308 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
310 #
311 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700312 # - For global operations, use the `globalOperations` resource.
313 # - For regional operations, use the `regionOperations` resource.
314 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700316 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700317 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
318 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
319 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
320 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
321 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
322 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700323 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
325 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
326 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700327 },
328 ],
329 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700330 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
331 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
332 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
333 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
334 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
335 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
336 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
337 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
338 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
339 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
340 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
341 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
342 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
343 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
344 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
345 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
346 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
347 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
348 {
349 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
350 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
351 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
352 {
353 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
354 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
355 },
356 ],
357 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
358 },
359 ],
360 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700361 }</pre>
362</div>
363
364<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 <code class="details" id="enableXpnResource">enableXpnResource(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700366 <pre>Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700367
368Args:
369 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700371 The object takes the form of:
372
373{
Bu Sun Kim65020912020-05-20 12:08:20 -0700374 &quot;xpnResource&quot;: { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
375 &quot;id&quot;: &quot;A String&quot;, # The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678).
376 &quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700377 },
378 }
379
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700380 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.
381
382For 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.
383
384The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700385
386Returns:
387 An object of the form:
388
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 { # Represents an Operation resource.
390 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 # Google Compute Engine has three Operation resources:
392 #
393 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
394 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
396 #
397 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700398 # - For global operations, use the `globalOperations` resource.
399 # - For regional operations, use the `regionOperations` resource.
400 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700402 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
404 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
405 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
406 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
407 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
408 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700409 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
411 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
412 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700413 },
414 ],
415 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700416 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
417 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
418 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
419 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
420 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
421 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
422 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
423 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
424 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
425 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
426 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
427 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
428 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
429 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
430 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
431 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
432 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
433 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
434 {
435 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
436 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
437 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
438 {
439 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
440 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
441 },
442 ],
443 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
444 },
445 ],
446 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700447 }</pre>
448</div>
449
450<div class="method">
451 <code class="details" id="get">get(project)</code>
452 <pre>Returns the specified Project resource.
453
454Args:
455 project: string, Project ID for this request. (required)
456
457Returns:
458 An object of the form:
459
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700460 { # Represents a Project resource.
461 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700462 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 &quot;commonInstanceMetadata&quot;: { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
464 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 #
466 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
468 {
469 &quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
470 &quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
471 },
472 ],
473 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700474 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
476 &quot;defaultNetworkTier&quot;: &quot;A String&quot;, # This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
477 &quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
478 &quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
479 &quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
480 &quot;A String&quot;,
481 ],
482 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.
483 &quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
484 &quot;name&quot;: &quot;A String&quot;, # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
485 &quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700486 { # A quotas entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700487 &quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
488 &quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
489 &quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
490 &quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700491 },
492 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
494 &quot;usageExportLocation&quot;: { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. # The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.
495 &quot;bucketName&quot;: &quot;A String&quot;, # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket.
496 &quot;reportNamePrefix&quot;: &quot;A String&quot;, # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700497 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700498 &quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700499 }</pre>
500</div>
501
502<div class="method">
503 <code class="details" id="getXpnHost">getXpnHost(project)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700504 <pre>Gets the shared VPC host project that this project links to. May be empty if no link exists.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700505
506Args:
507 project: string, Project ID for this request. (required)
508
509Returns:
510 An object of the form:
511
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700512 { # Represents a Project resource.
513 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700514 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &quot;commonInstanceMetadata&quot;: { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
516 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 #
518 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
520 {
521 &quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
522 &quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
523 },
524 ],
525 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700526 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700527 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
528 &quot;defaultNetworkTier&quot;: &quot;A String&quot;, # This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
529 &quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
530 &quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
531 &quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
532 &quot;A String&quot;,
533 ],
534 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.
535 &quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
536 &quot;name&quot;: &quot;A String&quot;, # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
537 &quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700538 { # A quotas entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 &quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
540 &quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
541 &quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
542 &quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700543 },
544 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700545 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
546 &quot;usageExportLocation&quot;: { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. # The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.
547 &quot;bucketName&quot;: &quot;A String&quot;, # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket.
548 &quot;reportNamePrefix&quot;: &quot;A String&quot;, # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700549 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 &quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700551 }</pre>
552</div>
553
554<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 <code class="details" id="getXpnResources">getXpnResources(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556 <pre>Gets service resources (a.k.a service project) associated with this host project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700557
558Args:
559 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 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 -0700561
Dan O'Mearadd494642020-05-01 07:42:23 -0700562For 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 -0700563
Dan O'Mearadd494642020-05-01 07:42:23 -0700564You 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 -0700565
Bu Sun Kim65020912020-05-20 12:08:20 -0700566To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
567 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`)
568 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
569
570You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
571
572Currently, only sorting by `name` or `creationTimestamp desc` is supported.
573 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700574
575Returns:
576 An object of the form:
577
578 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700579 &quot;kind&quot;: &quot;compute#projectsGetXpnResources&quot;, # [Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)
580 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
581 &quot;resources&quot;: [ # Service resources (a.k.a service projects) attached to this project as their shared VPC host.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 { # Service resource (a.k.a service project) ID.
Bu Sun Kim65020912020-05-20 12:08:20 -0700583 &quot;id&quot;: &quot;A String&quot;, # The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678).
584 &quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700585 },
586 ],
587 }</pre>
588</div>
589
590<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400591 <code class="details" id="getXpnResources_next">getXpnResources_next(previous_request, previous_response)</code>
592 <pre>Retrieves the next page of results.
593
594Args:
595 previous_request: The request for the previous page. (required)
596 previous_response: The response from the request for the previous page. (required)
597
598Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400600 page. Returns None if there are no more items in the collection.
601 </pre>
602</div>
603
604<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 <code class="details" id="listXpnHosts">listXpnHosts(project, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 <pre>Lists all shared VPC host projects visible to the user in an organization.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700607
608Args:
609 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700610 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700611 The object takes the form of:
612
613{
Bu Sun Kim65020912020-05-20 12:08:20 -0700614 &quot;organization&quot;: &quot;A String&quot;, # Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700615 }
616
Dan O'Mearadd494642020-05-01 07:42:23 -0700617 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 -0700618
Dan O'Mearadd494642020-05-01 07:42:23 -0700619For 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 -0700620
Dan O'Mearadd494642020-05-01 07:42:23 -0700621You 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 -0700622
Bu Sun Kim65020912020-05-20 12:08:20 -0700623To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
624 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`)
625 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
626
627You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
628
629Currently, only sorting by `name` or `creationTimestamp desc` is supported.
630 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700631
632Returns:
633 An object of the form:
634
635 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
637 &quot;items&quot;: [ # [Output Only] A list of shared VPC host project URLs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700638 { # Represents a Project resource.
639 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700640 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700641 &quot;commonInstanceMetadata&quot;: { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
642 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 #
644 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700645 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
646 {
647 &quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
648 &quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
649 },
650 ],
651 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700652 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
654 &quot;defaultNetworkTier&quot;: &quot;A String&quot;, # This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
655 &quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
656 &quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
657 &quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
658 &quot;A String&quot;,
659 ],
660 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.
661 &quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
662 &quot;name&quot;: &quot;A String&quot;, # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
663 &quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700664 { # A quotas entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700665 &quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
666 &quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
667 &quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
668 &quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700669 },
670 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700671 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
672 &quot;usageExportLocation&quot;: { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. # The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.
673 &quot;bucketName&quot;: &quot;A String&quot;, # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket.
674 &quot;reportNamePrefix&quot;: &quot;A String&quot;, # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700675 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700676 &quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700677 },
678 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 &quot;kind&quot;: &quot;compute#xpnHostList&quot;, # [Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.
680 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
681 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
682 &quot;warning&quot;: { # [Output Only] Informational warning message.
683 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
684 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
685 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700686 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700687 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
688 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 },
690 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700691 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700692 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700693 }</pre>
694</div>
695
696<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400697 <code class="details" id="listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</code>
698 <pre>Retrieves the next page of results.
699
700Args:
701 previous_request: The request for the previous page. (required)
702 previous_response: The response from the request for the previous page. (required)
703
704Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700705 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400706 page. Returns None if there are no more items in the collection.
707 </pre>
708</div>
709
710<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700711 <code class="details" id="moveDisk">moveDisk(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700712 <pre>Moves a persistent disk from one zone to another.
713
714Args:
715 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700716 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700717 The object takes the form of:
718
719{
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 &quot;destinationZone&quot;: &quot;A String&quot;, # The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700721 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
722 # - projects/project/zones/zone
723 # - zones/zone
Bu Sun Kim65020912020-05-20 12:08:20 -0700724 &quot;targetDisk&quot;: &quot;A String&quot;, # The URL of the target disk to move. This can be a full or partial URL. For example, the following are all valid URLs to a disk:
725 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
726 # - projects/project/zones/zone/disks/disk
727 # - zones/zone/disks/disk
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700728 }
729
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 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.
731
732For 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.
733
734The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700735
736Returns:
737 An object of the form:
738
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700739 { # Represents an Operation resource.
740 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700741 # Google Compute Engine has three Operation resources:
742 #
743 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
744 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700745 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
746 #
747 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700748 # - For global operations, use the `globalOperations` resource.
749 # - For regional operations, use the `regionOperations` resource.
750 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700752 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
754 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
755 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
756 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
757 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
758 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700759 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700760 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
761 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
762 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700763 },
764 ],
765 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
767 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
768 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
769 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
770 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
771 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
772 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
773 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
774 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
775 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
776 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
777 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
778 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
779 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
780 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
781 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
782 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
783 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
784 {
785 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
786 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
787 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
788 {
789 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
790 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
791 },
792 ],
793 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
794 },
795 ],
796 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700797 }</pre>
798</div>
799
800<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700801 <code class="details" id="moveInstance">moveInstance(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700802 <pre>Moves an instance and its attached persistent disks from one zone to another.
803
804Args:
805 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700806 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700807 The object takes the form of:
808
809{
Bu Sun Kim65020912020-05-20 12:08:20 -0700810 &quot;destinationZone&quot;: &quot;A String&quot;, # The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700811 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
812 # - projects/project/zones/zone
813 # - zones/zone
Bu Sun Kim65020912020-05-20 12:08:20 -0700814 &quot;targetInstance&quot;: &quot;A String&quot;, # The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance:
815 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
816 # - projects/project/zones/zone/instances/instance
817 # - zones/zone/instances/instance
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700818 }
819
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700820 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.
821
822For 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.
823
824The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700825
826Returns:
827 An object of the form:
828
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700829 { # Represents an Operation resource.
830 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700831 # Google Compute Engine has three Operation resources:
832 #
833 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
834 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700835 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
836 #
837 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700838 # - For global operations, use the `globalOperations` resource.
839 # - For regional operations, use the `regionOperations` resource.
840 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700841 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700842 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
844 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
845 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
846 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
847 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
848 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700849 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700850 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
851 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
852 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700853 },
854 ],
855 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
857 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
858 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
859 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
860 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
861 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
862 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
863 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
864 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
865 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
866 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
867 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
868 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
869 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
870 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
871 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
872 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
873 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
874 {
875 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
876 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
877 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
878 {
879 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
880 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
881 },
882 ],
883 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
884 },
885 ],
886 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700887 }</pre>
888</div>
889
890<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700891 <code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700892 <pre>Sets metadata common to all instances within the specified project using the data included in the request.
893
894Args:
895 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700896 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700897 The object takes the form of:
898
899{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &quot;fingerprint&quot;: &quot;A String&quot;, # Specifies a fingerprint for this request, which is essentially a hash of the metadata&#x27;s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700901 #
902 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
904 {
905 &quot;key&quot;: &quot;A String&quot;, # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
906 &quot;value&quot;: &quot;A String&quot;, # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
907 },
908 ],
909 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700910}
911
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 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.
913
914For 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.
915
916The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700917
918Returns:
919 An object of the form:
920
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700921 { # Represents an Operation resource.
922 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700923 # Google Compute Engine has three Operation resources:
924 #
925 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
926 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700927 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
928 #
929 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700930 # - For global operations, use the `globalOperations` resource.
931 # - For regional operations, use the `regionOperations` resource.
932 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700933 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700934 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700935 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
936 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
937 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
938 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
939 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
940 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700941 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700942 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
943 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
944 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700945 },
946 ],
947 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
949 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
950 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
951 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
952 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
953 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
954 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
955 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
956 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
957 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
958 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
959 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
960 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
961 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
962 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
963 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
964 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
965 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
966 {
967 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
968 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
969 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
970 {
971 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
972 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
973 },
974 ],
975 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
976 },
977 ],
978 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 }</pre>
980</div>
981
982<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700983 <code class="details" id="setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700984 <pre>Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
985
986Args:
987 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700988 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700989 The object takes the form of:
990
991{
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 &quot;networkTier&quot;: &quot;A String&quot;, # Default network tier to be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700993 }
994
995 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.
996
997For 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.
998
999The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1000
1001Returns:
1002 An object of the form:
1003
1004 { # Represents an Operation resource.
1005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 # Google Compute Engine has three Operation resources:
1007 #
1008 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1009 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001010 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1011 #
1012 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001013 # - For global operations, use the `globalOperations` resource.
1014 # - For regional operations, use the `regionOperations` resource.
1015 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001016 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001017 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001018 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1019 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1020 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1021 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1022 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1023 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001024 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001025 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1026 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1027 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001028 },
1029 ],
1030 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001031 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1032 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1033 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1034 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1035 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1036 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1037 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1038 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1039 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1040 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1041 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1042 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1043 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1044 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1045 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1046 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1047 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1048 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1049 {
1050 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1051 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1052 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1053 {
1054 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1055 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1056 },
1057 ],
1058 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1059 },
1060 ],
1061 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001062 }</pre>
1063</div>
1064
1065<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001066 <code class="details" id="setDefaultServiceAccount">setDefaultServiceAccount(project, body=None, requestId=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -07001067 <pre>Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to &quot;default&quot;.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001068
1069Args:
1070 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001071 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001072 The object takes the form of:
1073
1074{
Bu Sun Kim65020912020-05-20 12:08:20 -07001075 &quot;email&quot;: &quot;A String&quot;, # Email address of the service account.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001076 }
1077
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 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.
1079
1080For 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.
1081
1082The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001083
1084Returns:
1085 An object of the form:
1086
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001087 { # Represents an Operation resource.
1088 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001089 # Google Compute Engine has three Operation resources:
1090 #
1091 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1092 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001093 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1094 #
1095 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001096 # - For global operations, use the `globalOperations` resource.
1097 # - For regional operations, use the `regionOperations` resource.
1098 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001099 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001100 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1102 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1103 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1104 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1105 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1106 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001107 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001108 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1109 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1110 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001111 },
1112 ],
1113 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001114 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1115 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1116 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1117 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1118 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1119 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1120 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1121 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1122 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1123 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1124 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1125 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1126 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1127 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1128 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1129 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1130 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1131 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1132 {
1133 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1134 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1135 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1136 {
1137 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1138 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1139 },
1140 ],
1141 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1142 },
1143 ],
1144 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001145 }</pre>
1146</div>
1147
1148<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001149 <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001150 <pre>Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
1151
1152Args:
1153 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001154 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001155 The object takes the form of:
1156
1157{ # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.
Bu Sun Kim65020912020-05-20 12:08:20 -07001158 &quot;bucketName&quot;: &quot;A String&quot;, # The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This can either be the bucket name by itself, such as example-bucket, or the bucket name with gs:// or https://storage.googleapis.com/ in front of it, such as gs://example-bucket.
1159 &quot;reportNamePrefix&quot;: &quot;A String&quot;, # An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001160}
1161
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001162 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.
1163
1164For 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.
1165
1166The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001167
1168Returns:
1169 An object of the form:
1170
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001171 { # Represents an Operation resource.
1172 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001173 # Google Compute Engine has three Operation resources:
1174 #
1175 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1176 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001177 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1178 #
1179 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001180 # - For global operations, use the `globalOperations` resource.
1181 # - For regional operations, use the `regionOperations` resource.
1182 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001183 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001184 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001185 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1186 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1187 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1188 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1189 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1190 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001191 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1193 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1194 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001195 },
1196 ],
1197 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001198 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1199 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1200 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1201 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1202 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1203 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1204 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1205 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1206 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1207 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1208 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
1209 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1210 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1211 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1212 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1213 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1214 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1215 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1216 {
1217 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1218 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1219 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1220 {
1221 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1222 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1223 },
1224 ],
1225 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1226 },
1227 ],
1228 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001229 }</pre>
1230</div>
1231
1232</body></html>