blob: cb207e3669aba7e3dfe8af46089533a875ee7e87 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.projects.html">projects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#disableXpnHost">disableXpnHost(project, requestId=None)</a></code></p>
79<p class="firstline">Disable this project as a shared VPC host project.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040080<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#disableXpnResource">disableXpnResource(project, body, requestId=None)</a></code></p>
82<p class="firstline">Disable a service resource (also known as service project) associated with this host project.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040083<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#enableXpnHost">enableXpnHost(project, requestId=None)</a></code></p>
85<p class="firstline">Enable this project as a shared VPC host project.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040086<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#enableXpnResource">enableXpnResource(project, body, requestId=None)</a></code></p>
88<p class="firstline">Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040089<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -040090 <code><a href="#get">get(project)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070091<p class="firstline">Returns the specified Project resource.</p>
John Asmuth614db982014-04-24 15:46:26 -040092<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040093 <code><a href="#getXpnHost">getXpnHost(project)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Gets the shared VPC host project that this project links to. May be empty if no link exists.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040095<p class="toc_element">
96 <code><a href="#getXpnResources">getXpnResources(project, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Gets service resources (a.k.a service project) associated with this host project.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040098<p class="toc_element">
99 <code><a href="#getXpnResources_next">getXpnResources_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#listXpnHosts">listXpnHosts(project, body, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Lists all shared VPC host projects visible to the user in an organization.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400104<p class="toc_element">
105 <code><a href="#listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 <code><a href="#moveDisk">moveDisk(project, body, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000109<p class="firstline">Moves a persistent disk from one zone to another.</p>
110<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 <code><a href="#moveInstance">moveInstance(project, body, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000112<p class="firstline">Moves an instance and its attached persistent disks from one zone to another.</p>
113<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 <code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body, requestId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -0400115<p class="firstline">Sets metadata common to all instances within the specified project using the data included in the request.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700116<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117 <code><a href="#setDefaultNetworkTier">setDefaultNetworkTier(project, body, requestId=None)</a></code></p>
118<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">
120 <code><a href="#setUsageExportBucket">setUsageExportBucket(project, body, requestId=None)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000121<p class="firstline">Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.</p>
John Asmuth614db982014-04-24 15:46:26 -0400122<h3>Method Details</h3>
123<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 <code class="details" id="disableXpnHost">disableXpnHost(project, requestId=None)</code>
125 <pre>Disable this project as a shared VPC host project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400126
127Args:
128 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
130
131For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
132
133The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400134
135Returns:
136 An object of the form:
137
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 { # Represents an Operation resource.
139 #
140 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
141 #
142 # Operations can be global, regional or zonal.
143 # - For global operations, use the globalOperations resource.
144 # - For regional operations, use the regionOperations resource.
145 # - For zonal operations, use the zonalOperations resource.
146 #
147 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400148 "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 -0700149 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400150 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
151 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400153 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
154 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
155 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
156 "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.
157 "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.
158 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
159 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
160 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
161 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
162 {
163 "message": "A String", # [Output Only] A human-readable description of the warning code.
164 "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.
165 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
166 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
167 {
168 "value": "A String", # [Output Only] A warning data value corresponding to the key.
169 "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).
170 },
171 ],
172 },
173 ],
174 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
175 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
176 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
177 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400179 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
180 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
181 {
182 "message": "A String", # [Output Only] An optional, human-readable error message.
183 "code": "A String", # [Output Only] The error type identifier for this error.
184 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
185 },
186 ],
187 },
188 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
189 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
190 "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.
191 }</pre>
192</div>
193
194<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700195 <code class="details" id="disableXpnResource">disableXpnResource(project, body, requestId=None)</code>
196 <pre>Disable a service resource (also known as service project) associated with this host project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400197
198Args:
199 project: string, Project ID for this request. (required)
200 body: object, The request body. (required)
201 The object takes the form of:
202
203{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 "xpnResource": { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
205 "type": "A String", # The type of the service resource.
206 "id": "A String", # The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400207 },
208 }
209
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 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.
211
212For 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.
213
214The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400215
216Returns:
217 An object of the form:
218
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 { # Represents an Operation resource.
220 #
221 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
222 #
223 # Operations can be global, regional or zonal.
224 # - For global operations, use the globalOperations resource.
225 # - For regional operations, use the regionOperations resource.
226 # - For zonal operations, use the zonalOperations resource.
227 #
228 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400229 "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 -0700230 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400231 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
232 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400234 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
235 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
236 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
237 "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.
238 "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.
239 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
240 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
241 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
242 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
243 {
244 "message": "A String", # [Output Only] A human-readable description of the warning code.
245 "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.
246 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
247 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
248 {
249 "value": "A String", # [Output Only] A warning data value corresponding to the key.
250 "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).
251 },
252 ],
253 },
254 ],
255 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
256 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
257 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
258 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400260 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
261 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
262 {
263 "message": "A String", # [Output Only] An optional, human-readable error message.
264 "code": "A String", # [Output Only] The error type identifier for this error.
265 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
266 },
267 ],
268 },
269 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
270 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
271 "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.
272 }</pre>
273</div>
274
275<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700276 <code class="details" id="enableXpnHost">enableXpnHost(project, requestId=None)</code>
277 <pre>Enable this project as a shared VPC host project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400278
279Args:
280 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700281 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.
282
283For 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.
284
285The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400286
287Returns:
288 An object of the form:
289
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 { # Represents an Operation resource.
291 #
292 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
293 #
294 # Operations can be global, regional or zonal.
295 # - For global operations, use the globalOperations resource.
296 # - For regional operations, use the regionOperations resource.
297 # - For zonal operations, use the zonalOperations resource.
298 #
299 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400300 "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 -0700301 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400302 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
303 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400305 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
306 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
307 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
308 "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.
309 "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.
310 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
311 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
312 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
313 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
314 {
315 "message": "A String", # [Output Only] A human-readable description of the warning code.
316 "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.
317 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
318 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
319 {
320 "value": "A String", # [Output Only] A warning data value corresponding to the key.
321 "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).
322 },
323 ],
324 },
325 ],
326 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
327 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
328 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
329 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400331 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
332 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
333 {
334 "message": "A String", # [Output Only] An optional, human-readable error message.
335 "code": "A String", # [Output Only] The error type identifier for this error.
336 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
337 },
338 ],
339 },
340 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
341 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
342 "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.
343 }</pre>
344</div>
345
346<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700347 <code class="details" id="enableXpnResource">enableXpnResource(project, body, requestId=None)</code>
348 <pre>Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400349
350Args:
351 project: string, Project ID for this request. (required)
352 body: object, The request body. (required)
353 The object takes the form of:
354
355{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700356 "xpnResource": { # Service resource (a.k.a service project) ID. # Service resource (a.k.a service project) ID.
357 "type": "A String", # The type of the service resource.
358 "id": "A String", # The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400359 },
360 }
361
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700362 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.
363
364For 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.
365
366The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400367
368Returns:
369 An object of the form:
370
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700371 { # Represents an Operation resource.
372 #
373 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
374 #
375 # Operations can be global, regional or zonal.
376 # - For global operations, use the globalOperations resource.
377 # - For regional operations, use the regionOperations resource.
378 # - For zonal operations, use the zonalOperations resource.
379 #
380 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400381 "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 -0700382 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400383 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
384 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400386 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
387 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
388 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
389 "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.
390 "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.
391 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
392 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
393 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
394 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
395 {
396 "message": "A String", # [Output Only] A human-readable description of the warning code.
397 "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.
398 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
399 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
400 {
401 "value": "A String", # [Output Only] A warning data value corresponding to the key.
402 "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).
403 },
404 ],
405 },
406 ],
407 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
408 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
409 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
410 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400412 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
413 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
414 {
415 "message": "A String", # [Output Only] An optional, human-readable error message.
416 "code": "A String", # [Output Only] The error type identifier for this error.
417 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
418 },
419 ],
420 },
421 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
422 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
423 "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.
424 }</pre>
425</div>
426
427<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400428 <code class="details" id="get">get(project)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700429 <pre>Returns the specified Project resource.
John Asmuth614db982014-04-24 15:46:26 -0400430
431Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000432 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400433
434Returns:
435 An object of the form:
436
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700437 { # Represents a Project resource.
438 #
439 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000440 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700441 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
Takashi Matsuo06694102015-09-11 13:55:40 -0700442 "enabledFeatures": [ # Restricted features enabled for use on this project.
443 "A String",
444 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000445 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
John Asmuth614db982014-04-24 15:46:26 -0400446 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
447 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700448 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
John Asmuth614db982014-04-24 15:46:26 -0400449 "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.
450 },
451 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000452 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700453 "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.
454 #
455 # To see the latest fingerprint, make a get() request to retrieve the resource.
John Asmuth614db982014-04-24 15:46:26 -0400456 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000457 "quotas": [ # [Output Only] Quotas assigned to this project.
John Asmuth614db982014-04-24 15:46:26 -0400458 { # A quotas entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700459 "owner": "A String", # [Output Only] Owning resource. This is the resource on which this quota is applied.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000460 "usage": 3.14, # [Output Only] Current usage of this metric.
461 "metric": "A String", # [Output Only] Name of the quota metric.
462 "limit": 3.14, # [Output Only] Quota limit for this metric.
John Asmuth614db982014-04-24 15:46:26 -0400463 },
464 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800465 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
466 "usageExportLocation": { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. # The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400467 "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.
468 "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.
469 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
471 "defaultNetworkTier": "A String", # This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000472 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800473 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. This is not the project ID, and is just a unique ID used by Compute Engine to identify resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700474 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
475 "description": "A String", # An optional textual description of the resource.
John Asmuth614db982014-04-24 15:46:26 -0400476 }</pre>
477</div>
478
479<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400480 <code class="details" id="getXpnHost">getXpnHost(project)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 <pre>Gets the shared VPC host project that this project links to. May be empty if no link exists.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400482
483Args:
484 project: string, Project ID for this request. (required)
485
486Returns:
487 An object of the form:
488
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 { # Represents a Project resource.
490 #
491 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400492 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
493 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
494 "enabledFeatures": [ # Restricted features enabled for use on this project.
495 "A String",
496 ],
497 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
498 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
499 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700500 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400501 "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.
502 },
503 ],
504 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 "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.
506 #
507 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400508 },
509 "quotas": [ # [Output Only] Quotas assigned to this project.
510 { # A quotas entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700511 "owner": "A String", # [Output Only] Owning resource. This is the resource on which this quota is applied.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400512 "usage": 3.14, # [Output Only] Current usage of this metric.
513 "metric": "A String", # [Output Only] Name of the quota metric.
514 "limit": 3.14, # [Output Only] Quota limit for this metric.
515 },
516 ],
517 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
518 "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.
519 "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.
520 "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.
521 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700522 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
523 "defaultNetworkTier": "A String", # This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400524 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
525 "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.
526 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
527 "description": "A String", # An optional textual description of the resource.
528 }</pre>
529</div>
530
531<div class="method">
532 <code class="details" id="getXpnResources">getXpnResources(project, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 <pre>Gets service resources (a.k.a service project) associated with this host project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400534
535Args:
536 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 order_by: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
538
539You 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.
540
541Currently, only sorting by name or creationTimestamp desc is supported.
542 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)
543 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.
544 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 =, !=, >, or <.
545
546For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
547
548You 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.
549
550To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400551
552Returns:
553 An object of the form:
554
555 {
556 "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 -0700557 "kind": "compute#projectsGetXpnResources", # [Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)
558 "resources": [ # Service resources (a.k.a service projects) attached to this project as their shared VPC host.
559 { # Service resource (a.k.a service project) ID.
560 "type": "A String", # The type of the service resource.
561 "id": "A String", # The ID of the service resource. In the case of projects, this field supports project id (e.g., my-project-123) and project number (e.g. 12345678).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400562 },
563 ],
564 }</pre>
565</div>
566
567<div class="method">
568 <code class="details" id="getXpnResources_next">getXpnResources_next(previous_request, previous_response)</code>
569 <pre>Retrieves the next page of results.
570
571Args:
572 previous_request: The request for the previous page. (required)
573 previous_response: The response from the request for the previous page. (required)
574
575Returns:
576 A request object that you can call 'execute()' on to request the next
577 page. Returns None if there are no more items in the collection.
578 </pre>
579</div>
580
581<div class="method">
582 <code class="details" id="listXpnHosts">listXpnHosts(project, body, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 <pre>Lists all shared VPC host projects visible to the user in an organization.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400584
585Args:
586 project: string, Project ID for this request. (required)
587 body: object, The request body. (required)
588 The object takes the form of:
589
590{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591 "organization": "A String", # Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400592 }
593
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700594 order_by: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
595
596You 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.
597
598Currently, only sorting by name or creationTimestamp desc is supported.
599 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)
600 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.
601 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 =, !=, >, or <.
602
603For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
604
605You 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.
606
607To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400608
609Returns:
610 An object of the form:
611
612 {
613 "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 -0700614 "kind": "compute#xpnHostList", # [Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.
615 "items": [ # [Output Only] A list of shared VPC host project URLs.
616 { # Represents a Project resource.
617 #
618 # A project is used to organize resources in a Google Cloud Platform environment. For more information, read about the Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for beta.projects ==)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400619 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
620 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
621 "enabledFeatures": [ # Restricted features enabled for use on this project.
622 "A String",
623 ],
624 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
625 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
626 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700627 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400628 "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.
629 },
630 ],
631 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700632 "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.
633 #
634 # To see the latest fingerprint, make a get() request to retrieve the resource.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400635 },
636 "quotas": [ # [Output Only] Quotas assigned to this project.
637 { # A quotas entry.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700638 "owner": "A String", # [Output Only] Owning resource. This is the resource on which this quota is applied.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400639 "usage": 3.14, # [Output Only] Current usage of this metric.
640 "metric": "A String", # [Output Only] Name of the quota metric.
641 "limit": 3.14, # [Output Only] Quota limit for this metric.
642 },
643 ],
644 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
645 "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.
646 "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.
647 "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.
648 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.
650 "defaultNetworkTier": "A String", # This signifies the default network tier used for configuring resources of the project and can only take the following values: PREMIUM, STANDARD. Initially the default network tier is PREMIUM.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400651 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
652 "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.
653 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
654 "description": "A String", # An optional textual description of the resource.
655 },
656 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 "warning": { # [Output Only] Informational warning message.
658 "message": "A String", # [Output Only] A human-readable description of the warning code.
659 "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.
660 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
661 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
662 {
663 "value": "A String", # [Output Only] A warning data value corresponding to the key.
664 "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).
665 },
666 ],
667 },
668 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400669 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
670 }</pre>
671</div>
672
673<div class="method">
674 <code class="details" id="listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</code>
675 <pre>Retrieves the next page of results.
676
677Args:
678 previous_request: The request for the previous page. (required)
679 previous_response: The response from the request for the previous page. (required)
680
681Returns:
682 A request object that you can call 'execute()' on to request the next
683 page. Returns None if there are no more items in the collection.
684 </pre>
685</div>
686
687<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700688 <code class="details" id="moveDisk">moveDisk(project, body, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000689 <pre>Moves a persistent disk from one zone to another.
690
691Args:
692 project: string, Project ID for this request. (required)
693 body: object, The request body. (required)
694 The object takes the form of:
695
696{
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000697 "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:
698 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
699 # - projects/project/zones/zone/disks/disk
700 # - zones/zone/disks/disk
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800701 "destinationZone": "A String", # The URL of the destination zone to move the disk. This can be a full or partial URL. For example, the following are all valid URLs to a zone:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000702 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
703 # - projects/project/zones/zone
704 # - zones/zone
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000705 }
706
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700707 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.
708
709For 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.
710
711The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000712
713Returns:
714 An object of the form:
715
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 { # Represents an Operation resource.
717 #
718 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
719 #
720 # Operations can be global, regional or zonal.
721 # - For global operations, use the globalOperations resource.
722 # - For regional operations, use the regionOperations resource.
723 # - For zonal operations, use the zonalOperations resource.
724 #
725 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800726 "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 -0700727 "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 -0400728 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800729 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800731 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
732 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000733 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800734 "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.
735 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000736 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800737 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
738 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000739 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
740 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800741 "message": "A String", # [Output Only] A human-readable description of the warning code.
742 "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.
743 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
744 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000745 {
746 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700747 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000748 },
749 ],
750 },
751 ],
752 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800753 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
754 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000755 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700756 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000757 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
758 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
759 {
760 "message": "A String", # [Output Only] An optional, human-readable error message.
761 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700762 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000763 },
764 ],
765 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800766 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700767 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800768 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000769 }</pre>
770</div>
771
772<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700773 <code class="details" id="moveInstance">moveInstance(project, body, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000774 <pre>Moves an instance and its attached persistent disks from one zone to another.
775
776Args:
777 project: string, Project ID for this request. (required)
778 body: object, The request body. (required)
779 The object takes the form of:
780
781{
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000782 "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:
783 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
784 # - projects/project/zones/zone/instances/instance
785 # - zones/zone/instances/instance
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800786 "destinationZone": "A String", # The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone:
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000787 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
788 # - projects/project/zones/zone
789 # - zones/zone
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000790 }
791
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700792 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.
793
794For 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.
795
796The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000797
798Returns:
799 An object of the form:
800
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700801 { # Represents an Operation resource.
802 #
803 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
804 #
805 # Operations can be global, regional or zonal.
806 # - For global operations, use the globalOperations resource.
807 # - For regional operations, use the regionOperations resource.
808 # - For zonal operations, use the zonalOperations resource.
809 #
810 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800811 "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 -0700812 "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 -0400813 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800814 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700815 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800816 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
817 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000818 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800819 "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.
820 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000821 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800822 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
823 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000824 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
825 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800826 "message": "A String", # [Output Only] A human-readable description of the warning code.
827 "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.
828 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
829 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000830 {
831 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700832 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000833 },
834 ],
835 },
836 ],
837 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800838 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
839 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000840 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700841 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000842 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
843 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
844 {
845 "message": "A String", # [Output Only] An optional, human-readable error message.
846 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700847 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000848 },
849 ],
850 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800851 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700852 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800853 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000854 }</pre>
855</div>
856
857<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700858 <code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body, requestId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400859 <pre>Sets metadata common to all instances within the specified project using the data included in the request.
860
861Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000862 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400863 body: object, The request body. (required)
864 The object takes the form of:
865
866{ # A metadata key/value entry.
867 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
868 {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700869 "value": "A String", # Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).
John Asmuth614db982014-04-24 15:46:26 -0400870 "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.
871 },
872 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000873 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700874 "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.
875 #
876 # To see the latest fingerprint, make a get() request to retrieve the resource.
John Asmuth614db982014-04-24 15:46:26 -0400877}
878
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700879 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.
880
881For 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.
882
883The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
John Asmuth614db982014-04-24 15:46:26 -0400884
885Returns:
886 An object of the form:
887
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700888 { # Represents an Operation resource.
889 #
890 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
891 #
892 # Operations can be global, regional or zonal.
893 # - For global operations, use the globalOperations resource.
894 # - For regional operations, use the regionOperations resource.
895 # - For zonal operations, use the zonalOperations resource.
896 #
897 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800898 "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 -0700899 "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 -0400900 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800901 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800903 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
904 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000905 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800906 "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.
907 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -0800908 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800909 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
910 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000911 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400912 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800913 "message": "A String", # [Output Only] A human-readable description of the warning code.
914 "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.
915 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
916 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400917 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000918 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700919 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400920 },
921 ],
922 },
923 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000924 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800925 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
926 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000927 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700928 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000929 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800930 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400931 {
Craig Citroe633be12015-03-02 13:40:36 -0800932 "message": "A String", # [Output Only] An optional, human-readable error message.
933 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700934 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400935 },
936 ],
937 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800938 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700939 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800940 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400941 }</pre>
942</div>
943
Craig Citro065b5302014-08-14 00:47:23 -0700944<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700945 <code class="details" id="setDefaultNetworkTier">setDefaultNetworkTier(project, body, requestId=None)</code>
946 <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.
947
948Args:
949 project: string, Project ID for this request. (required)
950 body: object, The request body. (required)
951 The object takes the form of:
952
953{
954 "networkTier": "A String", # Default network tier to be set.
955 }
956
957 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.
958
959For 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.
960
961The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
962
963Returns:
964 An object of the form:
965
966 { # Represents an Operation resource.
967 #
968 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
969 #
970 # Operations can be global, regional or zonal.
971 # - For global operations, use the globalOperations resource.
972 # - For regional operations, use the regionOperations resource.
973 # - For zonal operations, use the zonalOperations resource.
974 #
975 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
976 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
977 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
978 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
979 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
980 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
981 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
982 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
983 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
984 "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.
985 "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.
986 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
987 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
988 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
989 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
990 {
991 "message": "A String", # [Output Only] A human-readable description of the warning code.
992 "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.
993 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
994 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
995 {
996 "value": "A String", # [Output Only] A warning data value corresponding to the key.
997 "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).
998 },
999 ],
1000 },
1001 ],
1002 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1003 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1004 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1005 "name": "A String", # [Output Only] Name of the resource.
1006 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1007 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1008 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1009 {
1010 "message": "A String", # [Output Only] An optional, human-readable error message.
1011 "code": "A String", # [Output Only] The error type identifier for this error.
1012 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1013 },
1014 ],
1015 },
1016 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1017 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1018 "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.
1019 }</pre>
1020</div>
1021
1022<div class="method">
1023 <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body, requestId=None)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001024 <pre>Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
Craig Citro065b5302014-08-14 00:47:23 -07001025
1026Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001027 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -07001028 body: object, The request body. (required)
1029 The object takes the form of:
1030
1031{ # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001032 "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.
1033 "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.
1034}
Craig Citro065b5302014-08-14 00:47:23 -07001035
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001036 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.
1037
1038For 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.
1039
1040The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -07001041
1042Returns:
1043 An object of the form:
1044
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001045 { # Represents an Operation resource.
1046 #
1047 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1048 #
1049 # Operations can be global, regional or zonal.
1050 # - For global operations, use the globalOperations resource.
1051 # - For regional operations, use the regionOperations resource.
1052 # - For zonal operations, use the zonalOperations resource.
1053 #
1054 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001055 "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 -07001056 "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 -04001057 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001058 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001059 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001060 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1061 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001062 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001063 "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.
1064 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Craig Citroe633be12015-03-02 13:40:36 -08001065 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001066 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1067 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001068 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -07001069 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001070 "message": "A String", # [Output Only] A human-readable description of the warning code.
1071 "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.
1072 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1073 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07001074 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001075 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001076 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Craig Citro065b5302014-08-14 00:47:23 -07001077 },
1078 ],
1079 },
1080 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001081 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001082 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1083 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001084 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001086 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001087 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07001088 {
Craig Citroe633be12015-03-02 13:40:36 -08001089 "message": "A String", # [Output Only] An optional, human-readable error message.
1090 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001091 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -07001092 },
1093 ],
1094 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001095 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001096 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001097 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Craig Citro065b5302014-08-14 00:47:23 -07001098 }</pre>
1099</div>
1100
John Asmuth614db982014-04-24 15:46:26 -04001101</body></html>