blob: 16a48a2cb200c1991f35ad85fd38e476824f86d7 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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_beta.html">Compute Engine API</a> . <a href="compute_beta.reservations.html">reservations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Retrieves an aggregated list of reservations.</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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084 <code><a href="#close">close()</a></code></p>
85<p class="firstline">Close httplib2 connections.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, zone, reservation, requestId=None)</a></code></p>
88<p class="firstline">Deletes the specified reservation.</p>
89<p class="toc_element">
90 <code><a href="#get">get(project, zone, reservation)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -070091<p class="firstline">Retrieves information about the specified reservation.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
97<p class="firstline">Creates a new reservation. For more information, read Reserving zonal resources.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070099 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700100<p class="firstline">A list of all the reservations that have been configured for the specified project in specified zone.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101<p class="toc_element">
102 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#resize">resize(project, zone, reservation, body=None, requestId=None)</a></code></p>
106<p class="firstline">Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
113<h3>Method Details</h3>
114<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700115 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700116 <pre>Retrieves an aggregated list of reservations.
117
118Args:
119 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121
Dan O'Mearadd494642020-05-01 07:42:23 -0700122For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123
Dan O'Mearadd494642020-05-01 07:42:23 -0700124You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125
Bu Sun Kim65020912020-05-20 12:08:20 -0700126To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700128 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. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
129 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
130
131You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
132
133Currently, only sorting by `name` or `creationTimestamp desc` is supported.
134 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700135 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136
137Returns:
138 An object of the form:
139
140 { # Contains a list of reservations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700141 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
142 &quot;items&quot;: { # A list of Allocation resources.
143 &quot;a_key&quot;: { # Name of the scope containing this set of reservations.
144 &quot;reservations&quot;: [ # A list of reservations contained in this scope.
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for {$api_version}.reservations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;commitment&quot;: &quot;A String&quot;, # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
147 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
148 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
149 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
150 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
151 &quot;name&quot;: &quot;A String&quot;, # 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.
152 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
153 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
154 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
155 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700156 &quot;instanceProperties&quot;: { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
160 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700161 },
162 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700163 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700164 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700165 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
166 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 },
168 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 &quot;machineType&quot;: &quot;A String&quot;, # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
170 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700171 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 &quot;specificReservationRequired&quot;: True or False, # Indicates whether the reservation can be consumed by VMs with affinity for &quot;any&quot; reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
174 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
175 &quot;zone&quot;: &quot;A String&quot;, # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700176 },
177 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700178 &quot;warning&quot;: { # Informational warning which replaces the list of reservations when the list is empty.
179 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
180 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
181 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &quot;key&quot;: &quot;A String&quot;, # [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).
184 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700185 },
186 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700187 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 },
189 },
190 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700191 &quot;kind&quot;: &quot;compute#reservationAggregatedList&quot;, # Type of resource.
192 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
193 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700194 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
195 &quot;A String&quot;,
196 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;warning&quot;: { # [Output Only] Informational warning message.
198 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
199 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
200 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700202 &quot;key&quot;: &quot;A String&quot;, # [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).
203 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 },
205 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208 }</pre>
209</div>
210
211<div class="method">
212 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
213 <pre>Retrieves the next page of results.
214
215Args:
216 previous_request: The request for the previous page. (required)
217 previous_response: The response from the request for the previous page. (required)
218
219Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700220 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700221 page. Returns None if there are no more items in the collection.
222 </pre>
223</div>
224
225<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700226 <code class="details" id="close">close()</code>
227 <pre>Close httplib2 connections.</pre>
228</div>
229
230<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 <code class="details" id="delete">delete(project, zone, reservation, requestId=None)</code>
232 <pre>Deletes the specified reservation.
233
234Args:
235 project: string, Project ID for this request. (required)
236 zone: string, Name of the zone for this request. (required)
237 reservation: string, Name of the reservation to delete. (required)
238 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
239
240For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
241
242The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
243
244Returns:
245 An object of the form:
246
247 { # Represents an Operation resource.
248 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700249 # Google Compute Engine has three Operation resources:
250 #
251 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
252 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700253 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
254 #
255 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700256 # - For global operations, use the `globalOperations` resource.
257 # - For regional operations, use the `regionOperations` resource.
258 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
262 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
263 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
264 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
265 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
266 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700267 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
269 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
270 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 },
272 ],
273 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
275 &quot;httpErrorStatusCode&quot;: 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.
276 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
277 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
278 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
279 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
280 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
281 &quot;progress&quot;: 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.
282 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
283 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
284 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
285 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
286 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
287 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
288 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
289 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
290 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
291 {
292 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
293 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
294 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
295 {
296 &quot;key&quot;: &quot;A String&quot;, # [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).
297 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
298 },
299 ],
300 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
301 },
302 ],
303 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 }</pre>
305</div>
306
307<div class="method">
308 <code class="details" id="get">get(project, zone, reservation)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 <pre>Retrieves information about the specified reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310
311Args:
312 project: string, Project ID for this request. (required)
313 zone: string, Name of the zone for this request. (required)
314 reservation: string, Name of the reservation to retrieve. (required)
315
316Returns:
317 An object of the form:
318
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for {$api_version}.reservations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700320 &quot;commitment&quot;: &quot;A String&quot;, # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
321 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
322 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
323 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
324 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
325 &quot;name&quot;: &quot;A String&quot;, # 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.
326 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
327 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
328 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
329 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700330 &quot;instanceProperties&quot;: { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700331 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700332 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700333 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
334 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700335 },
336 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700337 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700338 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700339 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
340 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 },
342 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 &quot;machineType&quot;: &quot;A String&quot;, # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
344 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 &quot;specificReservationRequired&quot;: True or False, # Indicates whether the reservation can be consumed by VMs with affinity for &quot;any&quot; reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
348 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
349 &quot;zone&quot;: &quot;A String&quot;, # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350 }</pre>
351</div>
352
353<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700354 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700355 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
356
357Args:
358 project: string, Project ID for this request. (required)
359 zone: string, The name of the zone for this request. (required)
360 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700361 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700362
363Returns:
364 An object of the form:
365
Dan O'Mearadd494642020-05-01 07:42:23 -0700366 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700367 #
368 #
369 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700370 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700371 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700373 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700374 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700375 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700377 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700378 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700381 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700383 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700384 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
385 #
386 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
387 #
388 # Example Policy with multiple AuditConfigs:
389 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700390 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700391 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700392 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700393 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 { # Provides the configuration for logging a type of permissions. Example:
395 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700396 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
399 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
400 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700402 &quot;ignoreChildExemptions&quot;: True or False,
403 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700404 },
405 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700406 &quot;exemptedMembers&quot;: [
407 &quot;A String&quot;,
408 ],
409 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 },
411 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700414 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
416 #
417 # If the condition evaluates to `true`, then this binding applies to the current request.
418 #
419 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
420 #
421 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
422 #
423 # Example (Comparison):
424 #
425 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
426 #
427 # Example (Equality):
428 #
429 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
430 #
431 # Example (Logic):
432 #
433 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
434 #
435 # Example (Data Manipulation):
436 #
437 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
438 #
439 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
440 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
441 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
442 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
443 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
444 },
445 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700446 #
447 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
448 #
449 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
450 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700451 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700452 #
453 #
454 #
455 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
456 #
457 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
458 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
460 #
461 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
462 #
463 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
464 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 #
466 #
467 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700468 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700470 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700471 },
472 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700473 &quot;etag&quot;: &quot;A String&quot;, # `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.
474 #
475 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
476 &quot;iamOwned&quot;: True or False,
477 &quot;rules&quot;: [ # 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.
478 { # A rule to be applied in a Policy.
479 &quot;action&quot;: &quot;A String&quot;, # Required
480 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
481 { # A condition to be met.
482 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
483 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
484 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
485 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
486 &quot;values&quot;: [ # The objects of the condition.
487 &quot;A String&quot;,
488 ],
489 },
490 ],
491 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
492 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
493 &quot;A String&quot;,
494 ],
495 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
496 { # Specifies what kind of log the caller must write
497 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
498 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
499 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
500 },
501 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
502 },
503 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
504 #
505 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
506 #
507 # Field names correspond to IAM request parameters and field values are their respective values.
508 #
509 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
510 #
511 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
512 &quot;customFields&quot;: [ # Custom fields.
513 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
514 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
515 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
516 },
517 ],
518 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
519 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
520 },
521 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
522 &quot;logMode&quot;: &quot;A String&quot;,
523 },
524 },
525 ],
526 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
527 &quot;A String&quot;,
528 ],
529 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
530 &quot;A String&quot;,
531 ],
532 },
533 ],
534 &quot;version&quot;: 42, # Specifies the format of the policy.
535 #
536 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
537 #
538 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
539 #
540 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
541 #
542 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
543 #
544 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
545 #
546 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700547 }</pre>
548</div>
549
550<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700551 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
552 <pre>Creates a new reservation. For more information, read Reserving zonal resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553
554Args:
555 project: string, Project ID for this request. (required)
556 zone: string, Name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700557 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 The object takes the form of:
559
Dan O'Mearadd494642020-05-01 07:42:23 -0700560{ # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for {$api_version}.reservations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 &quot;commitment&quot;: &quot;A String&quot;, # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
562 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
563 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
564 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
565 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
566 &quot;name&quot;: &quot;A String&quot;, # 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.
567 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
568 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
569 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
570 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700571 &quot;instanceProperties&quot;: { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700574 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
575 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 },
577 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700578 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700579 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700580 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
581 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 },
583 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700584 &quot;machineType&quot;: &quot;A String&quot;, # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
585 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700586 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700588 &quot;specificReservationRequired&quot;: True or False, # Indicates whether the reservation can be consumed by VMs with affinity for &quot;any&quot; reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
589 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
590 &quot;zone&quot;: &quot;A String&quot;, # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591}
592
593 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
594
595For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
596
597The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
598
599Returns:
600 An object of the form:
601
602 { # Represents an Operation resource.
603 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700604 # Google Compute Engine has three Operation resources:
605 #
606 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
607 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700608 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
609 #
610 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700611 # - For global operations, use the `globalOperations` resource.
612 # - For regional operations, use the `regionOperations` resource.
613 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700615 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700616 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
617 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
618 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
619 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
620 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
621 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700623 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
624 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
625 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700626 },
627 ],
628 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
630 &quot;httpErrorStatusCode&quot;: 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.
631 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
632 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
633 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
634 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
635 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
636 &quot;progress&quot;: 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.
637 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
638 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
639 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
640 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
641 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
642 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
643 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
644 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
645 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
646 {
647 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
648 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
649 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
650 {
651 &quot;key&quot;: &quot;A String&quot;, # [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).
652 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
653 },
654 ],
655 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
656 },
657 ],
658 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700659 }</pre>
660</div>
661
662<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700663 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Dan O'Mearadd494642020-05-01 07:42:23 -0700664 <pre>A list of all the reservations that have been configured for the specified project in specified zone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665
666Args:
667 project: string, Project ID for this request. (required)
668 zone: string, Name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700669 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670
Dan O'Mearadd494642020-05-01 07:42:23 -0700671For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700672
Dan O'Mearadd494642020-05-01 07:42:23 -0700673You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674
Bu Sun Kim65020912020-05-20 12:08:20 -0700675To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
676 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. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
677 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
678
679You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
680
681Currently, only sorting by `name` or `creationTimestamp desc` is supported.
682 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700683 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700684
685Returns:
686 An object of the form:
687
688 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700689 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
690 &quot;items&quot;: [ # [Output Only] A list of Allocation resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700691 { # Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for {$api_version}.reservations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;commitment&quot;: &quot;A String&quot;, # [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
693 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
694 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
695 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
696 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
697 &quot;name&quot;: &quot;A String&quot;, # 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.
698 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
699 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
700 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
701 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700702 &quot;instanceProperties&quot;: { # Properties of the SKU instances being reserved. Next ID: 9 # The instance properties for the reservation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700703 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700704 { # A specification of the type and number of accelerator cards attached to the instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700705 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
706 &quot;acceleratorType&quot;: &quot;A String&quot;, # Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700707 },
708 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700709 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
712 &quot;interface&quot;: &quot;A String&quot;, # Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 },
714 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 &quot;machineType&quot;: &quot;A String&quot;, # Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
716 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700718 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &quot;specificReservationRequired&quot;: True or False, # Indicates whether the reservation can be consumed by VMs with affinity for &quot;any&quot; reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
720 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
721 &quot;zone&quot;: &quot;A String&quot;, # Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 },
723 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700724 &quot;kind&quot;: &quot;compute#reservationList&quot;, # [Output Only] Type of resource.Always compute#reservationsList for listsof reservations
725 &quot;nextPageToken&quot;: &quot;A String&quot;, # [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.
726 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
727 &quot;warning&quot;: { # [Output Only] Informational warning message.
728 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
729 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
730 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700731 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700732 &quot;key&quot;: &quot;A String&quot;, # [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).
733 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 },
735 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700736 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700738 }</pre>
739</div>
740
741<div class="method">
742 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
743 <pre>Retrieves the next page of results.
744
745Args:
746 previous_request: The request for the previous page. (required)
747 previous_response: The response from the request for the previous page. (required)
748
749Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700750 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 page. Returns None if there are no more items in the collection.
752 </pre>
753</div>
754
755<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700756 <code class="details" id="resize">resize(project, zone, reservation, body=None, requestId=None)</code>
757 <pre>Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700758
759Args:
760 project: string, Project ID for this request. (required)
761 zone: string, Name of the zone for this request. (required)
762 reservation: string, Name of the reservation to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700763 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700764 The object takes the form of:
765
766{
Bu Sun Kim65020912020-05-20 12:08:20 -0700767 &quot;specificSkuCount&quot;: &quot;A String&quot;, # Number of allocated resources can be resized with minimum = 1 and maximum = 1000.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768 }
769
770 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
771
772For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
773
774The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
775
776Returns:
777 An object of the form:
778
779 { # Represents an Operation resource.
780 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700781 # Google Compute Engine has three Operation resources:
782 #
783 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
784 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700785 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
786 #
787 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700788 # - For global operations, use the `globalOperations` resource.
789 # - For regional operations, use the `regionOperations` resource.
790 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700791 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700792 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700793 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
794 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
795 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
796 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
797 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
798 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700799 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700800 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
801 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
802 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700803 },
804 ],
805 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
807 &quot;httpErrorStatusCode&quot;: 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.
808 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
809 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
810 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
811 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
812 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
813 &quot;progress&quot;: 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.
814 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
815 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
816 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
817 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
818 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
819 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
820 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
821 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
822 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
823 {
824 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
825 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
826 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
827 {
828 &quot;key&quot;: &quot;A String&quot;, # [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).
829 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
830 },
831 ],
832 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
833 },
834 ],
835 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700836 }</pre>
837</div>
838
839<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700840 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700841 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
842
843Args:
844 project: string, Project ID for this request. (required)
845 zone: string, The name of the zone for this request. (required)
846 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700847 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700848 The object takes the form of:
849
850{
Bu Sun Kim65020912020-05-20 12:08:20 -0700851 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
852 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700853 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700854 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
855 #
856 # If the condition evaluates to `true`, then this binding applies to the current request.
857 #
858 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
859 #
860 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
861 #
862 # Example (Comparison):
863 #
864 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
865 #
866 # Example (Equality):
867 #
868 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
869 #
870 # Example (Logic):
871 #
872 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
873 #
874 # Example (Data Manipulation):
875 #
876 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
877 #
878 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
879 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
880 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
881 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
882 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
883 },
884 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
885 #
886 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
887 #
888 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
889 #
890 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
891 #
892 #
893 #
894 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
895 #
896 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
897 #
898 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
899 #
900 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
901 #
902 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
903 #
904 #
905 #
906 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
907 &quot;A String&quot;,
908 ],
909 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
910 },
911 ],
912 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
913 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914 #
915 #
916 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700917 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700919 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700921 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700922 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700923 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700924 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700925 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700926 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700927 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700928 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700929 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
932 #
933 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
934 #
935 # Example Policy with multiple AuditConfigs:
936 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700937 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700938 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700939 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700940 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700941 { # Provides the configuration for logging a type of permissions. Example:
942 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700943 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700944 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700945 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
946 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
947 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700948 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700949 &quot;ignoreChildExemptions&quot;: True or False,
950 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700951 },
952 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 &quot;exemptedMembers&quot;: [
954 &quot;A String&quot;,
955 ],
956 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 },
958 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700960 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700961 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700962 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
963 #
964 # If the condition evaluates to `true`, then this binding applies to the current request.
965 #
966 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
967 #
968 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
969 #
970 # Example (Comparison):
971 #
972 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
973 #
974 # Example (Equality):
975 #
976 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
977 #
978 # Example (Logic):
979 #
980 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
981 #
982 # Example (Data Manipulation):
983 #
984 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
985 #
986 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
987 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
988 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
989 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
990 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
991 },
992 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700993 #
994 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
995 #
996 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
997 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700998 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700999 #
1000 #
1001 #
1002 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1003 #
1004 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1007 #
1008 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1009 #
1010 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1011 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001012 #
1013 #
1014 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001015 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001016 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001017 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 },
1019 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001020 &quot;etag&quot;: &quot;A String&quot;, # `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.
1021 #
1022 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1023 &quot;iamOwned&quot;: True or False,
1024 &quot;rules&quot;: [ # 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.
1025 { # A rule to be applied in a Policy.
1026 &quot;action&quot;: &quot;A String&quot;, # Required
1027 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1028 { # A condition to be met.
1029 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1030 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1031 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1032 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1033 &quot;values&quot;: [ # The objects of the condition.
1034 &quot;A String&quot;,
1035 ],
1036 },
1037 ],
1038 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1039 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1040 &quot;A String&quot;,
1041 ],
1042 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1043 { # Specifies what kind of log the caller must write
1044 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1045 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1046 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1047 },
1048 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1049 },
1050 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1051 #
1052 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1053 #
1054 # Field names correspond to IAM request parameters and field values are their respective values.
1055 #
1056 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1057 #
1058 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1059 &quot;customFields&quot;: [ # Custom fields.
1060 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1061 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1062 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1063 },
1064 ],
1065 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1066 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1067 },
1068 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1069 &quot;logMode&quot;: &quot;A String&quot;,
1070 },
1071 },
1072 ],
1073 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1074 &quot;A String&quot;,
1075 ],
1076 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1077 &quot;A String&quot;,
1078 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001080 ],
1081 &quot;version&quot;: 42, # Specifies the format of the policy.
1082 #
1083 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1084 #
1085 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1086 #
1087 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1088 #
1089 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1090 #
1091 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1092 #
1093 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1094 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 }
1096
1097
1098Returns:
1099 An object of the form:
1100
Dan O'Mearadd494642020-05-01 07:42:23 -07001101 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001102 #
1103 #
1104 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001105 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001106 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001107 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001108 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001109 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001110 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001111 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001112 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001113 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001114 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001115 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001116 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001117 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001118 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001119 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
1120 #
1121 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
1122 #
1123 # Example Policy with multiple AuditConfigs:
1124 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001125 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot; } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;, &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot; }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001126 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001127 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001128 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001129 { # Provides the configuration for logging a type of permissions. Example:
1130 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001131 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot; } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001132 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001133 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1134 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1135 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001136 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001137 &quot;ignoreChildExemptions&quot;: True or False,
1138 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001139 },
1140 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001141 &quot;exemptedMembers&quot;: [
1142 &quot;A String&quot;,
1143 ],
1144 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 },
1146 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001147 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001148 { # Associates `members` with a `role`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001149 &quot;bindingId&quot;: &quot;A String&quot;, # A client-specified ID for this binding. Expected to be globally unique to support the internal bindings-by-ID API.
Bu Sun Kim65020912020-05-20 12:08:20 -07001150 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1151 #
1152 # If the condition evaluates to `true`, then this binding applies to the current request.
1153 #
1154 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1155 #
1156 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1157 #
1158 # Example (Comparison):
1159 #
1160 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1161 #
1162 # Example (Equality):
1163 #
1164 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1165 #
1166 # Example (Logic):
1167 #
1168 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1169 #
1170 # Example (Data Manipulation):
1171 #
1172 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1173 #
1174 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1175 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1176 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1177 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1178 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1179 },
1180 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001181 #
1182 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1183 #
1184 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1185 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001186 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001187 #
1188 #
1189 #
1190 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1191 #
1192 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1193 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001194 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1195 #
1196 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1197 #
1198 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1199 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001200 #
1201 #
1202 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001203 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001204 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001205 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001206 },
1207 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 &quot;etag&quot;: &quot;A String&quot;, # `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.
1209 #
1210 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1211 &quot;iamOwned&quot;: True or False,
1212 &quot;rules&quot;: [ # 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.
1213 { # A rule to be applied in a Policy.
1214 &quot;action&quot;: &quot;A String&quot;, # Required
1215 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1216 { # A condition to be met.
1217 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1218 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1219 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1220 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1221 &quot;values&quot;: [ # The objects of the condition.
1222 &quot;A String&quot;,
1223 ],
1224 },
1225 ],
1226 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1227 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1228 &quot;A String&quot;,
1229 ],
1230 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1231 { # Specifies what kind of log the caller must write
1232 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1233 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1234 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1235 },
1236 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1237 },
1238 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1239 #
1240 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1241 #
1242 # Field names correspond to IAM request parameters and field values are their respective values.
1243 #
1244 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1245 #
1246 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1247 &quot;customFields&quot;: [ # Custom fields.
1248 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1249 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1250 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1251 },
1252 ],
1253 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1254 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1255 },
1256 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1257 &quot;logMode&quot;: &quot;A String&quot;,
1258 },
1259 },
1260 ],
1261 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1262 &quot;A String&quot;,
1263 ],
1264 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1265 &quot;A String&quot;,
1266 ],
1267 },
1268 ],
1269 &quot;version&quot;: 42, # Specifies the format of the policy.
1270 #
1271 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1272 #
1273 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1274 #
1275 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1276 #
1277 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1278 #
1279 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1280 #
1281 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001282 }</pre>
1283</div>
1284
1285<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001286 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001287 <pre>Returns permissions that a caller has on the specified resource.
1288
1289Args:
1290 project: string, Project ID for this request. (required)
1291 zone: string, The name of the zone for this request. (required)
1292 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001293 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001294 The object takes the form of:
1295
1296{
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
1298 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001299 ],
1300 }
1301
1302
1303Returns:
1304 An object of the form:
1305
1306 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001307 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1308 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001309 ],
1310 }</pre>
1311</div>
1312
1313</body></html>