blob: deb7c0916b6d4ba6c65152ea9e486b090145b6e7 [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>
79<p class="firstline">Returns the specified project resource.</p>
80<p class="toc_element">
81 <code><a href="#setCommonInstanceMetadata">setCommonInstanceMetadata(project, body)</a></code></p>
82<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 -070083<p class="toc_element">
84 <code><a href="#setUsageExportBucket">setUsageExportBucket(project, body)</a></code></p>
85<p class="firstline">Sets usage export location</p>
John Asmuth614db982014-04-24 15:46:26 -040086<h3>Method Details</h3>
87<div class="method">
88 <code class="details" id="get">get(project)</code>
89 <pre>Returns the specified project resource.
90
91Args:
92 project: string, Name of the project resource to retrieve. (required)
93
94Returns:
95 An object of the form:
96
97 { # A project resource. Projects can be created only in the APIs Console. Unless marked otherwise, values can only be modified in the console.
98 "kind": "compute#project", # Type of the resource.
99 "description": "A String", # An optional textual description of the resource.
100 "commonInstanceMetadata": { # A metadata key/value entry. # Metadata key/value pairs available to all instances contained in this project.
101 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
102 {
103 "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.
104 "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.
105 },
106 ],
107 "kind": "compute#metadata", # Type of the resource.
108 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
109 },
110 "quotas": [ # Quotas assigned to this project.
111 { # A quotas entry.
112 "usage": 3.14, # Current usage of this metric.
113 "metric": "A String", # Name of the quota metric.
114 "limit": 3.14, # Quota limit for this metric.
115 },
116 ],
Craig Citro065b5302014-08-14 00:47:23 -0700117 "usageExportLocation": { # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix. # The location in Cloud Storage and naming method of the daily usage report.
118 "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 is simply the bucket name, with no "gs://" or "https://storage.googleapis.com/" in front of it.
119 "reportNamePrefix": "A String", # An optional prefix for the name of the usage report object stored in bucket_name. If not supplied, defaults to "usage_". The report is stored as a CSV file named _gce_.csv. where is the day of the usage according to Pacific Time. The prefix should conform to Cloud Storage object naming conventions.
120 },
John Asmuth614db982014-04-24 15:46:26 -0400121 "creationTimestamp": "A String", # Creation timestamp in RFC3339 text format (output only).
122 "id": "A String", # Unique identifier for the resource; defined by the server (output only).
123 "selfLink": "A String", # Server defined URL for the resource (output only).
124 "name": "A String", # Name of the resource.
125 }</pre>
126</div>
127
128<div class="method">
129 <code class="details" id="setCommonInstanceMetadata">setCommonInstanceMetadata(project, body)</code>
130 <pre>Sets metadata common to all instances within the specified project using the data included in the request.
131
132Args:
133 project: string, Name of the project scoping this request. (required)
134 body: object, The request body. (required)
135 The object takes the form of:
136
137{ # A metadata key/value entry.
138 "items": [ # Array of key/value pairs. The total size of all keys and values must be less than 512 KB.
139 {
140 "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.
141 "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.
142 },
143 ],
144 "kind": "compute#metadata", # Type of the resource.
145 "fingerprint": "A String", # Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.
146}
147
148
149Returns:
150 An object of the form:
151
152 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800153 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
154 "clientOperationId": "A String",
155 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
156 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
157 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
158 "operationType": "A String",
159 "httpErrorMessage": "A String",
160 "progress": 42,
161 "httpErrorStatusCode": 42,
162 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
163 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
164 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
165 "warnings": [
John Asmuth614db982014-04-24 15:46:26 -0400166 {
167 "message": "A String", # Optional human-readable details for this warning.
168 "code": "A String", # The warning type identifier for this warning.
169 "data": [ # Metadata for this warning in 'key: value' format.
170 {
171 "value": "A String", # A warning data value corresponding to the key.
172 "key": "A String", # A key for the warning data.
173 },
174 ],
175 },
176 ],
Craig Citroe633be12015-03-02 13:40:36 -0800177 "user": "A String",
178 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
179 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
180 "name": "A String", # [Output Only] Name of the resource (output only).
181 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
182 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
183 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
John Asmuth614db982014-04-24 15:46:26 -0400184 {
Craig Citroe633be12015-03-02 13:40:36 -0800185 "message": "A String", # [Output Only] An optional, human-readable error message.
186 "code": "A String", # [Output Only] The error type identifier for this error.
187 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
John Asmuth614db982014-04-24 15:46:26 -0400188 },
189 ],
190 },
Craig Citroe633be12015-03-02 13:40:36 -0800191 "endTime": "A String",
192 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
193 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
John Asmuth614db982014-04-24 15:46:26 -0400194 }</pre>
195</div>
196
Craig Citro065b5302014-08-14 00:47:23 -0700197<div class="method">
198 <code class="details" id="setUsageExportBucket">setUsageExportBucket(project, body)</code>
199 <pre>Sets usage export location
200
201Args:
202 project: string, Name of the project scoping this request. (required)
203 body: object, The request body. (required)
204 The object takes the form of:
205
206{ # The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.
207 "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 is simply the bucket name, with no "gs://" or "https://storage.googleapis.com/" in front of it.
208 "reportNamePrefix": "A String", # An optional prefix for the name of the usage report object stored in bucket_name. If not supplied, defaults to "usage_". The report is stored as a CSV file named _gce_.csv. where is the day of the usage according to Pacific Time. The prefix should conform to Cloud Storage object naming conventions.
209 }
210
211
212Returns:
213 An object of the form:
214
215 { # An operation resource, used to manage asynchronous API requests.
Craig Citroe633be12015-03-02 13:40:36 -0800216 "targetId": "A String", # [Output Only] Unique target id which identifies a particular incarnation of the target.
217 "clientOperationId": "A String",
218 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format (output only).
219 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
220 "zone": "A String", # [Output Only] URL of the zone where the operation resides (output only).
221 "operationType": "A String",
222 "httpErrorMessage": "A String",
223 "progress": 42,
224 "httpErrorStatusCode": 42,
225 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
226 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: "PENDING", "RUNNING", or "DONE".
227 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC 3339 format.
228 "warnings": [
Craig Citro065b5302014-08-14 00:47:23 -0700229 {
230 "message": "A String", # Optional human-readable details for this warning.
231 "code": "A String", # The warning type identifier for this warning.
232 "data": [ # Metadata for this warning in 'key: value' format.
233 {
234 "value": "A String", # A warning data value corresponding to the key.
235 "key": "A String", # A key for the warning data.
236 },
237 ],
238 },
239 ],
Craig Citroe633be12015-03-02 13:40:36 -0800240 "user": "A String",
241 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC 3339 format.
242 "kind": "compute#operation", # [Output Only] Type of the resource. Always kind#operation for Operation resources.
243 "name": "A String", # [Output Only] Name of the resource (output only).
244 "region": "A String", # [Output Only] URL of the region where the operation resides (output only).
245 "error": { # [Output Only] If errors occurred during processing of this operation, this field will be populated.
246 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700247 {
Craig Citroe633be12015-03-02 13:40:36 -0800248 "message": "A String", # [Output Only] An optional, human-readable error message.
249 "code": "A String", # [Output Only] The error type identifier for this error.
250 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -0700251 },
252 ],
253 },
Craig Citroe633be12015-03-02 13:40:36 -0800254 "endTime": "A String",
255 "selfLink": "A String", # [Output Only] Server defined URL for the resource.
256 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating (output only).
Craig Citro065b5302014-08-14 00:47:23 -0700257 }</pre>
258</div>
259
John Asmuth614db982014-04-24 15:46:26 -0400260</body></html>