• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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">
78  <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">
90  <code><a href="#get">get(project)</a></code></p>
91<p class="firstline">Returns the specified Project resource.</p>
92<p class="toc_element">
93  <code><a href="#getXpnHost">getXpnHost(project)</a></code></p>
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">
108  <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">
114  <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>
116<p class="toc_element">
117  <code><a href="#setUsageExportBucket">setUsageExportBucket(project, body)</a></code></p>
118<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>
119<h3>Method Details</h3>
120<div class="method">
121    <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">
369    <code class="details" id="get">get(project)</code>
370  <pre>Returns the specified Project resource.
371
372Args:
373  project: string, Project ID for this request. (required)
374
375Returns:
376  An object of the form:
377
378    { # 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.
379    "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
380    "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
381    "enabledFeatures": [ # Restricted features enabled for use on this project.
382      "A String",
383    ],
384    "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information.
385      "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      ],
391      "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.
393    },
394    "quotas": [ # [Output Only] Quotas assigned to this project.
395      { # A quotas entry.
396        "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.
399      },
400    ],
401    "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.
403      "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.
407    "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
408    "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.
409    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
410    "description": "A String", # An optional textual description of the resource.
411  }</pre>
412</div>
413
414<div class="method">
415    <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">
580    <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{
589    "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
593    "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:
594        # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
595        # - projects/project/zones/zone
596        # - zones/zone
597  }
598
599
600Returns:
601  An object of the form:
602
603    { # An Operation resource, used to manage asynchronous API requests.
604    "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.
606    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
607    "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.
611    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
612    "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.
614    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
615    "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.
617    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
618      {
619        "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" }
623          {
624            "value": "A String", # [Output Only] A warning data value corresponding to the key.
625            "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).
626          },
627        ],
628      },
629    ],
630    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
631    "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.
633    "name": "A String", # [Output Only] Name of the resource.
634    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
635    "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.
640          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
641        },
642      ],
643    },
644    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
645    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
646    "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.
647  }</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{
660    "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
664    "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:
665        # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
666        # - projects/project/zones/zone
667        # - zones/zone
668  }
669
670
671Returns:
672  An object of the form:
673
674    { # An Operation resource, used to manage asynchronous API requests.
675    "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.
677    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
678    "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.
682    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
683    "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.
685    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
686    "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.
688    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
689      {
690        "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" }
694          {
695            "value": "A String", # [Output Only] A warning data value corresponding to the key.
696            "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).
697          },
698        ],
699      },
700    ],
701    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
702    "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.
704    "name": "A String", # [Output Only] Name of the resource.
705    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
706    "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.
711          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
712        },
713      ],
714    },
715    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
716    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
717    "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.
718  }</pre>
719</div>
720
721<div class="method">
722    <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:
726  project: string, Project ID for this request. (required)
727  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  ],
737  "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.
739}
740
741
742Returns:
743  An object of the form:
744
745    { # An Operation resource, used to manage asynchronous API requests.
746    "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.
748    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
749    "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.
753    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
754    "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.
756    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
757    "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.
759    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
760      {
761        "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" }
765          {
766            "value": "A String", # [Output Only] A warning data value corresponding to the key.
767            "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).
768          },
769        ],
770      },
771    ],
772    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
773    "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.
775    "name": "A String", # [Output Only] Name of the resource.
776    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
777    "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
778      "errors": [ # [Output Only] The array of errors encountered while processing this operation.
779        {
780          "message": "A String", # [Output Only] An optional, human-readable error message.
781          "code": "A String", # [Output Only] The error type identifier for this error.
782          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
783        },
784      ],
785    },
786    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
787    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
788    "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.
789  }</pre>
790</div>
791
792<div class="method">
793    <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body)</code>
794  <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.
795
796Args:
797  project: string, Project ID for this request. (required)
798  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.
802  "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}
805
806
807Returns:
808  An object of the form:
809
810    { # An Operation resource, used to manage asynchronous API requests.
811    "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.
813    "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
814    "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.
818    "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
819    "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.
821    "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
822    "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.
824    "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
825      {
826        "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" }
830          {
831            "value": "A String", # [Output Only] A warning data value corresponding to the key.
832            "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).
833          },
834        ],
835      },
836    ],
837    "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
838    "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.
840    "name": "A String", # [Output Only] Name of the resource.
841    "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
842    "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.
847          "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
848        },
849      ],
850    },
851    "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
852    "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
853    "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.
854  }</pre>
855</div>
856
857</body></html>