blob: 6d953d9a81468d3167839cea7130962fd4b2bf79 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.projects.html">projects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#disableXpnHost">disableXpnHost(project, requestId=None)</a></code></p>
79<p class="firstline">Disable this project as a shared VPC host project.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#disableXpnResource">disableXpnResource(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Disable a service resource (also known as service project) associated with this host project.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040083<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#enableXpnHost">enableXpnHost(project, requestId=None)</a></code></p>
85<p class="firstline">Enable this project as a shared VPC host project.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#enableXpnResource">enableXpnResource(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040089<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070090 <code><a href="#get">get(project)</a></code></p>
91<p class="firstline">Returns the specified Project resource.</p>
92<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080093 <code><a href="#getXpnHost">getXpnHost(project)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Gets the shared VPC host project that this project links to. May be empty if no link exists.</p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080095<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#getXpnResources">getXpnResources(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Gets service resources (a.k.a service project) associated with this host project.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040098<p class="toc_element">
99 <code><a href="#getXpnResources_next">getXpnResources_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#listXpnHosts">listXpnHosts(project, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Lists all shared VPC host projects visible to the user in an organization.</p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800104<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400105 <code><a href="#listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#moveDisk">moveDisk(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109<p class="firstline">Moves a persistent disk from one zone to another.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#moveInstance">moveInstance(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Moves an instance and its attached persistent disks from one zone to another.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Sets metadata common to all instances within the specified project using the data included in the request.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118<p class="firstline">Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#setUsageExportBucket">setUsageExportBucket(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700121<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>
122<h3>Method Details</h3>
123<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 <code class="details" id="disableXpnHost">disableXpnHost(project, requestId=None)</code>
125 <pre>Disable this project as a shared VPC host project.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400126
127Args:
128 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 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.
130
131For 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.
132
133The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400134
135Returns:
136 An object of the form:
137
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 { # Represents an Operation resource.
139 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700140 # Google Compute Engine has three Operation resources:
141 #
142 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
143 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
145 #
146 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 # - For global operations, use the `globalOperations` resource.
148 # - For regional operations, use the `regionOperations` resource.
149 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700151 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
153 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
154 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
155 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
156 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
157 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400158 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
160 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
161 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400162 },
163 ],
164 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &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`.
166 &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.
167 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
168 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
169 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
170 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
171 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
172 &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.
173 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
174 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
175 &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.
176 &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`.
177 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
178 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
179 &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.
180 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
181 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
182 {
183 &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.
184 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
185 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
186 {
187 &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).
188 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
189 },
190 ],
191 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
192 },
193 ],
194 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400195 }</pre>
196</div>
197
198<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700199 <code class="details" id="disableXpnResource">disableXpnResource(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 <pre>Disable a service resource (also known as service project) associated with this host project.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400201
202Args:
203 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700204 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400205 The object takes the form of:
206
207{
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 &quot;xpnResource&quot;: { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
209 &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).
210 &quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400211 },
212 }
213
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214 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.
215
216For 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.
217
218The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400219
220Returns:
221 An object of the form:
222
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223 { # Represents an Operation resource.
224 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 # Google Compute Engine has three Operation resources:
226 #
227 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
228 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
230 #
231 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 # - For global operations, use the `globalOperations` resource.
233 # - For regional operations, use the `regionOperations` resource.
234 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700235 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700236 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700237 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
238 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
239 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
240 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
241 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
242 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400243 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700244 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
245 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
246 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400247 },
248 ],
249 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &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`.
251 &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.
252 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
253 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
254 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
255 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
256 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
257 &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.
258 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
259 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
260 &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.
261 &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`.
262 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
263 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
264 &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.
265 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
266 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
267 {
268 &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.
269 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
270 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
271 {
272 &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).
273 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
274 },
275 ],
276 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
277 },
278 ],
279 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400280 }</pre>
281</div>
282
283<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 <code class="details" id="enableXpnHost">enableXpnHost(project, requestId=None)</code>
285 <pre>Enable this project as a shared VPC host project.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400286
287Args:
288 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 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.
290
291For 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.
292
293The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400294
295Returns:
296 An object of the form:
297
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 { # Represents an Operation resource.
299 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 # Google Compute Engine has three Operation resources:
301 #
302 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
303 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
305 #
306 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700307 # - For global operations, use the `globalOperations` resource.
308 # - For regional operations, use the `regionOperations` resource.
309 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700311 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
313 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
314 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
315 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
316 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
317 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400318 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700319 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
320 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
321 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400322 },
323 ],
324 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700325 &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`.
326 &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.
327 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
328 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
329 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
330 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
331 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
332 &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.
333 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
334 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
335 &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.
336 &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`.
337 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
338 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
339 &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.
340 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
341 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
342 {
343 &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.
344 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
345 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
346 {
347 &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).
348 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
349 },
350 ],
351 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
352 },
353 ],
354 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400355 }</pre>
356</div>
357
358<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700359 <code class="details" id="enableXpnResource">enableXpnResource(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 <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 Cheemalapatic30d2b52017-03-13 12:12:03 -0400361
362Args:
363 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700364 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400365 The object takes the form of:
366
367{
Bu Sun Kim65020912020-05-20 12:08:20 -0700368 &quot;xpnResource&quot;: { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
369 &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).
370 &quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400371 },
372 }
373
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 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.
375
376For 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.
377
378The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400379
380Returns:
381 An object of the form:
382
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 { # Represents an Operation resource.
384 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700385 # Google Compute Engine has three Operation resources:
386 #
387 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
388 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
390 #
391 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700392 # - For global operations, use the `globalOperations` resource.
393 # - For regional operations, use the `regionOperations` resource.
394 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700396 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700397 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
398 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
399 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
400 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
401 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
402 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400403 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700404 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
405 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
406 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400407 },
408 ],
409 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &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`.
411 &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.
412 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
413 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
414 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
415 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
416 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
417 &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.
418 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
419 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
420 &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.
421 &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`.
422 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
423 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
424 &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.
425 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
426 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
427 {
428 &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.
429 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
430 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
431 {
432 &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).
433 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
434 },
435 ],
436 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
437 },
438 ],
439 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400440 }</pre>
441</div>
442
443<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700444 <code class="details" id="get">get(project)</code>
445 <pre>Returns the specified Project resource.
446
447Args:
448 project: string, Project ID for this request. (required)
449
450Returns:
451 An object of the form:
452
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700453 { # Represents a Project resource.
454 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700455 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 &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.
457 &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 -0700458 #
459 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
461 {
462 &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.
463 &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).
464 },
465 ],
466 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700467 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700468 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
469 &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.
470 &quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
471 &quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
472 &quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
473 &quot;A String&quot;,
474 ],
475 &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.
476 &quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
477 &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.
478 &quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700479 { # A quotas entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700480 &quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
481 &quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
482 &quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
483 &quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700484 },
485 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
487 &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.
488 &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.
489 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800490 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700491 &quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700492 }</pre>
493</div>
494
495<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800496 <code class="details" id="getXpnHost">getXpnHost(project)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 <pre>Gets the shared VPC host project that this project links to. May be empty if no link exists.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800498
499Args:
500 project: string, Project ID for this request. (required)
501
502Returns:
503 An object of the form:
504
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 { # Represents a Project resource.
506 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700507 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700508 &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.
509 &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 -0700510 #
511 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
513 {
514 &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.
515 &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).
516 },
517 ],
518 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800519 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
521 &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.
522 &quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
523 &quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
524 &quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
525 &quot;A String&quot;,
526 ],
527 &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.
528 &quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
529 &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.
530 &quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800531 { # A quotas entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 &quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
533 &quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
534 &quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
535 &quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800536 },
537 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700538 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
539 &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.
540 &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.
541 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800542 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800544 }</pre>
545</div>
546
547<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700548 <code class="details" id="getXpnResources">getXpnResources(project, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700549 <pre>Gets service resources (a.k.a service project) associated with this host project.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400550
551Args:
552 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700553 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 -0700554
Dan O'Mearadd494642020-05-01 07:42:23 -0700555For 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 -0700556
Dan O'Mearadd494642020-05-01 07:42:23 -0700557You 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 -0700558
Bu Sun Kim65020912020-05-20 12:08:20 -0700559To 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) ```
560 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`)
561 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
562
563You 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.
564
565Currently, only sorting by `name` or `creationTimestamp desc` is supported.
566 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400567
568Returns:
569 An object of the form:
570
571 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 &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)
573 &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.
574 &quot;resources&quot;: [ # Service resources (a.k.a service projects) attached to this project as their shared VPC host.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700575 { # Service resource (a.k.a service project) ID.
Bu Sun Kim65020912020-05-20 12:08:20 -0700576 &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).
577 &quot;type&quot;: &quot;A String&quot;, # The type of the service resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400578 },
579 ],
580 }</pre>
581</div>
582
583<div class="method">
584 <code class="details" id="getXpnResources_next">getXpnResources_next(previous_request, previous_response)</code>
585 <pre>Retrieves the next page of results.
586
587Args:
588 previous_request: The request for the previous page. (required)
589 previous_response: The response from the request for the previous page. (required)
590
591Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700592 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400593 page. Returns None if there are no more items in the collection.
594 </pre>
595</div>
596
597<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 <code class="details" id="listXpnHosts">listXpnHosts(project, body=None, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700599 <pre>Lists all shared VPC host projects visible to the user in an organization.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800600
601Args:
602 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700603 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800604 The object takes the form of:
605
606{
Bu Sun Kim65020912020-05-20 12:08:20 -0700607 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800608 }
609
Dan O'Mearadd494642020-05-01 07:42:23 -0700610 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 -0700611
Dan O'Mearadd494642020-05-01 07:42:23 -0700612For 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 -0700613
Dan O'Mearadd494642020-05-01 07:42:23 -0700614You 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 -0700615
Bu Sun Kim65020912020-05-20 12:08:20 -0700616To 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) ```
617 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`)
618 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
619
620You 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.
621
622Currently, only sorting by `name` or `creationTimestamp desc` is supported.
623 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800624
625Returns:
626 An object of the form:
627
628 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
630 &quot;items&quot;: [ # [Output Only] A list of shared VPC host project URLs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631 { # Represents a Project resource.
632 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700633 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700634 &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.
635 &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 -0700636 #
637 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700638 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
639 {
640 &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.
641 &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).
642 },
643 ],
644 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800645 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
647 &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.
648 &quot;defaultServiceAccount&quot;: &quot;A String&quot;, # [Output Only] Default service account used by VMs running in this project.
649 &quot;description&quot;: &quot;A String&quot;, # An optional textual description of the resource.
650 &quot;enabledFeatures&quot;: [ # Restricted features enabled for use on this project.
651 &quot;A String&quot;,
652 ],
653 &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.
654 &quot;kind&quot;: &quot;compute#project&quot;, # [Output Only] Type of the resource. Always compute#project for projects.
655 &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.
656 &quot;quotas&quot;: [ # [Output Only] Quotas assigned to this project.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800657 { # A quotas entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700658 &quot;limit&quot;: 3.14, # [Output Only] Quota limit for this metric.
659 &quot;metric&quot;: &quot;A String&quot;, # [Output Only] Name of the quota metric.
660 &quot;owner&quot;: &quot;A String&quot;, # [Output Only] Owning resource. This is the resource on which this quota is applied.
661 &quot;usage&quot;: 3.14, # [Output Only] Current usage of this metric.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800662 },
663 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700664 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
665 &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.
666 &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.
667 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800668 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 &quot;xpnProjectStatus&quot;: &quot;A String&quot;, # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800670 },
671 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700672 &quot;kind&quot;: &quot;compute#xpnHostList&quot;, # [Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.
673 &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.
674 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
675 &quot;warning&quot;: { # [Output Only] Informational warning message.
676 &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.
677 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
678 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700679 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700680 &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).
681 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 },
683 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700684 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700685 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800686 }</pre>
687</div>
688
689<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400690 <code class="details" id="listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</code>
691 <pre>Retrieves the next page of results.
692
693Args:
694 previous_request: The request for the previous page. (required)
695 previous_response: The response from the request for the previous page. (required)
696
697Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400699 page. Returns None if there are no more items in the collection.
700 </pre>
701</div>
702
703<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 <code class="details" id="moveDisk">moveDisk(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700705 <pre>Moves a persistent disk from one zone to another.
706
707Args:
708 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700709 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700710 The object takes the form of:
711
712{
Bu Sun Kim65020912020-05-20 12:08:20 -0700713 &quot;destinationZone&quot;: &quot;A String&quot;, # The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700714 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
715 # - projects/project/zones/zone
716 # - zones/zone
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &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:
718 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
719 # - projects/project/zones/zone/disks/disk
720 # - zones/zone/disks/disk
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700721 }
722
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700723 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.
724
725For 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.
726
727The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700728
729Returns:
730 An object of the form:
731
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700732 { # Represents an Operation resource.
733 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700734 # Google Compute Engine has three Operation resources:
735 #
736 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
737 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700738 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
739 #
740 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700741 # - For global operations, use the `globalOperations` resource.
742 # - For regional operations, use the `regionOperations` resource.
743 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700745 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700746 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
747 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
748 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
749 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
750 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
751 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700752 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
754 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
755 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700756 },
757 ],
758 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 &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`.
760 &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.
761 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
762 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
763 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
764 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
765 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
766 &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.
767 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
768 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
769 &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.
770 &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`.
771 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
772 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
773 &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.
774 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
775 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
776 {
777 &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.
778 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
779 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
780 {
781 &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).
782 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
783 },
784 ],
785 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
786 },
787 ],
788 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700789 }</pre>
790</div>
791
792<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700793 <code class="details" id="moveInstance">moveInstance(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700794 <pre>Moves an instance and its attached persistent disks from one zone to another.
795
796Args:
797 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700798 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700799 The object takes the form of:
800
801{
Bu Sun Kim65020912020-05-20 12:08:20 -0700802 &quot;destinationZone&quot;: &quot;A String&quot;, # The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone:
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700803 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
804 # - projects/project/zones/zone
805 # - zones/zone
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 &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:
807 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
808 # - projects/project/zones/zone/instances/instance
809 # - zones/zone/instances/instance
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700810 }
811
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700812 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.
813
814For 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.
815
816The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700817
818Returns:
819 An object of the form:
820
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700821 { # Represents an Operation resource.
822 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700823 # Google Compute Engine has three Operation resources:
824 #
825 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
826 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700827 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
828 #
829 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700830 # - For global operations, use the `globalOperations` resource.
831 # - For regional operations, use the `regionOperations` resource.
832 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700833 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700834 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700835 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
836 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
837 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
838 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
839 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
840 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700841 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700842 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
843 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
844 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700845 },
846 ],
847 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 &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`.
849 &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.
850 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
851 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
852 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
853 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
854 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
855 &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.
856 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
857 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
858 &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.
859 &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`.
860 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
861 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
862 &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.
863 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
864 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
865 {
866 &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.
867 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
868 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
869 {
870 &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).
871 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
872 },
873 ],
874 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
875 },
876 ],
877 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700878 }</pre>
879</div>
880
881<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700882 <code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700883 <pre>Sets metadata common to all instances within the specified project using the data included in the request.
884
885Args:
886 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700887 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700888 The object takes the form of:
889
890{ # A metadata key/value entry.
Bu Sun Kim65020912020-05-20 12:08:20 -0700891 &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 -0700892 #
893 # To see the latest fingerprint, make a get() request to retrieve the resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 &quot;items&quot;: [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
895 {
896 &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.
897 &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).
898 },
899 ],
900 &quot;kind&quot;: &quot;compute#metadata&quot;, # [Output Only] Type of the resource. Always compute#metadata for metadata.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700901}
902
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700903 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.
904
905For 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.
906
907The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700908
909Returns:
910 An object of the form:
911
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 { # Represents an Operation resource.
913 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700914 # Google Compute Engine has three Operation resources:
915 #
916 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
917 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
919 #
920 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700921 # - For global operations, use the `globalOperations` resource.
922 # - For regional operations, use the `regionOperations` resource.
923 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700924 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700925 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
927 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
928 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
929 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
930 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
931 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700932 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700933 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
934 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
935 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700936 },
937 ],
938 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 &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`.
940 &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.
941 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
942 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
943 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
944 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
945 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
946 &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.
947 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
948 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
949 &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.
950 &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`.
951 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
952 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
953 &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.
954 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
955 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
956 {
957 &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.
958 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
959 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
960 {
961 &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).
962 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
963 },
964 ],
965 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
966 },
967 ],
968 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700969 }</pre>
970</div>
971
972<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700973 <code class="details" id="setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700974 <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.
975
976Args:
977 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700978 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 The object takes the form of:
980
981{
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 &quot;networkTier&quot;: &quot;A String&quot;, # Default network tier to be set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700983 }
984
985 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.
986
987For 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.
988
989The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
990
991Returns:
992 An object of the form:
993
994 { # Represents an Operation resource.
995 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700996 # Google Compute Engine has three Operation resources:
997 #
998 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
999 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001000 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1001 #
1002 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001003 # - For global operations, use the `globalOperations` resource.
1004 # - For regional operations, use the `regionOperations` resource.
1005 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001006 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001007 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001008 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1009 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1010 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1011 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1012 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1013 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001014 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001015 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1016 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1017 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 },
1019 ],
1020 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001021 &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`.
1022 &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.
1023 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1024 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1025 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1026 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1027 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1028 &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.
1029 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1030 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1031 &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.
1032 &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`.
1033 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1034 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1035 &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.
1036 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1037 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1038 {
1039 &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.
1040 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1041 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1042 {
1043 &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).
1044 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1045 },
1046 ],
1047 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1048 },
1049 ],
1050 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001051 }</pre>
1052</div>
1053
1054<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001055 <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001056 <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.
1057
1058Args:
1059 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001060 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001061 The object takes the form of:
1062
1063{ # 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 -07001064 &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.
1065 &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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001066}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001067
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001068 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.
1069
1070For 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.
1071
1072The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001073
1074Returns:
1075 An object of the form:
1076
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001077 { # Represents an Operation resource.
1078 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001079 # Google Compute Engine has three Operation resources:
1080 #
1081 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1082 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001083 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1084 #
1085 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001086 # - For global operations, use the `globalOperations` resource.
1087 # - For regional operations, use the `regionOperations` resource.
1088 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001089 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001090 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001091 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1092 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1093 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1094 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1095 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1096 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001097 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001098 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1099 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1100 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001101 },
1102 ],
1103 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001104 &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`.
1105 &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.
1106 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1107 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1108 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1109 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1110 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1111 &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.
1112 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1113 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1114 &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.
1115 &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`.
1116 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1117 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1118 &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.
1119 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1120 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1121 {
1122 &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.
1123 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1124 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1125 {
1126 &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).
1127 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1128 },
1129 ],
1130 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1131 },
1132 ],
1133 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001134 }</pre>
1135</div>
1136
1137</body></html>