blob: 7f9969d61847ea05ece557fb641922c2e3307ee2 [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">
78 <code><a href="#get">get(project)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070079<p class="firstline">Returns the specified Project resource.</p>
John Asmuth614db982014-04-24 15:46:26 -040080<p class="toc_element">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000081 <code><a href="#moveDisk">moveDisk(project, body)</a></code></p>
82<p class="firstline">Moves a persistent disk from one zone to another.</p>
83<p class="toc_element">
84 <code><a href="#moveInstance">moveInstance(project, body)</a></code></p>
85<p class="firstline">Moves an instance and its attached persistent disks from one zone to another.</p>
86<p class="toc_element">
John Asmuth614db982014-04-24 15:46:26 -040087 <code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body)</a></code></p>
88<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 -070089<p class="toc_element">
90 <code><a href="#setUsageExportBucket">setUsageExportBucket(project, body)</a></code></p>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000091<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 -040092<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="get">get(project)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070095 <pre>Returns the specified Project resource.
John Asmuth614db982014-04-24 15:46:26 -040096
97Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +000098 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -040099
100Returns:
101 An object of the form:
102
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103 { # 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 +0000104 "kind": "compute#project", # [Output Only] Type of the resource. Always compute#project for projects.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700105 "defaultServiceAccount": "A String", # [Output Only] Default service account used by VMs running in this project.
Takashi Matsuo06694102015-09-11 13:55:40 -0700106 "enabledFeatures": [ # Restricted features enabled for use on this project.
107 "A String",
108 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000109 "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 -0400110 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
111 {
112 "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.
113 "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.
114 },
115 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000116 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
117 "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 -0400118 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000119 "quotas": [ # [Output Only] Quotas assigned to this project.
John Asmuth614db982014-04-24 15:46:26 -0400120 { # A quotas entry.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000121 "usage": 3.14, # [Output Only] Current usage of this metric.
122 "metric": "A String", # [Output Only] Name of the quota metric.
123 "limit": 3.14, # [Output Only] Quota limit for this metric.
John Asmuth614db982014-04-24 15:46:26 -0400124 },
125 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800126 "name": "A String", # The project ID. For example: my-example-project. Use the project ID to make requests to Compute Engine.
127 "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.
128 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000129 "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.
Craig Citro065b5302014-08-14 00:47:23 -0700130 },
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000131 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800132 "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 -0700133 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
134 "description": "A String", # An optional textual description of the resource.
John Asmuth614db982014-04-24 15:46:26 -0400135 }</pre>
136</div>
137
138<div class="method">
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000139 <code class="details" id="moveDisk">moveDisk(project, body)</code>
140 <pre>Moves a persistent disk from one zone to another.
141
142Args:
143 project: string, Project ID for this request. (required)
144 body: object, The request body. (required)
145 The object takes the form of:
146
147{
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000148 "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:
149 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
150 # - projects/project/zones/zone/disks/disk
151 # - zones/zone/disks/disk
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800152 "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 +0000153 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
154 # - projects/project/zones/zone
155 # - zones/zone
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000156 }
157
158
159Returns:
160 An object of the form:
161
Takashi Matsuo06694102015-09-11 13:55:40 -0700162 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800163 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
164 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400165 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800166 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
167 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
168 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
169 "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 +0000170 "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 -0800171 "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.
172 "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 +0000173 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800174 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
175 "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 +0000176 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
177 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800178 "message": "A String", # [Output Only] A human-readable description of the warning code.
179 "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.
180 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
181 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000182 {
183 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700184 "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 +0000185 },
186 ],
187 },
188 ],
189 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800190 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
191 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000192 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800193 "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 +0000194 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
195 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
196 {
197 "message": "A String", # [Output Only] An optional, human-readable error message.
198 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700199 "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 +0000200 },
201 ],
202 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800203 "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 -0700204 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800205 "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 +0000206 }</pre>
207</div>
208
209<div class="method">
210 <code class="details" id="moveInstance">moveInstance(project, body)</code>
211 <pre>Moves an instance and its attached persistent disks from one zone to another.
212
213Args:
214 project: string, Project ID for this request. (required)
215 body: object, The request body. (required)
216 The object takes the form of:
217
218{
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000219 "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:
220 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
221 # - projects/project/zones/zone/instances/instance
222 # - zones/zone/instances/instance
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800223 "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 +0000224 # - https://www.googleapis.com/compute/v1/projects/project/zones/zone
225 # - projects/project/zones/zone
226 # - zones/zone
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000227 }
228
229
230Returns:
231 An object of the form:
232
Takashi Matsuo06694102015-09-11 13:55:40 -0700233 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800234 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
235 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400236 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800237 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
238 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
239 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
240 "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 +0000241 "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 -0800242 "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.
243 "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 +0000244 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800245 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
246 "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 +0000247 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
248 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800249 "message": "A String", # [Output Only] A human-readable description of the warning code.
250 "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.
251 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
252 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000253 {
254 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700255 "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 +0000256 },
257 ],
258 },
259 ],
260 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800261 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
262 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000263 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800264 "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 +0000265 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
266 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
267 {
268 "message": "A String", # [Output Only] An optional, human-readable error message.
269 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700270 "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 +0000271 },
272 ],
273 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800274 "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 -0700275 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800276 "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 +0000277 }</pre>
278</div>
279
280<div class="method">
John Asmuth614db982014-04-24 15:46:26 -0400281 <code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body)</code>
282 <pre>Sets metadata common to all instances within the specified project using the data included in the request.
283
284Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000285 project: string, Project ID for this request. (required)
John Asmuth614db982014-04-24 15:46:26 -0400286 body: object, The request body. (required)
287 The object takes the form of:
288
289{ # A metadata key/value entry.
290 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
291 {
292 "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.
293 "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.
294 },
295 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000296 "kind": "compute#metadata", # [Output Only] Type of the resource. Always compute#metadata for metadata.
297 "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 -0400298}
299
300
301Returns:
302 An object of the form:
303
Takashi Matsuo06694102015-09-11 13:55:40 -0700304 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800305 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
306 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400307 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800308 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
309 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
310 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
311 "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 +0000312 "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 -0800313 "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.
314 "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 -0800315 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800316 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
317 "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 +0000318 "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 -0400319 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800320 "message": "A String", # [Output Only] A human-readable description of the warning code.
321 "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.
322 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
323 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
John Asmuth614db982014-04-24 15:46:26 -0400324 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000325 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700326 "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 -0400327 },
328 ],
329 },
330 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000331 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800332 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
333 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000334 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800335 "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 +0000336 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800337 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400338 {
Craig Citroe633be12015-03-02 13:40:36 -0800339 "message": "A String", # [Output Only] An optional, human-readable error message.
340 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700341 "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 -0400342 },
343 ],
344 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800345 "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 -0700346 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800347 "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 -0400348 }</pre>
349</div>
350
Craig Citro065b5302014-08-14 00:47:23 -0700351<div class="method">
352 <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body)</code>
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000353 <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 -0700354
355Args:
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000356 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700357 body: object, The request body. (required)
358 The object takes the form of:
359
360{ # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800361 "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.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000362 "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.
Craig Citro065b5302014-08-14 00:47:23 -0700363 }
364
365
366Returns:
367 An object of the form:
368
Takashi Matsuo06694102015-09-11 13:55:40 -0700369 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800370 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
371 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400372 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800373 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
374 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
375 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
376 "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 +0000377 "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 -0800378 "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.
379 "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 -0800380 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800381 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
382 "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 +0000383 "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 -0700384 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800385 "message": "A String", # [Output Only] A human-readable description of the warning code.
386 "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.
387 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
388 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -0700389 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000390 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700391 "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 -0700392 },
393 ],
394 },
395 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000396 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800397 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
398 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000399 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800400 "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 +0000401 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800402 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700403 {
Craig Citroe633be12015-03-02 13:40:36 -0800404 "message": "A String", # [Output Only] An optional, human-readable error message.
405 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700406 "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 -0700407 },
408 ],
409 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800410 "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 -0700411 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800412 "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 -0700413 }</pre>
414</div>
415
John Asmuth614db982014-04-24 15:46:26 -0400416</body></html>