blob: 710fa520345fe4735aaf740795415792fed85955 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.projects.html">projects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#disableXpnHost">disableXpnHost(project, requestId=None)</a></code></p>
82<p class="firstline">Disable this project as a shared VPC host project.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040083<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#disableXpnResource">disableXpnResource(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Disable a service resource (also known as service project) associated with this host project.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040086<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#enableXpnHost">enableXpnHost(project, requestId=None)</a></code></p>
88<p class="firstline">Enable this project as a shared VPC host project.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#enableXpnResource">enableXpnResource(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<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 Cheemalapati4ba8c232017-06-06 18:46:08 -040092<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -040093 <code><a href="#get">get(project)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070094<p class="firstline">Returns the specified Project resource.</p>
John Asmuth614db982014-04-24 15:46:26 -040095<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040096 <code><a href="#getXpnHost">getXpnHost(project)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Gets the shared VPC host project that this project links to. May be empty if no link exists.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040098<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070099 <code><a href="#getXpnResources">getXpnResources(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Gets service resources (a.k.a service project) associated with this host project.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400101<p class="toc_element">
102 <code><a href="#getXpnResources_next">getXpnResources_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700105 <code><a href="#listXpnHosts">listXpnHosts(project, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Lists all shared VPC host projects visible to the user in an organization.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400107<p class="toc_element">
108 <code><a href="#listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#moveDisk">moveDisk(project, body=None, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000112<p class="firstline">Moves a persistent disk from one zone to another.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#moveInstance">moveInstance(project, body=None, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000115<p class="firstline">Moves an instance and its attached persistent disks from one zone to another.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400118<p class="firstline">Sets metadata common to all instances within the specified project using the data included in the request.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121<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>
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>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000124<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>
John Asmuth614db982014-04-24 15:46:26 -0400125<h3>Method Details</h3>
126<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700127 <code class="details" id="close">close()</code>
128 <pre>Close httplib2 connections.</pre>
129</div>
130
131<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 <code class="details" id="disableXpnHost">disableXpnHost(project, requestId=None)</code>
133 <pre>Disable this project as a shared VPC host project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400134
135Args:
136 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700137 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.
138
139For 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.
140
141The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400142
143Returns:
144 An object of the form:
145
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700146 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800147 #
148 # Google Compute Engine has three Operation resources:
149 #
150 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
151 #
152 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
153 #
154 # Operations can be global, regional or zonal.
155 # - For global operations, use the `globalOperations` resource.
156 # - For regional operations, use the `regionOperations` resource.
157 # - For zonal operations, use the `zonalOperations` resource.
158 #
159 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
160 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
161 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
162 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
163 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
164 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
165 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800167 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
168 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
169 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700170 },
171 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800172 },
173 &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`.
174 &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.
175 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
176 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
177 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
178 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800179 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800180 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
181 &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.
182 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
183 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
184 &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.
185 &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`.
186 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
187 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
188 &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.
189 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
190 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
191 {
192 &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.
193 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
194 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
195 {
196 &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).
197 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
198 },
199 ],
200 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
201 },
202 ],
203 &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.
204}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400205</div>
206
207<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 <code class="details" id="disableXpnResource">disableXpnResource(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700209 <pre>Disable a service resource (also known as service project) associated with this host project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400210
211Args:
212 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700213 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400214 The object takes the form of:
215
216{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800217 &quot;xpnResource&quot;: { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
218 &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).
219 &quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
220 },
221}
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400222
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223 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.
224
225For 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.
226
227The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400228
229Returns:
230 An object of the form:
231
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800233 #
234 # Google Compute Engine has three Operation resources:
235 #
236 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
237 #
238 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
239 #
240 # Operations can be global, regional or zonal.
241 # - For global operations, use the `globalOperations` resource.
242 # - For regional operations, use the `regionOperations` resource.
243 # - For zonal operations, use the `zonalOperations` resource.
244 #
245 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
246 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
247 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
248 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
249 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
250 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
251 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800253 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
254 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
255 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 },
257 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800258 },
259 &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`.
260 &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.
261 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
262 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
263 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
264 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800265 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800266 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
267 &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.
268 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
269 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
270 &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.
271 &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`.
272 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
273 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
274 &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.
275 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
276 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
277 {
278 &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.
279 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
280 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
281 {
282 &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).
283 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
284 },
285 ],
286 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
287 },
288 ],
289 &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.
290}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400291</div>
292
293<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 <code class="details" id="enableXpnHost">enableXpnHost(project, requestId=None)</code>
295 <pre>Enable this project as a shared VPC host project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400296
297Args:
298 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299 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.
300
301For 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.
302
303The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400304
305Returns:
306 An object of the form:
307
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700308 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800309 #
310 # Google Compute Engine has three Operation resources:
311 #
312 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
313 #
314 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
315 #
316 # Operations can be global, regional or zonal.
317 # - For global operations, use the `globalOperations` resource.
318 # - For regional operations, use the `regionOperations` resource.
319 # - For zonal operations, use the `zonalOperations` resource.
320 #
321 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
322 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
323 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
324 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
325 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
326 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
327 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700328 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800329 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
330 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
331 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700332 },
333 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800334 },
335 &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`.
336 &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.
337 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
338 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
339 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
340 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800341 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800342 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
343 &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.
344 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
345 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
346 &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.
347 &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`.
348 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
349 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
350 &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.
351 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
352 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
353 {
354 &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.
355 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
356 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
357 {
358 &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).
359 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
360 },
361 ],
362 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
363 },
364 ],
365 &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.
366}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400367</div>
368
369<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 <code class="details" id="enableXpnResource">enableXpnResource(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700371 <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 Cheemalapati4ba8c232017-06-06 18:46:08 -0400372
373Args:
374 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700375 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400376 The object takes the form of:
377
378{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800379 &quot;xpnResource&quot;: { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
380 &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).
381 &quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
382 },
383}
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400384
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 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.
386
387For 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.
388
389The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400390
391Returns:
392 An object of the form:
393
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800395 #
396 # Google Compute Engine has three Operation resources:
397 #
398 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
399 #
400 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
401 #
402 # Operations can be global, regional or zonal.
403 # - For global operations, use the `globalOperations` resource.
404 # - For regional operations, use the `regionOperations` resource.
405 # - For zonal operations, use the `zonalOperations` resource.
406 #
407 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
408 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
409 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
410 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
411 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
412 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
413 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700414 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800415 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
416 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
417 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700418 },
419 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800420 },
421 &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`.
422 &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.
423 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
424 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
425 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
426 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800427 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800428 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
429 &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.
430 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
431 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
432 &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.
433 &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`.
434 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
435 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
436 &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.
437 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
438 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
439 {
440 &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.
441 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
442 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
443 {
444 &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).
445 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
446 },
447 ],
448 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
449 },
450 ],
451 &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.
452}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400453</div>
454
455<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400456 <code class="details" id="get">get(project)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700457 <pre>Returns the specified Project resource.
John Asmuth614db982014-04-24 15:46:26 -0400458
459Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000460 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400461
462Returns:
463 An object of the form:
464
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 { # Represents a Project resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800466 #
467 # 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 ==)
468 &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.
469 &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.
470 #
471 # To see the latest fingerprint, make a get() request to retrieve the resource.
472 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
473 {
474 &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.
475 &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).
John Asmuth614db982014-04-24 15:46:26 -0400476 },
477 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800478 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
479 },
480 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
481 &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.
482 &quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
483 &quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
484 &quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
485 &quot;A String&quot;,
486 ],
487 &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.
488 &quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
489 &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.
490 &quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
491 { # A quotas entry.
492 &quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
493 &quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
494 &quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
495 &quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400496 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800497 ],
498 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
499 &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.
500 &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.
501 &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.
502 },
503 &quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated.
504}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400505</div>
506
507<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400508 <code class="details" id="getXpnHost">getXpnHost(project)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700509 <pre>Gets the shared VPC host project that this project links to. May be empty if no link exists.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400510
511Args:
512 project: string, Project ID for this request. (required)
513
514Returns:
515 An object of the form:
516
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700517 { # Represents a Project resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800518 #
519 # 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 ==)
520 &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.
521 &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.
522 #
523 # To see the latest fingerprint, make a get() request to retrieve the resource.
524 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
525 {
526 &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.
527 &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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400528 },
529 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800530 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
531 },
532 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
533 &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.
534 &quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
535 &quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
536 &quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
537 &quot;A String&quot;,
538 ],
539 &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.
540 &quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
541 &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.
542 &quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
543 { # A quotas entry.
544 &quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
545 &quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
546 &quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
547 &quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400548 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800549 ],
550 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
551 &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.
552 &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.
553 &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.
554 },
555 &quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated.
556}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400557</div>
558
559<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700560 <code class="details" id="getXpnResources">getXpnResources(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561 <pre>Gets service resources (a.k.a service project) associated with this host project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400562
563Args:
564 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700565 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 -0700566
Dan O'Mearadd494642020-05-01 07:42:23 -0700567For 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 -0700568
Dan O'Mearadd494642020-05-01 07:42:23 -0700569You 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 -0700570
Bu Sun Kim65020912020-05-20 12:08:20 -0700571To 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) ```
572 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`)
573 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
574
575You 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.
576
577Currently, only sorting by `name` or `creationTimestamp desc` is supported.
578 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800579 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400580
581Returns:
582 An object of the form:
583
584 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800585 &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)
586 &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.
587 &quot;resources&quot;: [ # Service resources (a.k.a service projects) attached to this project as their shared VPC host.
588 { # Service resource (a.k.a service project) ID.
589 &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).
590 &quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
591 },
592 ],
593}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400594</div>
595
596<div class="method">
597 <code class="details" id="getXpnResources_next">getXpnResources_next(previous_request, previous_response)</code>
598 <pre>Retrieves the next page of results.
599
600Args:
601 previous_request: The request for the previous page. (required)
602 previous_response: The response from the request for the previous page. (required)
603
604Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400606 page. Returns None if there are no more items in the collection.
607 </pre>
608</div>
609
610<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700611 <code class="details" id="listXpnHosts">listXpnHosts(project, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700612 <pre>Lists all shared VPC host projects visible to the user in an organization.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400613
614Args:
615 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700616 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400617 The object takes the form of:
618
619{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800620 &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.
621}
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400622
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 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 -0700624
Dan O'Mearadd494642020-05-01 07:42:23 -0700625For 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 -0700626
Dan O'Mearadd494642020-05-01 07:42:23 -0700627You 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 -0700628
Bu Sun Kim65020912020-05-20 12:08:20 -0700629To 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) ```
630 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`)
631 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
632
633You 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.
634
635Currently, only sorting by `name` or `creationTimestamp desc` is supported.
636 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.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800637 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400638
639Returns:
640 An object of the form:
641
642 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800643 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
644 &quot;items&quot;: [ # [Output Only] A list of shared VPC host project URLs.
645 { # Represents a Project resource.
646 #
647 # 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 ==)
648 &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.
649 &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.
650 #
651 # To see the latest fingerprint, make a get() request to retrieve the resource.
652 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
653 {
654 &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.
655 &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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400656 },
657 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800658 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400659 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800660 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
661 &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.
662 &quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
663 &quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
664 &quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
665 &quot;A String&quot;,
666 ],
667 &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.
668 &quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
669 &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.
670 &quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
671 { # A quotas entry.
672 &quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
673 &quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
674 &quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
675 &quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 },
677 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800678 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
679 &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.
680 &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.
681 &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.
682 },
683 &quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700684 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800685 ],
686 &quot;kind&quot;: &quot;compute#xpnHostList&quot;, # [Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.
687 &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.
688 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
689 &quot;warning&quot;: { # [Output Only] Informational warning message.
690 &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.
691 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
692 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
693 {
694 &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).
695 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
696 },
697 ],
698 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
699 },
700}</pre>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400701</div>
702
703<div class="method">
704 <code class="details" id="listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</code>
705 <pre>Retrieves the next page of results.
706
707Args:
708 previous_request: The request for the previous page. (required)
709 previous_response: The response from the request for the previous page. (required)
710
711Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700712 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400713 page. Returns None if there are no more items in the collection.
714 </pre>
715</div>
716
717<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 <code class="details" id="moveDisk">moveDisk(project, body=None, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000719 <pre>Moves a persistent disk from one zone to another.
720
721Args:
722 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700723 body: object, The request body.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000724 The object takes the form of:
725
726{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800727 &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:
728 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
729 # - projects/project/zones/zone
730 # - zones/zone
731 &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:
732 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
733 # - projects/project/zones/zone/disks/disk
734 # - zones/zone/disks/disk
735}
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000736
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737 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.
738
739For 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.
740
741The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000742
743Returns:
744 An object of the form:
745
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800747 #
748 # Google Compute Engine has three Operation resources:
749 #
750 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
751 #
752 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
753 #
754 # Operations can be global, regional or zonal.
755 # - For global operations, use the `globalOperations` resource.
756 # - For regional operations, use the `regionOperations` resource.
757 # - For zonal operations, use the `zonalOperations` resource.
758 #
759 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
760 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
761 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
762 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
763 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
764 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
765 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800767 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
768 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
769 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 },
771 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800772 },
773 &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`.
774 &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.
775 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
776 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
777 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
778 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800779 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800780 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
781 &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.
782 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
783 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
784 &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.
785 &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`.
786 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
787 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
788 &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.
789 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
790 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
791 {
792 &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.
793 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
794 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
795 {
796 &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).
797 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
798 },
799 ],
800 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
801 },
802 ],
803 &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.
804}</pre>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000805</div>
806
807<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700808 <code class="details" id="moveInstance">moveInstance(project, body=None, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000809 <pre>Moves an instance and its attached persistent disks from one zone to another.
810
811Args:
812 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700813 body: object, The request body.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000814 The object takes the form of:
815
816{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800817 &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:
818 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
819 # - projects/project/zones/zone
820 # - zones/zone
821 &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:
822 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
823 # - projects/project/zones/zone/instances/instance
824 # - zones/zone/instances/instance
825}
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000826
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700827 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.
828
829For 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.
830
831The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000832
833Returns:
834 An object of the form:
835
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700836 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800837 #
838 # Google Compute Engine has three Operation resources:
839 #
840 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
841 #
842 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
843 #
844 # Operations can be global, regional or zonal.
845 # - For global operations, use the `globalOperations` resource.
846 # - For regional operations, use the `regionOperations` resource.
847 # - For zonal operations, use the `zonalOperations` resource.
848 #
849 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
850 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
851 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
852 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
853 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
854 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
855 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800857 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
858 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
859 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700860 },
861 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800862 },
863 &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`.
864 &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.
865 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
866 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
867 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
868 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800869 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800870 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
871 &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.
872 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
873 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
874 &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.
875 &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`.
876 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
877 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
878 &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.
879 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
880 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
881 {
882 &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.
883 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
884 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
885 {
886 &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).
887 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
888 },
889 ],
890 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
891 },
892 ],
893 &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.
894}</pre>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000895</div>
896
897<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700898 <code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400899 <pre>Sets metadata common to all instances within the specified project using the data included in the request.
900
901Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000902 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400904 The object takes the form of:
905
906{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700907 &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 -0700908 #
909 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700910 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
911 {
912 &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.
913 &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).
914 },
915 ],
916 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
John Asmuth614db982014-04-24 15:46:26 -0400917}
918
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700919 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.
920
921For 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.
922
923The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400924
925Returns:
926 An object of the form:
927
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700928 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800929 #
930 # Google Compute Engine has three Operation resources:
931 #
932 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
933 #
934 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
935 #
936 # Operations can be global, regional or zonal.
937 # - For global operations, use the `globalOperations` resource.
938 # - For regional operations, use the `regionOperations` resource.
939 # - For zonal operations, use the `zonalOperations` resource.
940 #
941 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
942 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
943 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
944 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
945 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
946 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
947 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800949 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
950 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
951 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700952 },
953 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800954 },
955 &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`.
956 &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.
957 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
958 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
959 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
960 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -0800961 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800962 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
963 &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.
964 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
965 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
966 &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.
967 &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`.
968 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
969 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
970 &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.
971 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
972 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
973 {
974 &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.
975 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
976 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
977 {
978 &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).
979 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
980 },
981 ],
982 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
983 },
984 ],
985 &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.
986}</pre>
John Asmuth614db982014-04-24 15:46:26 -0400987</div>
988
Craig Citro065b5302014-08-14 00:47:23 -0700989<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700990 <code class="details" id="setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700991 <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.
992
993Args:
994 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700995 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700996 The object takes the form of:
997
998{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800999 &quot;networkTier&quot;: &quot;A String&quot;, # Default network tier to be set.
1000}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001001
1002 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.
1003
1004For 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.
1005
1006The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1007
1008Returns:
1009 An object of the form:
1010
1011 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001012 #
1013 # Google Compute Engine has three Operation resources:
1014 #
1015 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1016 #
1017 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1018 #
1019 # Operations can be global, regional or zonal.
1020 # - For global operations, use the `globalOperations` resource.
1021 # - For regional operations, use the `regionOperations` resource.
1022 # - For zonal operations, use the `zonalOperations` resource.
1023 #
1024 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1025 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1026 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1027 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1028 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1029 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1030 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001031 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001032 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1033 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1034 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001035 },
1036 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001037 },
1038 &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`.
1039 &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.
1040 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1041 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1042 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1043 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001044 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001045 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1046 &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.
1047 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1048 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1049 &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.
1050 &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`.
1051 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1052 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1053 &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.
1054 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1055 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1056 {
1057 &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.
1058 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1059 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1060 {
1061 &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).
1062 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1063 },
1064 ],
1065 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1066 },
1067 ],
1068 &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.
1069}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001070</div>
1071
1072<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001073 <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body=None, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001074 <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.
Craig Citro065b5302014-08-14 00:47:23 -07001075
1076Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001077 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001078 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07001079 The object takes the form of:
1080
1081{ # 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 -07001082 &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.
1083 &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 Cheemalapati4ba8c232017-06-06 18:46:08 -04001084}
Craig Citro065b5302014-08-14 00:47:23 -07001085
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001086 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.
1087
1088For 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.
1089
1090The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -07001091
1092Returns:
1093 An object of the form:
1094
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001096 #
1097 # Google Compute Engine has three Operation resources:
1098 #
1099 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1100 #
1101 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1102 #
1103 # Operations can be global, regional or zonal.
1104 # - For global operations, use the `globalOperations` resource.
1105 # - For regional operations, use the `regionOperations` resource.
1106 # - For zonal operations, use the `zonalOperations` resource.
1107 #
1108 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1109 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1110 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1111 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1112 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1113 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1114 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001115 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001116 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1117 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1118 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001119 },
1120 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001121 },
1122 &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`.
1123 &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.
1124 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1125 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1126 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1127 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
yoshi-code-botb6dc1b92021-03-02 11:49:08 -08001128 &quot;operationGroupId&quot;: &quot;A String&quot;, # [Output Only] An ID that represents a group of operations, such as when a group of operations results from a `bulkInsert` API request.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001129 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1130 &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.
1131 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1132 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1133 &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.
1134 &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`.
1135 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1136 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1137 &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.
1138 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1139 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1140 {
1141 &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.
1142 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1143 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1144 {
1145 &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).
1146 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1147 },
1148 ],
1149 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1150 },
1151 ],
1152 &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.
1153}</pre>
Craig Citro065b5302014-08-14 00:47:23 -07001154</div>
1155
John Asmuth614db982014-04-24 15:46:26 -04001156</body></html>