blob: 6b00a07ff9593b6c877b4ce00ec03d6ab2603edc [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">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040078 <code><a href="#disableXpnHost">disableXpnHost(project)</a></code></p>
79<p class="firstline">Disable this project as an XPN host project.</p>
80<p class="toc_element">
81 <code><a href="#disableXpnResource">disableXpnResource(project, body)</a></code></p>
82<p class="firstline">Disable an XPN resource associated with this host project.</p>
83<p class="toc_element">
84 <code><a href="#enableXpnHost">enableXpnHost(project)</a></code></p>
85<p class="firstline">Enable this project as an XPN host project.</p>
86<p class="toc_element">
87 <code><a href="#enableXpnResource">enableXpnResource(project, body)</a></code></p>
88<p class="firstline">Enable XPN resource (a.k.a service project or service folder in the future) for a host project, so that subnetworks in the host project can be used by instances in the service project or folder.</p>
89<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>
94<p class="firstline">Get the XPN host project that this project links to. May be empty if no link exists.</p>
95<p class="toc_element">
96 <code><a href="#getXpnResources">getXpnResources(project, order_by=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
97<p class="firstline">Get XPN resources associated with this host project.</p>
98<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>
103<p class="firstline">List all XPN host projects visible to the user in an organization.</p>
104<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">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000108 <code><a href="#moveDisk">moveDisk(project, body)</a></code></p>
109<p class="firstline">Moves a persistent disk from one zone to another.</p>
110<p class="toc_element">
111 <code><a href="#moveInstance">moveInstance(project, body)</a></code></p>
112<p class="firstline">Moves an instance and its attached persistent disks from one zone to another.</p>
113<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -0400114 <code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body)</a></code></p>
115<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">
117 <code><a href="#setUsageExportBucket">setUsageExportBucket(project, body)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000118<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 -0400119<h3>Method Details</h3>
120<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400121 <code class="details" id="disableXpnHost">disableXpnHost(project)</code>
122 <pre>Disable this project as an XPN host project.
123
124Args:
125 project: string, Project ID for this request. (required)
126
127Returns:
128 An object of the form:
129
130 { # An Operation resource, used to manage asynchronous API requests.
131 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
132 "clientOperationId": "A String", # [Output Only] Reserved for future use.
133 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
134 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
135 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
136 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
137 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
138 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
139 "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.
140 "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.
141 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
142 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
143 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
144 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
145 {
146 "message": "A String", # [Output Only] A human-readable description of the warning code.
147 "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.
148 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
149 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
150 {
151 "value": "A String", # [Output Only] A warning data value corresponding to the key.
152 "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).
153 },
154 ],
155 },
156 ],
157 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
158 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
159 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
160 "name": "A String", # [Output Only] Name of the resource.
161 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
162 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
163 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
164 {
165 "message": "A String", # [Output Only] An optional, human-readable error message.
166 "code": "A String", # [Output Only] The error type identifier for this error.
167 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
168 },
169 ],
170 },
171 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
172 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
173 "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.
174 }</pre>
175</div>
176
177<div class="method">
178 <code class="details" id="disableXpnResource">disableXpnResource(project, body)</code>
179 <pre>Disable an XPN resource associated with this host project.
180
181Args:
182 project: string, Project ID for this request. (required)
183 body: object, The request body. (required)
184 The object takes the form of:
185
186{
187 "xpnResource": { # XpnResourceId # XPN resource ID.
188 "type": "A String", # The type of the XPN resource.
189 "id": "A String", # The ID of the XPN resource. In the case of projects, this field matches the project's name, not the canonical ID.
190 },
191 }
192
193
194Returns:
195 An object of the form:
196
197 { # An Operation resource, used to manage asynchronous API requests.
198 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
199 "clientOperationId": "A String", # [Output Only] Reserved for future use.
200 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
201 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
202 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
203 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
204 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
205 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
206 "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.
207 "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.
208 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
209 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
210 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
211 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
212 {
213 "message": "A String", # [Output Only] A human-readable description of the warning code.
214 "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.
215 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
216 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
217 {
218 "value": "A String", # [Output Only] A warning data value corresponding to the key.
219 "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).
220 },
221 ],
222 },
223 ],
224 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
225 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
226 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
227 "name": "A String", # [Output Only] Name of the resource.
228 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
229 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
230 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
231 {
232 "message": "A String", # [Output Only] An optional, human-readable error message.
233 "code": "A String", # [Output Only] The error type identifier for this error.
234 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
235 },
236 ],
237 },
238 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
239 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
240 "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.
241 }</pre>
242</div>
243
244<div class="method">
245 <code class="details" id="enableXpnHost">enableXpnHost(project)</code>
246 <pre>Enable this project as an XPN host project.
247
248Args:
249 project: string, Project ID for this request. (required)
250
251Returns:
252 An object of the form:
253
254 { # An Operation resource, used to manage asynchronous API requests.
255 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
256 "clientOperationId": "A String", # [Output Only] Reserved for future use.
257 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
258 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
259 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
260 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
261 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
262 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
263 "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.
264 "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.
265 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
266 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
267 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
268 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
269 {
270 "message": "A String", # [Output Only] A human-readable description of the warning code.
271 "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.
272 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
273 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
274 {
275 "value": "A String", # [Output Only] A warning data value corresponding to the key.
276 "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).
277 },
278 ],
279 },
280 ],
281 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
282 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
283 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
284 "name": "A String", # [Output Only] Name of the resource.
285 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
286 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
287 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
288 {
289 "message": "A String", # [Output Only] An optional, human-readable error message.
290 "code": "A String", # [Output Only] The error type identifier for this error.
291 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
292 },
293 ],
294 },
295 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
296 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
297 "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.
298 }</pre>
299</div>
300
301<div class="method">
302 <code class="details" id="enableXpnResource">enableXpnResource(project, body)</code>
303 <pre>Enable XPN resource (a.k.a service project or service folder in the future) for a host project, so that subnetworks in the host project can be used by instances in the service project or folder.
304
305Args:
306 project: string, Project ID for this request. (required)
307 body: object, The request body. (required)
308 The object takes the form of:
309
310{
311 "xpnResource": { # XpnResourceId # XPN resource ID.
312 "type": "A String", # The type of the XPN resource.
313 "id": "A String", # The ID of the XPN resource. In the case of projects, this field matches the project's name, not the canonical ID.
314 },
315 }
316
317
318Returns:
319 An object of the form:
320
321 { # An Operation resource, used to manage asynchronous API requests.
322 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
323 "clientOperationId": "A String", # [Output Only] Reserved for future use.
324 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
325 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
326 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
327 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
328 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
329 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
330 "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.
331 "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.
332 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
333 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
334 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
335 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
336 {
337 "message": "A String", # [Output Only] A human-readable description of the warning code.
338 "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.
339 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
340 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
341 {
342 "value": "A String", # [Output Only] A warning data value corresponding to the key.
343 "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).
344 },
345 ],
346 },
347 ],
348 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
349 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
350 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
351 "name": "A String", # [Output Only] Name of the resource.
352 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
353 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
354 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
355 {
356 "message": "A String", # [Output Only] An optional, human-readable error message.
357 "code": "A String", # [Output Only] The error type identifier for this error.
358 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
359 },
360 ],
361 },
362 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
363 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
364 "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.
365 }</pre>
366</div>
367
368<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400369 <code class="details" id="get">get(project)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700370 <pre>Returns the specified Project resource.
John Asmuth614db982014-04-24 15:46:26 -0400371
372Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000373 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400374
375Returns:
376 An object of the form:
377
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800378 { # A Project resource. Projects can only be created in the Google Cloud Platform Console. Unless marked otherwise, values can only be modified in the console.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000379 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700380 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
Takashi Matsuo06694102015-09-11 13:55:40 -0700381 "enabledFeatures": [ # Restricted features enabled for use on this project.
382 "A String",
383 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000384 "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 -0400385 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
386 {
387 "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 32768 bytes.
388 "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.
389 },
390 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000391 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
392 "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.
John Asmuth614db982014-04-24 15:46:26 -0400393 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000394 "quotas": [ # [Output Only] Quotas assigned to this project.
John Asmuth614db982014-04-24 15:46:26 -0400395 { # A quotas entry.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000396 "usage": 3.14, # [Output Only] Current usage of this metric.
397 "metric": "A String", # [Output Only] Name of the quota metric.
398 "limit": 3.14, # [Output Only] Quota limit for this metric.
John Asmuth614db982014-04-24 15:46:26 -0400399 },
400 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800401 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
402 "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 -0400403 "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.
404 "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.
405 },
406 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a Cross Project Network (XPN) configuration. Currently only HOST projects are differentiated.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000407 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800408 "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 -0700409 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
410 "description": "A String", # An optional textual description of the resource.
John Asmuth614db982014-04-24 15:46:26 -0400411 }</pre>
412</div>
413
414<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400415 <code class="details" id="getXpnHost">getXpnHost(project)</code>
416 <pre>Get the XPN host project that this project links to. May be empty if no link exists.
417
418Args:
419 project: string, Project ID for this request. (required)
420
421Returns:
422 An object of the form:
423
424 { # A Project resource. Projects can only be created in the Google Cloud Platform Console. Unless marked otherwise, values can only be modified in the console.
425 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
426 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
427 "enabledFeatures": [ # Restricted features enabled for use on this project.
428 "A String",
429 ],
430 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
431 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
432 {
433 "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 32768 bytes.
434 "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.
435 },
436 ],
437 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
438 "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.
439 },
440 "quotas": [ # [Output Only] Quotas assigned to this project.
441 { # A quotas entry.
442 "usage": 3.14, # [Output Only] Current usage of this metric.
443 "metric": "A String", # [Output Only] Name of the quota metric.
444 "limit": 3.14, # [Output Only] Quota limit for this metric.
445 },
446 ],
447 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
448 "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.
449 "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.
450 "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.
451 },
452 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a Cross Project Network (XPN) configuration. Currently only HOST projects are differentiated.
453 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
454 "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.
455 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
456 "description": "A String", # An optional textual description of the resource.
457 }</pre>
458</div>
459
460<div class="method">
461 <code class="details" id="getXpnResources">getXpnResources(project, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
462 <pre>Get XPN resources associated with this host project.
463
464Args:
465 project: string, Project ID for this request. (required)
466 order_by: string, A parameter
467 maxResults: integer, A parameter
468 pageToken: string, A parameter
469 filter: string, A parameter
470
471Returns:
472 An object of the form:
473
474 {
475 "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.
476 "kind": "compute#projectsGetXpnResources", # [Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of XPN resources.
477 "resources": [ # XPN resources attached to this project as their XPN host.
478 { # XpnResourceId
479 "type": "A String", # The type of the XPN resource.
480 "id": "A String", # The ID of the XPN resource. In the case of projects, this field matches the project's name, not the canonical ID.
481 },
482 ],
483 }</pre>
484</div>
485
486<div class="method">
487 <code class="details" id="getXpnResources_next">getXpnResources_next(previous_request, previous_response)</code>
488 <pre>Retrieves the next page of results.
489
490Args:
491 previous_request: The request for the previous page. (required)
492 previous_response: The response from the request for the previous page. (required)
493
494Returns:
495 A request object that you can call 'execute()' on to request the next
496 page. Returns None if there are no more items in the collection.
497 </pre>
498</div>
499
500<div class="method">
501 <code class="details" id="listXpnHosts">listXpnHosts(project, body, order_by=None, maxResults=None, pageToken=None, filter=None)</code>
502 <pre>List all XPN host projects visible to the user in an organization.
503
504Args:
505 project: string, Project ID for this request. (required)
506 body: object, The request body. (required)
507 The object takes the form of:
508
509{
510 "organization": "A String", # Optional organization ID managed by Cloud Resource Manager, for which to list XPN host projects. If not specified, the organization will be inferred from the project.
511 }
512
513 order_by: string, A parameter
514 maxResults: integer, A parameter
515 pageToken: string, A parameter
516 filter: string, A parameter
517
518Returns:
519 An object of the form:
520
521 {
522 "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.
523 "items": [ # [Output Only] A list of XPN host project URLs.
524 { # A Project resource. Projects can only be created in the Google Cloud Platform Console. Unless marked otherwise, values can only be modified in the console.
525 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
526 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
527 "enabledFeatures": [ # Restricted features enabled for use on this project.
528 "A String",
529 ],
530 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
531 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
532 {
533 "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 32768 bytes.
534 "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.
535 },
536 ],
537 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
538 "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.
539 },
540 "quotas": [ # [Output Only] Quotas assigned to this project.
541 { # A quotas entry.
542 "usage": 3.14, # [Output Only] Current usage of this metric.
543 "metric": "A String", # [Output Only] Name of the quota metric.
544 "limit": 3.14, # [Output Only] Quota limit for this metric.
545 },
546 ],
547 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
548 "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.
549 "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.
550 "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.
551 },
552 "xpnProjectStatus": "A String", # [Output Only] The role this project has in a Cross Project Network (XPN) configuration. Currently only HOST projects are differentiated.
553 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
554 "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.
555 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
556 "description": "A String", # An optional textual description of the resource.
557 },
558 ],
559 "kind": "compute#xpnHostList", # [Output Only] Type of resource. Always compute#xpnHostList for lists of XPN hosts.
560 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
561 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
562 }</pre>
563</div>
564
565<div class="method">
566 <code class="details" id="listXpnHosts_next">listXpnHosts_next(previous_request, previous_response)</code>
567 <pre>Retrieves the next page of results.
568
569Args:
570 previous_request: The request for the previous page. (required)
571 previous_response: The response from the request for the previous page. (required)
572
573Returns:
574 A request object that you can call 'execute()' on to request the next
575 page. Returns None if there are no more items in the collection.
576 </pre>
577</div>
578
579<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000580 <code class="details" id="moveDisk">moveDisk(project, body)</code>
581 <pre>Moves a persistent disk from one zone to another.
582
583Args:
584 project: string, Project ID for this request. (required)
585 body: object, The request body. (required)
586 The object takes the form of:
587
588{
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000589 "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:
590 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
591 # - projects/project/zones/zone/disks/disk
592 # - zones/zone/disks/disk
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800593 "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 +0000594 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
595 # - projects/project/zones/zone
596 # - zones/zone
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000597 }
598
599
600Returns:
601 An object of the form:
602
Takashi Matsuo06694102015-09-11 13:55:40 -0700603 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800604 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
605 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400606 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800607 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
608 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
609 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
610 "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 +0000611 "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 -0800612 "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.
613 "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 +0000614 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800615 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
616 "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 +0000617 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
618 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800619 "message": "A String", # [Output Only] A human-readable description of the warning code.
620 "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.
621 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
622 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000623 {
624 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700625 "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 +0000626 },
627 ],
628 },
629 ],
630 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800631 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
632 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000633 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800634 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000635 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
636 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
637 {
638 "message": "A String", # [Output Only] An optional, human-readable error message.
639 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700640 "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 +0000641 },
642 ],
643 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800644 "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 -0700645 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800646 "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 +0000647 }</pre>
648</div>
649
650<div class="method">
651 <code class="details" id="moveInstance">moveInstance(project, body)</code>
652 <pre>Moves an instance and its attached persistent disks from one zone to another.
653
654Args:
655 project: string, Project ID for this request. (required)
656 body: object, The request body. (required)
657 The object takes the form of:
658
659{
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000660 "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:
661 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
662 # - projects/project/zones/zone/instances/instance
663 # - zones/zone/instances/instance
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800664 "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 +0000665 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
666 # - projects/project/zones/zone
667 # - zones/zone
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000668 }
669
670
671Returns:
672 An object of the form:
673
Takashi Matsuo06694102015-09-11 13:55:40 -0700674 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800675 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
676 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400677 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800678 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
679 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
680 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
681 "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 +0000682 "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 -0800683 "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.
684 "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 +0000685 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800686 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
687 "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 +0000688 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
689 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800690 "message": "A String", # [Output Only] A human-readable description of the warning code.
691 "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.
692 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
693 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000694 {
695 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700696 "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 +0000697 },
698 ],
699 },
700 ],
701 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800702 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
703 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000704 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800705 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000706 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
707 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
708 {
709 "message": "A String", # [Output Only] An optional, human-readable error message.
710 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700711 "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 +0000712 },
713 ],
714 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800715 "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 -0700716 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800717 "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 +0000718 }</pre>
719</div>
720
721<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400722 <code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body)</code>
723 <pre>Sets metadata common to all instances within the specified project using the data included in the request.
724
725Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000726 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400727 body: object, The request body. (required)
728 The object takes the form of:
729
730{ # A metadata key/value entry.
731 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
732 {
733 "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 32768 bytes.
734 "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.
735 },
736 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000737 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
738 "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.
John Asmuth614db982014-04-24 15:46:26 -0400739}
740
741
742Returns:
743 An object of the form:
744
Takashi Matsuo06694102015-09-11 13:55:40 -0700745 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800746 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
747 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400748 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800749 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
750 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
751 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
752 "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 +0000753 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800754 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
755 "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 -0800756 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800757 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
758 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000759 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
John Asmuth614db982014-04-24 15:46:26 -0400760 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800761 "message": "A String", # [Output Only] A human-readable description of the warning code.
762 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
763 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
764 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400765 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000766 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700767 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
John Asmuth614db982014-04-24 15:46:26 -0400768 },
769 ],
770 },
771 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000772 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800773 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
774 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000775 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800776 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000777 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800778 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400779 {
Craig Citroe633be12015-03-02 13:40:36 -0800780 "message": "A String", # [Output Only] An optional, human-readable error message.
781 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700782 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400783 },
784 ],
785 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800786 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700787 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800788 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
John Asmuth614db982014-04-24 15:46:26 -0400789 }</pre>
790</div>
791
Craig Citro065b5302014-08-14 00:47:23 -0700792<div class="method">
793 <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000794 <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 -0700795
796Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000797 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700798 body: object, The request body. (required)
799 The object takes the form of:
800
801{ # 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 -0400802 "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.
803 "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.
804}
Craig Citro065b5302014-08-14 00:47:23 -0700805
806
807Returns:
808 An object of the form:
809
Takashi Matsuo06694102015-09-11 13:55:40 -0700810 { # An Operation resource, used to manage asynchronous API requests.
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.
812 "clientOperationId": "A String", # [Output Only] Reserved for future use.
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.
815 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
816 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800821 "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.
Craig Citro065b5302014-08-14 00:47:23 -0700825 {
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" }
Craig Citro065b5302014-08-14 00:47:23 -0700830 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000831 "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).
Craig Citro065b5302014-08-14 00:47:23 -0700833 },
834 ],
835 },
836 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000837 "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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800841 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available 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.
Craig Citroe633be12015-03-02 13:40:36 -0800843 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700844 {
Craig Citroe633be12015-03-02 13:40:36 -0800845 "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.
Craig Citro065b5302014-08-14 00:47:23 -0700848 },
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.
Craig Citro065b5302014-08-14 00:47:23 -0700854 }</pre>
855</div>
856
John Asmuth614db982014-04-24 15:46:26 -0400857</body></html>