blob: ed994d72a5569fc921e8d330773adde0cd1c2304 [file] [log] [blame]
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001<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.commitments.html">commitments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <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 commitments.</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="#get">get(project, zone, commitment)</a></code></p>
85<p class="firstline">Returns the specified commitment resource. Get a list of available commitments by making a list() request.</p>
86<p class="toc_element">
87 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p>
88<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
89<p class="toc_element">
90 <code><a href="#insert">insert(project, zone, body)</a></code></p>
91<p class="firstline">Creates an commitment in the specified project using the data included in the request.</p>
92<p class="toc_element">
93 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
94<p class="firstline">Retrieves a list of commitments contained within the specified zone.</p>
95<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
99 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body)</a></code></p>
100<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
101<p class="toc_element">
102 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body)</a></code></p>
103<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
104<h3>Method Details</h3>
105<div class="method">
106 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
107 <pre>Retrieves an aggregated list of commitments.
108
109Args:
110 project: string, Project ID for this request. (required)
111 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
112
113You 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.
114
115Currently, only sorting by name or creationTimestamp desc is supported.
116 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.
117 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.
118 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.
119
120The 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.
121
122For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
123
124You 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.
125
126To 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.
127
128Returns:
129 An object of the form:
130
131 {
132 "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.
133 "items": { # Commitments by scope.
134 "a_key": { # [Output Only] Name of the scope containing this set of commitments.
135 "warning": { # [Output Only] Informational warning which replaces the list of commitments when the list is empty.
136 "message": "A String", # [Output Only] A human-readable description of the warning code.
137 "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.
138 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
139 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
140 {
141 "value": "A String", # [Output Only] A warning data value corresponding to the key.
142 "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).
143 },
144 ],
145 },
146 "commitments": [ # [Output Only] List of commitments contained in this scope.
147 { # A usage-commitment with a start / end time. Users create commitments for particular resources (e.g. memory). Actual usage is first deducted from available commitments made prior, perhaps at a reduced price (as laid out in the commitment).
148 "status": "A String", # [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end-date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
149 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
150 "kind": "compute#commitment", # [Output Only] Type of the resource. Always compute#commitment for commitments.
151 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
152 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
153 "zone": "A String", # [Output Only] URL of the zone where this commitment may be used.
154 "startTimestamp": "A String", # [Output Only] Commitment start time in RFC3339 text format.
155 "endTimestamp": "A String", # [Output Only] Commitment end time in RFC3339 text format.
156 "plan": "A String", # The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
157 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
158 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
159 "resources": [ # List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
160 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
161 "amount": "A String", # The amount of the resource purchased (in a type-dependent unit, such as bytes).
162 "type": "A String", # Type of resource for which this commitment applies.
163 },
164 ],
165 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The 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#commitmentAggregatedList", # [Output Only] Type of resource. Always compute#commitmentAggregatedList for aggregated lists of commitments.
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 this 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="get">get(project, zone, commitment)</code>
192 <pre>Returns the specified commitment resource. Get a list of available commitments by making a list() request.
193
194Args:
195 project: string, Project ID for this request. (required)
196 zone: string, Name of the zone for this request. (required)
197 commitment: string, Name of the commitment to return. (required)
198
199Returns:
200 An object of the form:
201
202 { # A usage-commitment with a start / end time. Users create commitments for particular resources (e.g. memory). Actual usage is first deducted from available commitments made prior, perhaps at a reduced price (as laid out in the commitment).
203 "status": "A String", # [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end-date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
204 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
205 "kind": "compute#commitment", # [Output Only] Type of the resource. Always compute#commitment for commitments.
206 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
207 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
208 "zone": "A String", # [Output Only] URL of the zone where this commitment may be used.
209 "startTimestamp": "A String", # [Output Only] Commitment start time in RFC3339 text format.
210 "endTimestamp": "A String", # [Output Only] Commitment end time in RFC3339 text format.
211 "plan": "A String", # The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
212 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
213 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
214 "resources": [ # List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
215 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
216 "amount": "A String", # The amount of the resource purchased (in a type-dependent unit, such as bytes).
217 "type": "A String", # Type of resource for which this commitment applies.
218 },
219 ],
220 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The 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.
221 }</pre>
222</div>
223
224<div class="method">
225 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
226 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
227
228Args:
229 project: string, Project ID for this request. (required)
230 zone: string, The name of the zone for this request. (required)
231 resource: string, Name of the resource for this request. (required)
232
233Returns:
234 An object of the form:
235
236 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
237 #
238 #
239 #
240 # 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.
241 #
242 # **Example**
243 #
244 # { "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"] } ] }
245 #
246 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
247 "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.
248 #
249 # Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging.
250 { # Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types.
251 "exemptedMembers": [ # Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members.
252 "A String",
253 ],
254 "auditLogConfigs": [ # The configuration for each type of logging
255 { # Provides the configuration for a sub-type of logging.
256 "exemptedMembers": [ # Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members.
257 "A String",
258 ],
259 "logType": "A String", # The log type that this config enables.
260 },
261 ],
262 "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.
263 },
264 ],
265 "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.
266 { # A rule to be applied in a Policy.
267 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
268 { # Specifies what kind of log the caller must write
269 "counter": { # Options for counters # Counter options.
270 "field": "A String", # The field value to attribute.
271 "metric": "A String", # The metric to update.
272 },
273 },
274 ],
275 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
276 "A String",
277 ],
278 "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.
279 "A String",
280 ],
281 "action": "A String", # Required
282 "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.
283 "A String",
284 ],
285 "conditions": [ # Additional restrictions that must be met
286 { # A condition to be met.
287 "iam": "A String", # Trusted attributes supplied by the IAM system.
288 "svc": "A String", # Trusted attributes discharged by the service.
289 "value": "A String", # DEPRECATED. Use 'values' instead.
290 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
291 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
292 "A String",
293 ],
294 "op": "A String", # An operator to apply the subject with.
295 },
296 ],
297 "description": "A String", # Human-readable description of the rule.
298 },
299 ],
300 "version": 42, # Version of the `Policy`. The default version is 0.
301 "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.
302 #
303 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
304 "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.
305 { # Associates `members` with a `role`.
306 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
307 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
308 #
309 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
310 #
311 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
312 #
313 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.
314 #
315 #
316 #
317 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
318 #
319 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
320 #
321 # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
322 "A String",
323 ],
324 },
325 ],
326 "iamOwned": True or False,
327 }</pre>
328</div>
329
330<div class="method">
331 <code class="details" id="insert">insert(project, zone, body)</code>
332 <pre>Creates an commitment in the specified project using the data included in the request.
333
334Args:
335 project: string, Project ID for this request. (required)
336 zone: string, Name of the zone for this request. (required)
337 body: object, The request body. (required)
338 The object takes the form of:
339
340{ # A usage-commitment with a start / end time. Users create commitments for particular resources (e.g. memory). Actual usage is first deducted from available commitments made prior, perhaps at a reduced price (as laid out in the commitment).
341 "status": "A String", # [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end-date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
342 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
343 "kind": "compute#commitment", # [Output Only] Type of the resource. Always compute#commitment for commitments.
344 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
345 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
346 "zone": "A String", # [Output Only] URL of the zone where this commitment may be used.
347 "startTimestamp": "A String", # [Output Only] Commitment start time in RFC3339 text format.
348 "endTimestamp": "A String", # [Output Only] Commitment end time in RFC3339 text format.
349 "plan": "A String", # The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
350 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
351 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
352 "resources": [ # List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
353 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
354 "amount": "A String", # The amount of the resource purchased (in a type-dependent unit, such as bytes).
355 "type": "A String", # Type of resource for which this commitment applies.
356 },
357 ],
358 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The 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.
359 }
360
361
362Returns:
363 An object of the form:
364
365 { # An Operation resource, used to manage asynchronous API requests.
366 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
367 "clientOperationId": "A String", # [Output Only] Reserved for future use.
368 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
369 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
370 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
371 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
372 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
373 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
374 "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.
375 "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.
376 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
377 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
378 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
379 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
380 {
381 "message": "A String", # [Output Only] A human-readable description of the warning code.
382 "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.
383 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
384 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
385 {
386 "value": "A String", # [Output Only] A warning data value corresponding to the key.
387 "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).
388 },
389 ],
390 },
391 ],
392 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
393 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
394 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
395 "name": "A String", # [Output Only] Name of the resource.
396 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
397 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
398 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
399 {
400 "message": "A String", # [Output Only] An optional, human-readable error message.
401 "code": "A String", # [Output Only] The error type identifier for this error.
402 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
403 },
404 ],
405 },
406 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
407 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
408 "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.
409 }</pre>
410</div>
411
412<div class="method">
413 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
414 <pre>Retrieves a list of commitments contained within the specified zone.
415
416Args:
417 project: string, Project ID for this request. (required)
418 zone: string, Name of the zone for this request. (required)
419 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
420
421You 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.
422
423Currently, only sorting by name or creationTimestamp desc is supported.
424 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.
425 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.
426 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.
427
428The 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.
429
430For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
431
432You 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.
433
434To 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.
435
436Returns:
437 An object of the form:
438
439 { # Contains a list of Commitment resources.
440 "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.
441 "items": [ # A list of Commitment resources.
442 { # A usage-commitment with a start / end time. Users create commitments for particular resources (e.g. memory). Actual usage is first deducted from available commitments made prior, perhaps at a reduced price (as laid out in the commitment).
443 "status": "A String", # [Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end-date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
444 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
445 "kind": "compute#commitment", # [Output Only] Type of the resource. Always compute#commitment for commitments.
446 "statusMessage": "A String", # [Output Only] An optional, human-readable explanation of the status.
447 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
448 "zone": "A String", # [Output Only] URL of the zone where this commitment may be used.
449 "startTimestamp": "A String", # [Output Only] Commitment start time in RFC3339 text format.
450 "endTimestamp": "A String", # [Output Only] Commitment end time in RFC3339 text format.
451 "plan": "A String", # The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).
452 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
453 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
454 "resources": [ # List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.
455 { # Commitment for a particular resource (a Commitment is composed of one or more of these).
456 "amount": "A String", # The amount of the resource purchased (in a type-dependent unit, such as bytes).
457 "type": "A String", # Type of resource for which this commitment applies.
458 },
459 ],
460 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The 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.
461 },
462 ],
463 "kind": "compute#commitmentList", # [Output Only] Type of resource. Always compute#commitmentList for lists of commitments.
464 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
465 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
466 }</pre>
467</div>
468
469<div class="method">
470 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
471 <pre>Retrieves the next page of results.
472
473Args:
474 previous_request: The request for the previous page. (required)
475 previous_response: The response from the request for the previous page. (required)
476
477Returns:
478 A request object that you can call 'execute()' on to request the next
479 page. Returns None if there are no more items in the collection.
480 </pre>
481</div>
482
483<div class="method">
484 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body)</code>
485 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
486
487Args:
488 project: string, Project ID for this request. (required)
489 zone: string, The name of the zone for this request. (required)
490 resource: string, Name of the resource for this request. (required)
491 body: object, The request body. (required)
492 The object takes the form of:
493
494{ # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
495 #
496 #
497 #
498 # 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.
499 #
500 # **Example**
501 #
502 # { "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"] } ] }
503 #
504 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
505 "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.
506 #
507 # Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging.
508 { # Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types.
509 "exemptedMembers": [ # Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members.
510 "A String",
511 ],
512 "auditLogConfigs": [ # The configuration for each type of logging
513 { # Provides the configuration for a sub-type of logging.
514 "exemptedMembers": [ # Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members.
515 "A String",
516 ],
517 "logType": "A String", # The log type that this config enables.
518 },
519 ],
520 "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.
521 },
522 ],
523 "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.
524 { # A rule to be applied in a Policy.
525 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
526 { # Specifies what kind of log the caller must write
527 "counter": { # Options for counters # Counter options.
528 "field": "A String", # The field value to attribute.
529 "metric": "A String", # The metric to update.
530 },
531 },
532 ],
533 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
534 "A String",
535 ],
536 "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.
537 "A String",
538 ],
539 "action": "A String", # Required
540 "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.
541 "A String",
542 ],
543 "conditions": [ # Additional restrictions that must be met
544 { # A condition to be met.
545 "iam": "A String", # Trusted attributes supplied by the IAM system.
546 "svc": "A String", # Trusted attributes discharged by the service.
547 "value": "A String", # DEPRECATED. Use 'values' instead.
548 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
549 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
550 "A String",
551 ],
552 "op": "A String", # An operator to apply the subject with.
553 },
554 ],
555 "description": "A String", # Human-readable description of the rule.
556 },
557 ],
558 "version": 42, # Version of the `Policy`. The default version is 0.
559 "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.
560 #
561 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
562 "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.
563 { # Associates `members` with a `role`.
564 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
565 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
566 #
567 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
568 #
569 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
570 #
571 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.
572 #
573 #
574 #
575 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
576 #
577 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
578 #
579 # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
580 "A String",
581 ],
582 },
583 ],
584 "iamOwned": True or False,
585}
586
587
588Returns:
589 An object of the form:
590
591 { # Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.
592 #
593 #
594 #
595 # 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.
596 #
597 # **Example**
598 #
599 # { "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"] } ] }
600 #
601 # For a description of IAM and its features, see the [IAM developer's guide](https://cloud.google.com/iam).
602 "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.
603 #
604 # Note: `AuditConfig` doesn't apply to "admin activity", which always enables audit logging.
605 { # Provides the configuration for non-admin_activity logging for a service. Controls exemptions and specific log sub-types.
606 "exemptedMembers": [ # Specifies the identities that are exempted from "data access" audit logging for the `service` specified above. Follows the same format of Binding.members.
607 "A String",
608 ],
609 "auditLogConfigs": [ # The configuration for each type of logging
610 { # Provides the configuration for a sub-type of logging.
611 "exemptedMembers": [ # Specifies the identities that are exempted from this type of logging Follows the same format of Binding.members.
612 "A String",
613 ],
614 "logType": "A String", # The log type that this config enables.
615 },
616 ],
617 "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.
618 },
619 ],
620 "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.
621 { # A rule to be applied in a Policy.
622 "logConfigs": [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
623 { # Specifies what kind of log the caller must write
624 "counter": { # Options for counters # Counter options.
625 "field": "A String", # The field value to attribute.
626 "metric": "A String", # The metric to update.
627 },
628 },
629 ],
630 "notIns": [ # If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
631 "A String",
632 ],
633 "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.
634 "A String",
635 ],
636 "action": "A String", # Required
637 "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.
638 "A String",
639 ],
640 "conditions": [ # Additional restrictions that must be met
641 { # A condition to be met.
642 "iam": "A String", # Trusted attributes supplied by the IAM system.
643 "svc": "A String", # Trusted attributes discharged by the service.
644 "value": "A String", # DEPRECATED. Use 'values' instead.
645 "sys": "A String", # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
646 "values": [ # The objects of the condition. This is mutually exclusive with 'value'.
647 "A String",
648 ],
649 "op": "A String", # An operator to apply the subject with.
650 },
651 ],
652 "description": "A String", # Human-readable description of the rule.
653 },
654 ],
655 "version": 42, # Version of the `Policy`. The default version is 0.
656 "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.
657 #
658 # If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten blindly.
659 "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.
660 { # Associates `members` with a `role`.
661 "role": "A String", # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
662 "members": [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
663 #
664 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
665 #
666 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
667 #
668 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@gmail.com` or `joe@example.com`.
669 #
670 #
671 #
672 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
673 #
674 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
675 #
676 # * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example, `google.com` or `example.com`.
677 "A String",
678 ],
679 },
680 ],
681 "iamOwned": True or False,
682 }</pre>
683</div>
684
685<div class="method">
686 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body)</code>
687 <pre>Returns permissions that a caller has on the specified resource.
688
689Args:
690 project: string, Project ID for this request. (required)
691 zone: string, The name of the zone for this request. (required)
692 resource: string, Name of the resource for this request. (required)
693 body: object, The request body. (required)
694 The object takes the form of:
695
696{
697 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
698 "A String",
699 ],
700 }
701
702
703Returns:
704 An object of the form:
705
706 {
707 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
708 "A String",
709 ],
710 }</pre>
711</div>
712
713</body></html>