blob: 1b258d86a62905922c6a5643ffc269d35b7f141d [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001<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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.hosts.html">hosts</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
79<p class="firstline">Retrieves an aggregated list of hosts.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(project, zone, host)</a></code></p>
85<p class="firstline">Deletes the specified Host resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, zone, host)</a></code></p>
88<p class="firstline">Returns the specified host. Get a list of available hosts by making a list() request.</p>
89<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070090 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p>
91<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080093 <code><a href="#insert">insert(project, zone, body)</a></code></p>
94<p class="firstline">Creates a host resource in the specified project using the data included in the request.</p>
95<p class="toc_element">
96 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
97<p class="firstline">Retrieves a list of hosts available to the specified project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700102 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body)</a></code></p>
103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
104<p class="toc_element">
105 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
106<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
107<h3>Method Details</h3>
108<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800109 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
110 <pre>Retrieves an aggregated list of hosts.
111
112Args:
113 project: string, Project ID for this request. (required)
114 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
115
116You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
117
118Currently, only sorting by name or creationTimestamp desc is supported.
119 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.
120 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
121 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
122
123The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
124
125For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
126
127You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
128
129To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
130
131Returns:
132 An object of the form:
133
134 {
135 "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.
136 "items": { # [Output Only] A map of scoped host lists.
137 "a_key": { # [Output Only] Name of the scope containing this set of hosts.
138 "warning": { # [Output Only] An informational warning that appears when the host list is empty.
139 "message": "A String", # [Output Only] A human-readable description of the warning code.
140 "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.
141 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
142 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
143 {
144 "value": "A String", # [Output Only] A warning data value corresponding to the key.
145 "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).
146 },
147 ],
148 },
149 "hosts": [ # [Output Only] List of hosts contained in this scope.
150 {
151 "status": "A String", # [Output Only] The status of the host. One of the following values: CREATING, READY, REPAIR, and DELETING.
152 "kind": "compute#host", # [Output Only] The type of the resource. Always compute#host for host.
153 "description": "A String", # [Output Only] An optional textual description of the resource.
154 "zone": "A String", # [Output Only] The name of the zone where the host resides, such as us-central1-a.
155 "hostType": "A String", # Full or partial URL of the host type resource to use for this host, in the format: zones/zone/hostTypes/host-type. This is provided by the client when the host is created. For example, the following is a valid partial url to a predefined host type:
156 #
157 # zones/us-central1-f/hostTypes/n1-host-64-416
158 "instances": [ # A list of resource URLs to the virtual machine instances in this host. They must live in zones contained in the same region as this host.
159 "A String",
160 ],
161 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
162 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
163 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
164 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
165 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
166 },
167 ],
168 },
169 },
170 "kind": "compute#hostAggregatedList", # [Output Only] Type of resource. Always compute#hostAggregatedList for aggregated lists of hosts.
171 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
172 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
173 }</pre>
174</div>
175
176<div class="method">
177 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
178 <pre>Retrieves the next page of results.
179
180Args:
181 previous_request: The request for the previous page. (required)
182 previous_response: The response from the request for the previous page. (required)
183
184Returns:
185 A request object that you can call 'execute()' on to request the next
186 page. Returns None if there are no more items in the collection.
187 </pre>
188</div>
189
190<div class="method">
191 <code class="details" id="delete">delete(project, zone, host)</code>
192 <pre>Deletes the specified Host resource.
193
194Args:
195 project: string, Project ID for this request. (required)
196 zone: string, The name of the zone for this request. (required)
197 host: string, Name of the Host resource to delete. (required)
198
199Returns:
200 An object of the form:
201
202 { # An Operation resource, used to manage asynchronous API requests.
203 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
204 "clientOperationId": "A String", # [Output Only] Reserved for future use.
205 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
206 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
207 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
208 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
209 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
210 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
211 "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.
212 "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.
213 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
214 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
215 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
216 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
217 {
218 "message": "A String", # [Output Only] A human-readable description of the warning code.
219 "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.
220 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
221 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
222 {
223 "value": "A String", # [Output Only] A warning data value corresponding to the key.
224 "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).
225 },
226 ],
227 },
228 ],
229 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
230 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
231 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
232 "name": "A String", # [Output Only] Name of the resource.
233 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
234 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
235 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
236 {
237 "message": "A String", # [Output Only] An optional, human-readable error message.
238 "code": "A String", # [Output Only] The error type identifier for this error.
239 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
240 },
241 ],
242 },
243 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
244 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
245 "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.
246 }</pre>
247</div>
248
249<div class="method">
250 <code class="details" id="get">get(project, zone, host)</code>
251 <pre>Returns the specified host. Get a list of available hosts by making a list() request.
252
253Args:
254 project: string, Project ID for this request. (required)
255 zone: string, The name of the zone for this request. (required)
256 host: string, Name of the host to return. (required)
257
258Returns:
259 An object of the form:
260
261 {
262 "status": "A String", # [Output Only] The status of the host. One of the following values: CREATING, READY, REPAIR, and DELETING.
263 "kind": "compute#host", # [Output Only] The type of the resource. Always compute#host for host.
264 "description": "A String", # [Output Only] An optional textual description of the resource.
265 "zone": "A String", # [Output Only] The name of the zone where the host resides, such as us-central1-a.
266 "hostType": "A String", # Full or partial URL of the host type resource to use for this host, in the format: zones/zone/hostTypes/host-type. This is provided by the client when the host is created. For example, the following is a valid partial url to a predefined host type:
267 #
268 # zones/us-central1-f/hostTypes/n1-host-64-416
269 "instances": [ # A list of resource URLs to the virtual machine instances in this host. They must live in zones contained in the same region as this host.
270 "A String",
271 ],
272 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
273 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
274 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
275 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
276 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
277 }</pre>
278</div>
279
280<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700281 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
282 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
283
284Args:
285 project: string, Project ID for this request. (required)
286 zone: string, The name of the zone for this request. (required)
287 resource: string, Name of the resource for this request. (required)
288
289Returns:
290 An object of the form:
291
292 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
293 #
294 #
295 #
296 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
297 #
298 # **Example**
299 #
300 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
301 #
302 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
303 "auditConfigs": [ # Specifies audit logging configs for "data access". "data access": generally refers to data reads/writes and admin reads. "admin activity": generally refers to admin writes.
304 #
305 # Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800306 { # Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700307 "exemptedMembers": [ # Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members.
308 "A String",
309 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800310 "auditLogConfigs": [ # The configuration for each type of logging
311 { # Provides the configuration for a sub-type of logging.
312 "exemptedMembers": [ # Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members.
313 "A String",
314 ],
315 "logType": "A String", # The log type that this config enables.
316 },
317 ],
318 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700319 },
320 ],
321 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
322 { # A rule to be applied in a Policy.
323 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
324 { # Specifies what kind of log the caller must write
325 "counter": { # Options for counters # Counter options.
326 "field": "A String", # The field value to attribute.
327 "metric": "A String", # The metric to update.
328 },
329 },
330 ],
331 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
332 "A String",
333 ],
334 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
335 "A String",
336 ],
337 "action": "A String", # Required
338 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
339 "A String",
340 ],
341 "conditions": [ # Additional restrictions that must be met
342 { # A condition to be met.
343 "iam": "A String", # Trusted attributes supplied by the IAM system.
344 "svc": "A String", # Trusted attributes discharged by the service.
345 "value": "A String", # DEPRECATED. Use 'values' instead.
346 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
347 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
348 "A String",
349 ],
350 "op": "A String", # An operator to apply the subject with.
351 },
352 ],
353 "description": "A String", # Human-readable description of the rule.
354 },
355 ],
356 "version": 42, # Version of the `Policy`. The default version is 0.
357 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
358 #
359 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
360 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
361 { # Associates `members` with a `role`.
362 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
363 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
364 #
365 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
366 #
367 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
368 #
369 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.
370 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800371 #
372 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700373 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
374 #
375 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
376 #
377 # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
378 "A String",
379 ],
380 },
381 ],
382 "iamOwned": True or False,
383 }</pre>
384</div>
385
386<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800387 <code class="details" id="insert">insert(project, zone, body)</code>
388 <pre>Creates a host resource in the specified project using the data included in the request.
389
390Args:
391 project: string, Project ID for this request. (required)
392 zone: string, The name of the zone for this request. (required)
393 body: object, The request body. (required)
394 The object takes the form of:
395
396{
397 "status": "A String", # [Output Only] The status of the host. One of the following values: CREATING, READY, REPAIR, and DELETING.
398 "kind": "compute#host", # [Output Only] The type of the resource. Always compute#host for host.
399 "description": "A String", # [Output Only] An optional textual description of the resource.
400 "zone": "A String", # [Output Only] The name of the zone where the host resides, such as us-central1-a.
401 "hostType": "A String", # Full or partial URL of the host type resource to use for this host, in the format: zones/zone/hostTypes/host-type. This is provided by the client when the host is created. For example, the following is a valid partial url to a predefined host type:
402 #
403 # zones/us-central1-f/hostTypes/n1-host-64-416
404 "instances": [ # A list of resource URLs to the virtual machine instances in this host. They must live in zones contained in the same region as this host.
405 "A String",
406 ],
407 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
408 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
409 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
410 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
411 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
412 }
413
414
415Returns:
416 An object of the form:
417
418 { # An Operation resource, used to manage asynchronous API requests.
419 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
420 "clientOperationId": "A String", # [Output Only] Reserved for future use.
421 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
422 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
423 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
424 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
425 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
426 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
427 "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.
428 "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.
429 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
430 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
431 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
432 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
433 {
434 "message": "A String", # [Output Only] A human-readable description of the warning code.
435 "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.
436 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
437 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
438 {
439 "value": "A String", # [Output Only] A warning data value corresponding to the key.
440 "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).
441 },
442 ],
443 },
444 ],
445 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
446 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
447 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
448 "name": "A String", # [Output Only] Name of the resource.
449 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
450 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
451 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
452 {
453 "message": "A String", # [Output Only] An optional, human-readable error message.
454 "code": "A String", # [Output Only] The error type identifier for this error.
455 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
456 },
457 ],
458 },
459 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
460 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
461 "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.
462 }</pre>
463</div>
464
465<div class="method">
466 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
467 <pre>Retrieves a list of hosts available to the specified project.
468
469Args:
470 project: string, Project ID for this request. (required)
471 zone: string, The name of the zone for this request. (required)
472 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
473
474You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
475
476Currently, only sorting by name or creationTimestamp desc is supported.
477 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.
478 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
479 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.
480
481The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
482
483For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
484
485You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
486
487To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
488
489Returns:
490 An object of the form:
491
492 { # Contains a list of hosts.
493 "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.
494 "items": [ # [Output Only] A list of Host resources.
495 {
496 "status": "A String", # [Output Only] The status of the host. One of the following values: CREATING, READY, REPAIR, and DELETING.
497 "kind": "compute#host", # [Output Only] The type of the resource. Always compute#host for host.
498 "description": "A String", # [Output Only] An optional textual description of the resource.
499 "zone": "A String", # [Output Only] The name of the zone where the host resides, such as us-central1-a.
500 "hostType": "A String", # Full or partial URL of the host type resource to use for this host, in the format: zones/zone/hostTypes/host-type. This is provided by the client when the host is created. For example, the following is a valid partial url to a predefined host type:
501 #
502 # zones/us-central1-f/hostTypes/n1-host-64-416
503 "instances": [ # A list of resource URLs to the virtual machine instances in this host. They must live in zones contained in the same region as this host.
504 "A String",
505 ],
506 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
507 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
508 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
509 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
510 "name": "A String", # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
511 },
512 ],
513 "kind": "compute#hostList", # [Output Only] Type of resource. Always compute#hostList for lists of hosts.
514 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
515 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
516 }</pre>
517</div>
518
519<div class="method">
520 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
521 <pre>Retrieves the next page of results.
522
523Args:
524 previous_request: The request for the previous page. (required)
525 previous_response: The response from the request for the previous page. (required)
526
527Returns:
528 A request object that you can call 'execute()' on to request the next
529 page. Returns None if there are no more items in the collection.
530 </pre>
531</div>
532
533<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700534 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body)</code>
535 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
536
537Args:
538 project: string, Project ID for this request. (required)
539 zone: string, The name of the zone for this request. (required)
540 resource: string, Name of the resource for this request. (required)
541 body: object, The request body. (required)
542 The object takes the form of:
543
544{ # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
545 #
546 #
547 #
548 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
549 #
550 # **Example**
551 #
552 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
553 #
554 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
555 "auditConfigs": [ # Specifies audit logging configs for "data access". "data access": generally refers to data reads/writes and admin reads. "admin activity": generally refers to admin writes.
556 #
557 # Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800558 { # Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700559 "exemptedMembers": [ # Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members.
560 "A String",
561 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800562 "auditLogConfigs": [ # The configuration for each type of logging
563 { # Provides the configuration for a sub-type of logging.
564 "exemptedMembers": [ # Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members.
565 "A String",
566 ],
567 "logType": "A String", # The log type that this config enables.
568 },
569 ],
570 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700571 },
572 ],
573 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
574 { # A rule to be applied in a Policy.
575 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
576 { # Specifies what kind of log the caller must write
577 "counter": { # Options for counters # Counter options.
578 "field": "A String", # The field value to attribute.
579 "metric": "A String", # The metric to update.
580 },
581 },
582 ],
583 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
584 "A String",
585 ],
586 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
587 "A String",
588 ],
589 "action": "A String", # Required
590 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
591 "A String",
592 ],
593 "conditions": [ # Additional restrictions that must be met
594 { # A condition to be met.
595 "iam": "A String", # Trusted attributes supplied by the IAM system.
596 "svc": "A String", # Trusted attributes discharged by the service.
597 "value": "A String", # DEPRECATED. Use 'values' instead.
598 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
599 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
600 "A String",
601 ],
602 "op": "A String", # An operator to apply the subject with.
603 },
604 ],
605 "description": "A String", # Human-readable description of the rule.
606 },
607 ],
608 "version": 42, # Version of the `Policy`. The default version is 0.
609 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
610 #
611 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
612 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
613 { # Associates `members` with a `role`.
614 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
615 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
616 #
617 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
618 #
619 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
620 #
621 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.
622 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800623 #
624 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700625 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
626 #
627 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
628 #
629 # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
630 "A String",
631 ],
632 },
633 ],
634 "iamOwned": True or False,
635}
636
637
638Returns:
639 An object of the form:
640
641 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
642 #
643 #
644 #
645 # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of permissions defined by IAM.
646 #
647 # **Example**
648 #
649 # { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] }
650 #
651 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
652 "auditConfigs": [ # Specifies audit logging configs for "data access". "data access": generally refers to data reads/writes and admin reads. "admin activity": generally refers to admin writes.
653 #
654 # Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800655 { # Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700656 "exemptedMembers": [ # Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members.
657 "A String",
658 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800659 "auditLogConfigs": [ # The configuration for each type of logging
660 { # Provides the configuration for a sub-type of logging.
661 "exemptedMembers": [ # Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members.
662 "A String",
663 ],
664 "logType": "A String", # The log type that this config enables.
665 },
666 ],
667 "service": "A String", # Specifies a service that will be enabled for audit logging. For example, `resourcemanager`, `storage`, `compute`. `allServices` is a special value that covers all services.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700668 },
669 ],
670 "rules": [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
671 { # A rule to be applied in a Policy.
672 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
673 { # Specifies what kind of log the caller must write
674 "counter": { # Options for counters # Counter options.
675 "field": "A String", # The field value to attribute.
676 "metric": "A String", # The metric to update.
677 },
678 },
679 ],
680 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
681 "A String",
682 ],
683 "ins": [ # If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
684 "A String",
685 ],
686 "action": "A String", # Required
687 "permissions": [ # A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
688 "A String",
689 ],
690 "conditions": [ # Additional restrictions that must be met
691 { # A condition to be met.
692 "iam": "A String", # Trusted attributes supplied by the IAM system.
693 "svc": "A String", # Trusted attributes discharged by the service.
694 "value": "A String", # DEPRECATED. Use 'values' instead.
695 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
696 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
697 "A String",
698 ],
699 "op": "A String", # An operator to apply the subject with.
700 },
701 ],
702 "description": "A String", # Human-readable description of the rule.
703 },
704 ],
705 "version": 42, # Version of the `Policy`. The default version is 0.
706 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
707 #
708 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
709 "bindings": [ # Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same `role`. `bindings` with no members will result in an error.
710 { # Associates `members` with a `role`.
711 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
712 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
713 #
714 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
715 #
716 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
717 #
718 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.
719 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800720 #
721 #
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700722 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
723 #
724 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
725 #
726 # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
727 "A String",
728 ],
729 },
730 ],
731 "iamOwned": True or False,
732 }</pre>
733</div>
734
735<div class="method">
736 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
737 <pre>Returns permissions that a caller has on the specified resource.
738
739Args:
740 project: string, Project ID for this request. (required)
741 zone: string, The name of the zone for this request. (required)
742 resource: string, Name of the resource for this request. (required)
743 body: object, The request body. (required)
744 The object takes the form of:
745
746{
747 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
748 "A String",
749 ],
750 }
751
752
753Returns:
754 An object of the form:
755
756 {
757 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
758 "A String",
759 ],
760 }</pre>
761</div>
762
763</body></html>