blob: 52c53e32c18a73d70dc3ebe87d3004005f364452 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.projects.html">projects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 Cheemalapati4ba8c232017-06-06 18:46:08 -040089<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -040090 <code><a href="#get">get(project)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070091<p class="firstline">Returns the specified Project resource.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040093 <code><a href="#getXpnHost">getXpnHost(project)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Gets the shared VPC host project that this project links to. May be empty if no link exists.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#getXpnResources">getXpnResources(project, orderBy=None, maxResults=None, pageToken=None, filter=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 Cheemalapati4ba8c232017-06-06 18:46:08 -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">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#listXpnHosts">listXpnHosts(project, body=None, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Lists all shared VPC host projects visible to the user in an organization.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400104<p class="toc_element">
105 <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>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000109<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>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000112<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>
John Asmuth614db982014-04-24 15:46:26 -0400115<p class="firstline">Sets metadata common to all instances within the specified project using the data included in the request.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700116<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>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000121<p class="firstline">Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.</p>
John Asmuth614db982014-04-24 15:46:26 -0400122<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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400152 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400154 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700155 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700156 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400157 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700158 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
159 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400160 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700161 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400162 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700163 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400164 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
165 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
166 {
167 "message": "A String", # [Output Only] A human-readable description of the warning code.
168 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
169 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
170 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
171 {
172 "value": "A String", # [Output Only] A warning data value corresponding to the key.
173 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
174 },
175 ],
176 },
177 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700178 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400179 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
181 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400183 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
184 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
185 {
186 "message": "A String", # [Output Only] An optional, human-readable error message.
187 "code": "A String", # [Output Only] The error type identifier for this error.
188 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
189 },
190 ],
191 },
192 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
193 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
194 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
195 }</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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 Cheemalapati4ba8c232017-06-06 18:46:08 -0400205 The object takes the form of:
206
207{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208 "xpnResource": { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
209 "type": "A String", # The type of the service resource.
210 "id": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400237 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700238 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400239 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700241 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400242 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700243 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
244 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400245 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400247 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700248 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400249 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
250 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
251 {
252 "message": "A String", # [Output Only] A human-readable description of the warning code.
253 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
254 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
255 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
256 {
257 "value": "A String", # [Output Only] A warning data value corresponding to the key.
258 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
259 },
260 ],
261 },
262 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400264 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700265 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
266 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700267 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400268 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
269 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
270 {
271 "message": "A String", # [Output Only] An optional, human-readable error message.
272 "code": "A String", # [Output Only] The error type identifier for this error.
273 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
274 },
275 ],
276 },
277 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
278 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
279 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
280 }</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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400312 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400314 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700315 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400317 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700318 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
319 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400320 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400322 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700323 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400324 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
325 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
326 {
327 "message": "A String", # [Output Only] A human-readable description of the warning code.
328 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
329 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
330 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
331 {
332 "value": "A String", # [Output Only] A warning data value corresponding to the key.
333 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
334 },
335 ],
336 },
337 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700338 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400339 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
341 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400343 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
344 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
345 {
346 "message": "A String", # [Output Only] An optional, human-readable error message.
347 "code": "A String", # [Output Only] The error type identifier for this error.
348 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
349 },
350 ],
351 },
352 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
353 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
354 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
355 }</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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 Cheemalapati4ba8c232017-06-06 18:46:08 -0400365 The object takes the form of:
366
367{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700368 "xpnResource": { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
369 "type": "A String", # The type of the service resource.
370 "id": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -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 Cheemalapati4ba8c232017-06-06 18:46:08 -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 ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400397 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700398 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400399 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700400 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400402 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700403 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
404 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400405 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700406 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400407 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700408 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400409 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
410 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
411 {
412 "message": "A String", # [Output Only] A human-readable description of the warning code.
413 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
414 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
415 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
416 {
417 "value": "A String", # [Output Only] A warning data value corresponding to the key.
418 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
419 },
420 ],
421 },
422 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700423 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400424 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700425 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
426 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400428 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
429 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
430 {
431 "message": "A String", # [Output Only] An optional, human-readable error message.
432 "code": "A String", # [Output Only] The error type identifier for this error.
433 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
434 },
435 ],
436 },
437 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
438 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
439 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
440 }</pre>
441</div>
442
443<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400444 <code class="details" id="get">get(project)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700445 <pre>Returns the specified Project resource.
John Asmuth614db982014-04-24 15:46:26 -0400446
447Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000448 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400449
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 ==)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000456 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700457 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
Takashi Matsuo06694102015-09-11 13:55:40 -0700458 "enabledFeatures": [ # Restricted features enabled for use on this project.
459 "A String",
460 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000461 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
John Asmuth614db982014-04-24 15:46:26 -0400462 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
463 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700464 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
John Asmuth614db982014-04-24 15:46:26 -0400465 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
466 },
467 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000468 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
470 #
471 # To see the latest fingerprint, make a get() request to retrieve the resource.
John Asmuth614db982014-04-24 15:46:26 -0400472 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000473 "quotas": [ # [Output Only] Quotas assigned to this project.
John Asmuth614db982014-04-24 15:46:26 -0400474 { # A quotas entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700475 "owner": "A String", # [Output Only] Owning resource. This is the resource on which this quota is applied.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000476 "usage": 3.14, # [Output Only] Current usage of this metric.
477 "metric": "A String", # [Output Only] Name of the quota metric.
478 "limit": 3.14, # [Output Only] Quota limit for this metric.
John Asmuth614db982014-04-24 15:46:26 -0400479 },
480 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800481 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
482 "usageExportLocation": { # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400483 "bucketName": "A String", # 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.
484 "reportNamePrefix": "A String", # 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.
485 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700486 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
487 "defaultNetworkTier": "A String", # 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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000488 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800489 "id": "A String", # [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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700490 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
491 "description": "A String", # An optional textual description of the resource.
John Asmuth614db982014-04-24 15:46:26 -0400492 }</pre>
493</div>
494
495<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400496 <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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400498
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 ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400508 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
509 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
510 "enabledFeatures": [ # Restricted features enabled for use on this project.
511 "A String",
512 ],
513 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
514 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
515 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700516 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400517 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
518 },
519 ],
520 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700521 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
522 #
523 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400524 },
525 "quotas": [ # [Output Only] Quotas assigned to this project.
526 { # A quotas entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700527 "owner": "A String", # [Output Only] Owning resource. This is the resource on which this quota is applied.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400528 "usage": 3.14, # [Output Only] Current usage of this metric.
529 "metric": "A String", # [Output Only] Name of the quota metric.
530 "limit": 3.14, # [Output Only] Quota limit for this metric.
531 },
532 ],
533 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
534 "usageExportLocation": { # 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.
535 "bucketName": "A String", # 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.
536 "reportNamePrefix": "A String", # 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.
537 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700538 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
539 "defaultNetworkTier": "A String", # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400540 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
541 "id": "A String", # [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.
542 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
543 "description": "A String", # An optional textual description of the resource.
544 }</pre>
545</div>
546
547<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700548 <code class="details" id="getXpnResources">getXpnResources(project, orderBy=None, maxResults=None, pageToken=None, filter=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 Cheemalapati4ba8c232017-06-06 18:46:08 -0400550
551Args:
552 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700553 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700554
Dan O'Mearadd494642020-05-01 07:42:23 -0700555You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556
Dan O'Mearadd494642020-05-01 07:42:23 -0700557Currently, only sorting by `name` or `creationTimestamp desc` is supported.
558 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`)
559 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.
560 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561
Dan O'Mearadd494642020-05-01 07:42:23 -0700562For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563
Dan O'Mearadd494642020-05-01 07:42:23 -0700564You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565
Dan O'Mearadd494642020-05-01 07:42:23 -0700566To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400567
568Returns:
569 An object of the form:
570
571 {
572 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 "kind": "compute#projectsGetXpnResources", # [Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)
574 "resources": [ # Service resources (a.k.a service projects) attached to this project as their shared VPC host.
575 { # Service resource (a.k.a service project) ID.
576 "type": "A String", # The type of the service resource.
577 "id": "A String", # 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).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -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:
592 A request object that you can call 'execute()' on to request the next
593 page. Returns None if there are no more items in the collection.
594 </pre>
595</div>
596
597<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700598 <code class="details" id="listXpnHosts">listXpnHosts(project, body=None, orderBy=None, maxResults=None, pageToken=None, filter=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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400600
601Args:
602 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700603 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400604 The object takes the form of:
605
606{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 "organization": "A String", # Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400608 }
609
Dan O'Mearadd494642020-05-01 07:42:23 -0700610 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611
Dan O'Mearadd494642020-05-01 07:42:23 -0700612You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700613
Dan O'Mearadd494642020-05-01 07:42:23 -0700614Currently, only sorting by `name` or `creationTimestamp desc` is supported.
615 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`)
616 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.
617 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700618
Dan O'Mearadd494642020-05-01 07:42:23 -0700619For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700620
Dan O'Mearadd494642020-05-01 07:42:23 -0700621You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622
Dan O'Mearadd494642020-05-01 07:42:23 -0700623To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400624
625Returns:
626 An object of the form:
627
628 {
629 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 "kind": "compute#xpnHostList", # [Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.
631 "items": [ # [Output Only] A list of shared VPC host project URLs.
632 { # Represents a Project resource.
633 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700634 # 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 ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400635 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
636 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
637 "enabledFeatures": [ # Restricted features enabled for use on this project.
638 "A String",
639 ],
640 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
641 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
642 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400644 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
645 },
646 ],
647 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700648 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
649 #
650 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400651 },
652 "quotas": [ # [Output Only] Quotas assigned to this project.
653 { # A quotas entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700654 "owner": "A String", # [Output Only] Owning resource. This is the resource on which this quota is applied.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400655 "usage": 3.14, # [Output Only] Current usage of this metric.
656 "metric": "A String", # [Output Only] Name of the quota metric.
657 "limit": 3.14, # [Output Only] Quota limit for this metric.
658 },
659 ],
660 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
661 "usageExportLocation": { # 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.
662 "bucketName": "A String", # 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.
663 "reportNamePrefix": "A String", # 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.
664 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
666 "defaultNetworkTier": "A String", # 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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400667 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
668 "id": "A String", # [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.
669 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
670 "description": "A String", # An optional textual description of the resource.
671 },
672 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700673 "warning": { # [Output Only] Informational warning message.
674 "message": "A String", # [Output Only] A human-readable description of the warning code.
675 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
676 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
677 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
678 {
679 "value": "A String", # [Output Only] A warning data value corresponding to the key.
680 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
681 },
682 ],
683 },
684 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400685 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
686 }</pre>
687</div>
688
689<div class="method">
690 <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:
698 A request object that you can call 'execute()' on to request the next
699 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>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000705 <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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000710 The object takes the form of:
711
712{
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000713 "targetDisk": "A String", # 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:
714 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
715 # - projects/project/zones/zone/disks/disk
716 # - zones/zone/disks/disk
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800717 "destinationZone": "A String", # 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:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000718 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
719 # - projects/project/zones/zone
720 # - zones/zone
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000721 }
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).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000728
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 ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800746 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700747 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400748 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700749 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700750 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800751 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700752 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
753 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800754 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700755 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000756 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700757 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800758 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000759 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
760 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800761 "message": "A String", # [Output Only] A human-readable description of the warning code.
762 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
763 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
764 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000765 {
766 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700767 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000768 },
769 ],
770 },
771 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700772 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800773 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700774 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
775 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700776 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000777 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
778 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
779 {
780 "message": "A String", # [Output Only] An optional, human-readable error message.
781 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700782 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000783 },
784 ],
785 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800786 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700787 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800788 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000789 }</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>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000794 <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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000799 The object takes the form of:
800
801{
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000802 "targetInstance": "A String", # 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:
803 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
804 # - projects/project/zones/zone/instances/instance
805 # - zones/zone/instances/instance
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800806 "destinationZone": "A String", # 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:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000807 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
808 # - projects/project/zones/zone
809 # - zones/zone
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000810 }
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).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000817
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 ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800835 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700836 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400837 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700838 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800840 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700841 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
842 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800843 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000845 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700846 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800847 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000848 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
849 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800850 "message": "A String", # [Output Only] A human-readable description of the warning code.
851 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
852 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
853 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000854 {
855 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700856 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000857 },
858 ],
859 },
860 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800862 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700863 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
864 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700865 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000866 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
867 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
868 {
869 "message": "A String", # [Output Only] An optional, human-readable error message.
870 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700871 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000872 },
873 ],
874 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800875 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700876 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800877 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000878 }</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>
John Asmuth614db982014-04-24 15:46:26 -0400883 <pre>Sets metadata common to all instances within the specified project using the data included in the request.
884
885Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000886 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700887 body: object, The request body.
John Asmuth614db982014-04-24 15:46:26 -0400888 The object takes the form of:
889
890{ # A metadata key/value entry.
891 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
892 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700893 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
John Asmuth614db982014-04-24 15:46:26 -0400894 "key": "A String", # Key for the metadata entry. Keys must conform to the following regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.
895 },
896 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000897 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700898 "fingerprint": "A String", # Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet.
899 #
900 # To see the latest fingerprint, make a get() request to retrieve the resource.
John Asmuth614db982014-04-24 15:46:26 -0400901}
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).
John Asmuth614db982014-04-24 15:46:26 -0400908
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 ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800926 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700927 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400928 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700929 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800931 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700932 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
933 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800934 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700935 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800936 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700937 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800938 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000939 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400940 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800941 "message": "A String", # [Output Only] A human-readable description of the warning code.
942 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
943 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
944 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400945 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000946 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700947 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400948 },
949 ],
950 },
951 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700952 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800953 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700954 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
955 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700956 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000957 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800958 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400959 {
Craig Citroe633be12015-03-02 13:40:36 -0800960 "message": "A String", # [Output Only] An optional, human-readable error message.
961 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700962 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400963 },
964 ],
965 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800966 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700967 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800968 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400969 }</pre>
970</div>
971
Craig Citro065b5302014-08-14 00:47:23 -0700972<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{
982 "networkTier": "A String", # Default network tier to be set.
983 }
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 Kim715bd7f2019-06-14 16:50:42 -07001008 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1009 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1010 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001011 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001012 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1013 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001014 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1015 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001016 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -07001017 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001019 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001020 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1021 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1022 {
1023 "message": "A String", # [Output Only] A human-readable description of the warning code.
1024 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1025 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1026 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1027 {
1028 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1029 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1030 },
1031 ],
1032 },
1033 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001034 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001035 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001036 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1037 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001038 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1039 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1040 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1041 {
1042 "message": "A String", # [Output Only] An optional, human-readable error message.
1043 "code": "A String", # [Output Only] The error type identifier for this error.
1044 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1045 },
1046 ],
1047 },
1048 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1049 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1050 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1051 }</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>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001056 <pre>Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
Craig Citro065b5302014-08-14 00:47:23 -07001057
1058Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001059 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001060 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001064 "bucketName": "A String", # 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 "reportNamePrefix": "A String", # 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.
1066}
Craig Citro065b5302014-08-14 00:47:23 -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).
Craig Citro065b5302014-08-14 00:47:23 -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 ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001091 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001092 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001093 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001094 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001096 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001097 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1098 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001099 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -07001100 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001101 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001102 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001103 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001104 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -07001105 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001106 "message": "A String", # [Output Only] A human-readable description of the warning code.
1107 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1108 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1109 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07001110 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001111 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001112 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Craig Citro065b5302014-08-14 00:47:23 -07001113 },
1114 ],
1115 },
1116 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001117 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001118 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001119 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1120 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001121 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001122 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001123 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07001124 {
Craig Citroe633be12015-03-02 13:40:36 -08001125 "message": "A String", # [Output Only] An optional, human-readable error message.
1126 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001127 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -07001128 },
1129 ],
1130 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001131 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001132 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001133 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Craig Citro065b5302014-08-14 00:47:23 -07001134 }</pre>
1135</div>
1136
John Asmuth614db982014-04-24 15:46:26 -04001137</body></html>