blob: cd430a2ab0b5132c29fc5b6b00b8e0bde02a8447 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_alpha.html">Compute Engine API</a> . <a href="compute_alpha.projects.html">projects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#disableXpnHost">disableXpnHost(project, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Disable this project as a shared VPC host project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#disableXpnResource">disableXpnResource(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Disable a service resource (also known as service project) associated with this host project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070083<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#enableXpnHost">enableXpnHost(project, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Enable this project as a shared VPC host project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070086<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#enableXpnResource">enableXpnResource(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070089<p class="toc_element">
90 <code><a href="#get">get(project)</a></code></p>
91<p class="firstline">Returns the specified Project resource.</p>
92<p class="toc_element">
93 <code><a href="#getXpnHost">getXpnHost(project)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Gets the shared VPC host project that this project links to. May be empty if no link exists.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070095<p class="toc_element">
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 Cheemalapatidf613972016-10-21 13:59:49 -070098<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#getXpnResources_next">getXpnResources_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
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 Cheemalapatidf613972016-10-21 13:59:49 -0700104<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400105 <code><a href="#listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#moveDisk">moveDisk(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700109<p class="firstline">Moves a persistent disk from one zone to another.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#moveInstance">moveInstance(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700112<p class="firstline">Moves an instance and its attached persistent disks from one zone to another.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700115<p class="firstline">Sets metadata common to all instances within the specified project using the data included in the request.</p>
116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118<p class="firstline">Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#setDefaultServiceAccount">setDefaultServiceAccount(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700121<p class="firstline">Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to "default".</p>
122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#setUsageExportBucket">setUsageExportBucket(project, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700124<p class="firstline">Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.</p>
125<h3>Method Details</h3>
126<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400127 <code class="details" id="disableXpnHost">disableXpnHost(project, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128 <pre>Disable this project as a shared VPC host project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700129
130Args:
131 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
133
134For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
135
136The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700137
138Returns:
139 An object of the form:
140
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 { # Represents an Operation resource.
142 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 # Google Compute Engine has three Operation resources:
144 #
145 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
146 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
148 #
149 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 # - For global operations, use the `globalOperations` resource.
151 # - For regional operations, use the `regionOperations` resource.
152 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700155 "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 -0700156 "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 -0400157 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700158 "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 -0700159 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160 "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 -0700161 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
162 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700163 "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 -0700164 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700165 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700166 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700167 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
168 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
169 {
170 "message": "A String", # [Output Only] A human-readable description of the warning code.
171 "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.
172 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
173 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
174 {
175 "value": "A String", # [Output Only] A warning data value corresponding to the key.
176 "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).
177 },
178 ],
179 },
180 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700181 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700182 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700183 "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 -0700184 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
185 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700186 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700187 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
188 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
189 {
190 "message": "A String", # [Output Only] An optional, human-readable error message.
191 "code": "A String", # [Output Only] The error type identifier for this error.
192 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
193 },
194 ],
195 },
196 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
197 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800198 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700199 }</pre>
200</div>
201
202<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700203 <code class="details" id="disableXpnResource">disableXpnResource(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 <pre>Disable a service resource (also known as service project) associated with this host project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700205
206Args:
207 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700209 The object takes the form of:
210
211{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 "xpnResource": { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
213 "type": "A String", # The type of the service resource.
214 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700215 },
216 }
217
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700218 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
219
220For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
221
222The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700223
224Returns:
225 An object of the form:
226
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 { # Represents an Operation resource.
228 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700229 # Google Compute Engine has three Operation resources:
230 #
231 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
232 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
234 #
235 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700236 # - For global operations, use the `globalOperations` resource.
237 # - For regional operations, use the `regionOperations` resource.
238 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700241 "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 -0700242 "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 -0400243 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700244 "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 -0700245 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700246 "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 -0700247 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
248 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700249 "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 -0700250 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700251 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700252 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700253 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
254 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
255 {
256 "message": "A String", # [Output Only] A human-readable description of the warning code.
257 "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.
258 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
259 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
260 {
261 "value": "A String", # [Output Only] A warning data value corresponding to the key.
262 "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).
263 },
264 ],
265 },
266 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700267 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700268 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700269 "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 -0700270 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
271 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700273 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
274 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
275 {
276 "message": "A String", # [Output Only] An optional, human-readable error message.
277 "code": "A String", # [Output Only] The error type identifier for this error.
278 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
279 },
280 ],
281 },
282 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
283 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800284 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700285 }</pre>
286</div>
287
288<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400289 <code class="details" id="enableXpnHost">enableXpnHost(project, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 <pre>Enable this project as a shared VPC host project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700291
292Args:
293 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
295
296For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
297
298The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700299
300Returns:
301 An object of the form:
302
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 { # Represents an Operation resource.
304 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 # Google Compute Engine has three Operation resources:
306 #
307 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
308 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700309 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
310 #
311 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700312 # - For global operations, use the `globalOperations` resource.
313 # - For regional operations, use the `regionOperations` resource.
314 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700315 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700316 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700317 "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 -0700318 "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 -0400319 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 "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 -0700321 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700322 "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 -0700323 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
324 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700325 "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 -0700326 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700327 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700328 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700329 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
330 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
331 {
332 "message": "A String", # [Output Only] A human-readable description of the warning code.
333 "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.
334 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
335 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
336 {
337 "value": "A String", # [Output Only] A warning data value corresponding to the key.
338 "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).
339 },
340 ],
341 },
342 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700344 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700345 "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 -0700346 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
347 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700348 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700349 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
350 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
351 {
352 "message": "A String", # [Output Only] An optional, human-readable error message.
353 "code": "A String", # [Output Only] The error type identifier for this error.
354 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
355 },
356 ],
357 },
358 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
359 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800360 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700361 }</pre>
362</div>
363
364<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700365 <code class="details" id="enableXpnResource">enableXpnResource(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700366 <pre>Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700367
368Args:
369 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700371 The object takes the form of:
372
373{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 "xpnResource": { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
375 "type": "A String", # The type of the service resource.
376 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700377 },
378 }
379
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700380 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
381
382For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
383
384The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700385
386Returns:
387 An object of the form:
388
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 { # Represents an Operation resource.
390 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 # Google Compute Engine has three Operation resources:
392 #
393 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
394 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
396 #
397 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700398 # - For global operations, use the `globalOperations` resource.
399 # - For regional operations, use the `regionOperations` resource.
400 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700402 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700403 "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 -0700404 "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 -0400405 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700406 "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 -0700407 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700408 "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 -0700409 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
410 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700411 "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 -0700412 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700413 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700414 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700415 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
416 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
417 {
418 "message": "A String", # [Output Only] A human-readable description of the warning code.
419 "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.
420 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
421 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
422 {
423 "value": "A String", # [Output Only] A warning data value corresponding to the key.
424 "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).
425 },
426 ],
427 },
428 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700429 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700430 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700431 "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 -0700432 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
433 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700434 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700435 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
436 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
437 {
438 "message": "A String", # [Output Only] An optional, human-readable error message.
439 "code": "A String", # [Output Only] The error type identifier for this error.
440 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
441 },
442 ],
443 },
444 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
445 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800446 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700447 }</pre>
448</div>
449
450<div class="method">
451 <code class="details" id="get">get(project)</code>
452 <pre>Returns the specified Project resource.
453
454Args:
455 project: string, Project ID for this request. (required)
456
457Returns:
458 An object of the form:
459
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700460 { # Represents a Project resource.
461 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700462 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700463 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
464 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
465 "enabledFeatures": [ # Restricted features enabled for use on this project.
466 "A String",
467 ],
468 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
469 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
470 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700471 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700472 "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.
473 },
474 ],
475 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476 "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.
477 #
478 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700479 },
480 "quotas": [ # [Output Only] Quotas assigned to this project.
481 { # A quotas entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700482 "owner": "A String", # [Output Only] Owning resource. This is the resource on which this quota is applied.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700483 "usage": 3.14, # [Output Only] Current usage of this metric.
484 "metric": "A String", # [Output Only] Name of the quota metric.
485 "limit": 3.14, # [Output Only] Quota limit for this metric.
486 },
487 ],
488 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
489 "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.
490 "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.
491 "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.
492 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700493 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
494 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700495 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
496 "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.
497 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
498 "description": "A String", # An optional textual description of the resource.
499 }</pre>
500</div>
501
502<div class="method">
503 <code class="details" id="getXpnHost">getXpnHost(project)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700504 <pre>Gets the shared VPC host project that this project links to. May be empty if no link exists.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700505
506Args:
507 project: string, Project ID for this request. (required)
508
509Returns:
510 An object of the form:
511
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700512 { # Represents a Project resource.
513 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700514 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for {$api_version}.projects ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700515 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
516 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
517 "enabledFeatures": [ # Restricted features enabled for use on this project.
518 "A String",
519 ],
520 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
521 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
522 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700524 "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.
525 },
526 ],
527 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 "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.
529 #
530 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700531 },
532 "quotas": [ # [Output Only] Quotas assigned to this project.
533 { # A quotas entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 "owner": "A String", # [Output Only] Owning resource. This is the resource on which this quota is applied.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700535 "usage": 3.14, # [Output Only] Current usage of this metric.
536 "metric": "A String", # [Output Only] Name of the quota metric.
537 "limit": 3.14, # [Output Only] Quota limit for this metric.
538 },
539 ],
540 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
541 "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.
542 "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.
543 "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.
544 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
546 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700547 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
548 "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.
549 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
550 "description": "A String", # An optional textual description of the resource.
551 }</pre>
552</div>
553
554<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 <code class="details" id="getXpnResources">getXpnResources(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556 <pre>Gets service resources (a.k.a service project) associated with this host project.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700557
558Args:
559 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700560 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 -0700561
Dan O'Mearadd494642020-05-01 07:42:23 -0700562You 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 -0700563
Dan O'Mearadd494642020-05-01 07:42:23 -0700564Currently, only sorting by `name` or `creationTimestamp desc` is supported.
565 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`)
566 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
567 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 -0700568
Dan O'Mearadd494642020-05-01 07:42:23 -0700569For 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 -0700570
Dan O'Mearadd494642020-05-01 07:42:23 -0700571You 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 -0700572
Dan O'Mearadd494642020-05-01 07:42:23 -0700573To 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 Cheemalapatidf613972016-10-21 13:59:49 -0700574
575Returns:
576 An object of the form:
577
578 {
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400579 "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 -0700580 "kind": "compute#projectsGetXpnResources", # [Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)
581 "resources": [ # Service resources (a.k.a service projects) attached to this project as their shared VPC host.
582 { # Service resource (a.k.a service project) ID.
583 "type": "A String", # The type of the service resource.
584 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700585 },
586 ],
587 }</pre>
588</div>
589
590<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400591 <code class="details" id="getXpnResources_next">getXpnResources_next(previous_request, previous_response)</code>
592 <pre>Retrieves the next page of results.
593
594Args:
595 previous_request: The request for the previous page. (required)
596 previous_response: The response from the request for the previous page. (required)
597
598Returns:
599 A request object that you can call 'execute()' on to request the next
600 page. Returns None if there are no more items in the collection.
601 </pre>
602</div>
603
604<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700605 <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 -0700606 <pre>Lists all shared VPC host projects visible to the user in an organization.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700607
608Args:
609 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700610 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700611 The object takes the form of:
612
613{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700615 }
616
Dan O'Mearadd494642020-05-01 07:42:23 -0700617 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 -0700618
Dan O'Mearadd494642020-05-01 07:42:23 -0700619You 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 -0700620
Dan O'Mearadd494642020-05-01 07:42:23 -0700621Currently, only sorting by `name` or `creationTimestamp desc` is supported.
622 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`)
623 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
624 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 -0700625
Dan O'Mearadd494642020-05-01 07:42:23 -0700626For 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 -0700627
Dan O'Mearadd494642020-05-01 07:42:23 -0700628You 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 -0700629
Dan O'Mearadd494642020-05-01 07:42:23 -0700630To 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 Cheemalapatidf613972016-10-21 13:59:49 -0700631
632Returns:
633 An object of the form:
634
635 {
636 "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 -0700637 "kind": "compute#xpnHostList", # [Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.
638 "items": [ # [Output Only] A list of shared VPC host project URLs.
639 { # Represents a Project resource.
640 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700641 # 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 Cheemalapatidf613972016-10-21 13:59:49 -0700642 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
643 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
644 "enabledFeatures": [ # Restricted features enabled for use on this project.
645 "A String",
646 ],
647 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
648 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
649 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700650 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700651 "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.
652 },
653 ],
654 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700655 "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.
656 #
657 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700658 },
659 "quotas": [ # [Output Only] Quotas assigned to this project.
660 { # A quotas entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700661 "owner": "A String", # [Output Only] Owning resource. This is the resource on which this quota is applied.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700662 "usage": 3.14, # [Output Only] Current usage of this metric.
663 "metric": "A String", # [Output Only] Name of the quota metric.
664 "limit": 3.14, # [Output Only] Quota limit for this metric.
665 },
666 ],
667 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
668 "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.
669 "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.
670 "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.
671 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700672 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
673 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700674 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
675 "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.
676 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
677 "description": "A String", # An optional textual description of the resource.
678 },
679 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 "warning": { # [Output Only] Informational warning message.
681 "message": "A String", # [Output Only] A human-readable description of the warning code.
682 "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.
683 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
684 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
685 {
686 "value": "A String", # [Output Only] A warning data value corresponding to the key.
687 "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).
688 },
689 ],
690 },
691 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700692 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
693 }</pre>
694</div>
695
696<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400697 <code class="details" id="listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</code>
698 <pre>Retrieves the next page of results.
699
700Args:
701 previous_request: The request for the previous page. (required)
702 previous_response: The response from the request for the previous page. (required)
703
704Returns:
705 A request object that you can call 'execute()' on to request the next
706 page. Returns None if there are no more items in the collection.
707 </pre>
708</div>
709
710<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700711 <code class="details" id="moveDisk">moveDisk(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700712 <pre>Moves a persistent disk from one zone to another.
713
714Args:
715 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700716 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700717 The object takes the form of:
718
719{
720 "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:
721 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
722 # - projects/project/zones/zone/disks/disk
723 # - zones/zone/disks/disk
724 "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:
725 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
726 # - projects/project/zones/zone
727 # - zones/zone
728 }
729
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
731
732For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
733
734The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700735
736Returns:
737 An object of the form:
738
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700739 { # Represents an Operation resource.
740 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700741 # Google Compute Engine has three Operation resources:
742 #
743 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
744 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700745 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
746 #
747 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700748 # - For global operations, use the `globalOperations` resource.
749 # - For regional operations, use the `regionOperations` resource.
750 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700752 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700753 "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 -0700754 "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 -0400755 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700756 "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 -0700757 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700758 "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 -0700759 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
760 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700761 "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 -0700762 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700763 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700764 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700765 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
766 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
767 {
768 "message": "A String", # [Output Only] A human-readable description of the warning code.
769 "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.
770 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
771 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
772 {
773 "value": "A String", # [Output Only] A warning data value corresponding to the key.
774 "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).
775 },
776 ],
777 },
778 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700779 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700780 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700781 "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 -0700782 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
783 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700784 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700785 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
786 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
787 {
788 "message": "A String", # [Output Only] An optional, human-readable error message.
789 "code": "A String", # [Output Only] The error type identifier for this error.
790 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
791 },
792 ],
793 },
794 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
795 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800796 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700797 }</pre>
798</div>
799
800<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700801 <code class="details" id="moveInstance">moveInstance(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700802 <pre>Moves an instance and its attached persistent disks from one zone to another.
803
804Args:
805 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700806 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700807 The object takes the form of:
808
809{
810 "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:
811 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
812 # - projects/project/zones/zone/instances/instance
813 # - zones/zone/instances/instance
814 "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:
815 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
816 # - projects/project/zones/zone
817 # - zones/zone
818 }
819
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700820 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
821
822For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
823
824The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700825
826Returns:
827 An object of the form:
828
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700829 { # Represents an Operation resource.
830 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700831 # Google Compute Engine has three Operation resources:
832 #
833 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
834 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700835 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
836 #
837 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700838 # - For global operations, use the `globalOperations` resource.
839 # - For regional operations, use the `regionOperations` resource.
840 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700841 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700842 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700843 "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 -0700844 "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 -0400845 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700846 "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 -0700847 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700848 "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 -0700849 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
850 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700851 "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 -0700852 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700853 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700854 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700855 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
856 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
857 {
858 "message": "A String", # [Output Only] A human-readable description of the warning code.
859 "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.
860 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
861 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
862 {
863 "value": "A String", # [Output Only] A warning data value corresponding to the key.
864 "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).
865 },
866 ],
867 },
868 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700869 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700870 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700871 "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 -0700872 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
873 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700874 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700875 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
876 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
877 {
878 "message": "A String", # [Output Only] An optional, human-readable error message.
879 "code": "A String", # [Output Only] The error type identifier for this error.
880 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
881 },
882 ],
883 },
884 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
885 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800886 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700887 }</pre>
888</div>
889
890<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700891 <code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700892 <pre>Sets metadata common to all instances within the specified project using the data included in the request.
893
894Args:
895 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700896 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700897 The object takes the form of:
898
899{ # A metadata key/value entry.
900 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
901 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700903 "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.
904 },
905 ],
906 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 "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.
908 #
909 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700910}
911
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700912 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
913
914For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
915
916The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700917
918Returns:
919 An object of the form:
920
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700921 { # Represents an Operation resource.
922 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700923 # Google Compute Engine has three Operation resources:
924 #
925 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
926 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700927 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
928 #
929 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700930 # - For global operations, use the `globalOperations` resource.
931 # - For regional operations, use the `regionOperations` resource.
932 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700933 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700934 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700935 "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 -0700936 "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 -0400937 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700938 "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 -0700939 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700940 "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 -0700941 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
942 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700943 "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 -0700944 "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 Cheemalapatidf613972016-10-21 13:59:49 -0700945 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700946 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700947 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
948 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
949 {
950 "message": "A String", # [Output Only] A human-readable description of the warning code.
951 "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.
952 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
953 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
954 {
955 "value": "A String", # [Output Only] A warning data value corresponding to the key.
956 "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).
957 },
958 ],
959 },
960 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700961 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -0700962 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700963 "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 -0700964 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
965 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700966 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
967 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
968 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
969 {
970 "message": "A String", # [Output Only] An optional, human-readable error message.
971 "code": "A String", # [Output Only] The error type identifier for this error.
972 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
973 },
974 ],
975 },
976 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
977 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
978 "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.
979 }</pre>
980</div>
981
982<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700983 <code class="details" id="setDefaultNetworkTier">setDefaultNetworkTier(project, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700984 <pre>Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
985
986Args:
987 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700988 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700989 The object takes the form of:
990
991{
992 "networkTier": "A String", # Default network tier to be set.
993 }
994
995 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
996
997For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
998
999The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1000
1001Returns:
1002 An object of the form:
1003
1004 { # Represents an Operation resource.
1005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 # Google Compute Engine has three Operation resources:
1007 #
1008 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1009 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001010 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1011 #
1012 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001013 # - For global operations, use the `globalOperations` resource.
1014 # - For regional operations, use the `regionOperations` resource.
1015 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001016 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001017 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1019 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1020 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001021 "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 -07001022 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1023 "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 -07001024 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1025 "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 -07001026 "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 -07001027 "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 -07001028 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001029 "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 -07001030 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1031 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1032 {
1033 "message": "A String", # [Output Only] A human-readable description of the warning code.
1034 "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.
1035 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1036 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1037 {
1038 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1039 "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).
1040 },
1041 ],
1042 },
1043 ],
1044 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001045 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 "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 -07001047 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1048 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001049 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001050 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1051 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1052 {
1053 "message": "A String", # [Output Only] An optional, human-readable error message.
1054 "code": "A String", # [Output Only] The error type identifier for this error.
1055 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1056 },
1057 ],
1058 },
1059 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1060 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001061 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001062 }</pre>
1063</div>
1064
1065<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001066 <code class="details" id="setDefaultServiceAccount">setDefaultServiceAccount(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001067 <pre>Sets the default service account of the project. The default service account is used when a VM instance is created with the service account email address set to "default".
1068
1069Args:
1070 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001071 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001072 The object takes the form of:
1073
1074{
1075 "email": "A String", # Email address of the service account.
1076 }
1077
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1079
1080For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1081
1082The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001083
1084Returns:
1085 An object of the form:
1086
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001087 { # Represents an Operation resource.
1088 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001089 # Google Compute Engine has three Operation resources:
1090 #
1091 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1092 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001093 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1094 #
1095 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001096 # - For global operations, use the `globalOperations` resource.
1097 # - For regional operations, use the `regionOperations` resource.
1098 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001099 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001100 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001101 "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 -07001102 "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 -04001103 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001104 "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 -07001105 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001106 "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 -07001107 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1108 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001109 "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 -07001110 "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 Cheemalapatidf613972016-10-21 13:59:49 -07001111 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001112 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001113 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1114 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1115 {
1116 "message": "A String", # [Output Only] A human-readable description of the warning code.
1117 "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.
1118 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1119 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1120 {
1121 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1122 "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).
1123 },
1124 ],
1125 },
1126 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001127 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001128 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001129 "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 -07001130 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1131 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001132 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001133 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1134 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1135 {
1136 "message": "A String", # [Output Only] An optional, human-readable error message.
1137 "code": "A String", # [Output Only] The error type identifier for this error.
1138 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1139 },
1140 ],
1141 },
1142 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1143 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001144 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001145 }</pre>
1146</div>
1147
1148<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001149 <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001150 <pre>Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
1151
1152Args:
1153 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001154 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001155 The object takes the form of:
1156
1157{ # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.
1158 "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.
1159 "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.
1160}
1161
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001162 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1163
1164For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1165
1166The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001167
1168Returns:
1169 An object of the form:
1170
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001171 { # Represents an Operation resource.
1172 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001173 # Google Compute Engine has three Operation resources:
1174 #
1175 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1176 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001177 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1178 #
1179 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001180 # - For global operations, use the `globalOperations` resource.
1181 # - For regional operations, use the `regionOperations` resource.
1182 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001183 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001184 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001185 "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 -07001186 "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 -04001187 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001188 "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 -07001189 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001190 "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 -07001191 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1192 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001193 "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 -07001194 "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 Cheemalapatidf613972016-10-21 13:59:49 -07001195 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001196 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001197 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1198 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1199 {
1200 "message": "A String", # [Output Only] A human-readable description of the warning code.
1201 "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.
1202 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1203 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1204 {
1205 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1206 "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).
1207 },
1208 ],
1209 },
1210 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001211 "selfLinkWithId": "A String", # [Output Only] Server-defined URL for this resource with the resource id.
Dan O'Mearadd494642020-05-01 07:42:23 -07001212 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001213 "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 -07001214 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1215 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001216 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001217 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1218 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1219 {
1220 "message": "A String", # [Output Only] An optional, human-readable error message.
1221 "code": "A String", # [Output Only] The error type identifier for this error.
1222 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1223 },
1224 ],
1225 },
1226 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1227 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001228 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001229 }</pre>
1230</div>
1231
1232</body></html>