blob: 262facac413237853758c652d60e647a57645824 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -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_v1.html">Compute Engine API</a> . <a href="compute_v1.reservations.html">reservations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
79<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">
84 <code><a href="#delete">delete(project, zone, reservation, requestId=None)</a></code></p>
85<p class="firstline">Deletes the specified reservation.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, zone, reservation)</a></code></p>
88<p class="firstline">Retrieves information about the specified reservation.</p>
89<p class="toc_element">
90 <code><a href="#getIamPolicy">getIamPolicy(project, zone, resource)</a></code></p>
91<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
93 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
94<p class="firstline">Creates a new reservation. For more information, read Reserving zonal resources.</p>
95<p class="toc_element">
96 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
97<p class="firstline">A list of all the reservations that have been configured for the specified project in specified zone.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#resize">resize(project, zone, reservation, body=None, requestId=None)</a></code></p>
103<p class="firstline">Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.</p>
104<p class="toc_element">
105 <code><a href="#setIamPolicy">setIamPolicy(project, zone, resource, body=None)</a></code></p>
106<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
107<p class="toc_element">
108 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
109<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
110<h3>Method Details</h3>
111<div class="method">
112 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</code>
113 <pre>Retrieves an aggregated list of reservations.
114
115Args:
116 project: string, Project ID for this request. (required)
117 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;`.
118
119For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
120
121You 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.
122
123To 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) ```
124 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.
125 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`)
126 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
127
128You 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.
129
130Currently, only sorting by `name` or `creationTimestamp desc` is supported.
131 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.
132
133Returns:
134 An object of the form:
135
136 { # Contains a list of reservations.
137 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
138 &quot;items&quot;: { # A list of Allocation resources.
139 &quot;a_key&quot;: { # Name of the scope containing this set of reservations.
140 &quot;reservations&quot;: [ # A list of reservations contained in this scope.
141 { # 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 ==)
142 &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.
143 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
144 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
145 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
146 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
147 &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.
148 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
149 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
150 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
151 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700152 &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 -0700153 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
154 { # A specification of the type and number of accelerator cards attached to the instance.
155 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
156 &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.
157 },
158 ],
159 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
160 {
161 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
162 &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.
163 },
164 ],
165 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700166 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
167 #
168 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
170 },
171 },
172 &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.
173 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
174 &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.
175 },
176 ],
177 &quot;warning&quot;: { # Informational warning which replaces the list of reservations when the list is empty.
178 &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.
179 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
180 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
181 {
182 &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).
183 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
184 },
185 ],
186 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
187 },
188 },
189 },
190 &quot;kind&quot;: &quot;compute#reservationAggregatedList&quot;, # Type of resource.
191 &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.
192 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
193 &quot;warning&quot;: { # [Output Only] Informational warning message.
194 &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.
195 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
196 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
197 {
198 &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).
199 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
200 },
201 ],
202 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
203 },
204 }</pre>
205</div>
206
207<div class="method">
208 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
209 <pre>Retrieves the next page of results.
210
211Args:
212 previous_request: The request for the previous page. (required)
213 previous_response: The response from the request for the previous page. (required)
214
215Returns:
216 A request object that you can call &#x27;execute()&#x27; on to request the next
217 page. Returns None if there are no more items in the collection.
218 </pre>
219</div>
220
221<div class="method">
222 <code class="details" id="delete">delete(project, zone, reservation, requestId=None)</code>
223 <pre>Deletes the specified reservation.
224
225Args:
226 project: string, Project ID for this request. (required)
227 zone: string, Name of the zone for this request. (required)
228 reservation: string, Name of the reservation to delete. (required)
229 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.
230
231For 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.
232
233The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
234
235Returns:
236 An object of the form:
237
238 { # Represents an Operation resource.
239 #
240 # Google Compute Engine has three Operation resources:
241 #
242 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
243 #
244 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
245 #
246 # Operations can be global, regional or zonal.
247 # - For global operations, use the `globalOperations` resource.
248 # - For regional operations, use the `regionOperations` resource.
249 # - For zonal operations, use the `zonalOperations` resource.
250 #
251 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
252 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
253 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
254 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
255 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
256 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
257 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
258 {
259 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
260 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
261 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
262 },
263 ],
264 },
265 &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`.
266 &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.
267 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
268 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
269 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
270 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
271 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
272 &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.
273 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
274 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
275 &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.
276 &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`.
277 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
278 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
279 &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.
280 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
281 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
282 {
283 &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.
284 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
285 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
286 {
287 &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).
288 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
289 },
290 ],
291 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
292 },
293 ],
294 &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.
295 }</pre>
296</div>
297
298<div class="method">
299 <code class="details" id="get">get(project, zone, reservation)</code>
300 <pre>Retrieves information about the specified reservation.
301
302Args:
303 project: string, Project ID for this request. (required)
304 zone: string, Name of the zone for this request. (required)
305 reservation: string, Name of the reservation to retrieve. (required)
306
307Returns:
308 An object of the form:
309
310 { # 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 ==)
311 &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.
312 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
313 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
314 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
315 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
316 &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.
317 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
318 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
319 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
320 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700321 &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 -0700322 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
323 { # A specification of the type and number of accelerator cards attached to the instance.
324 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
325 &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.
326 },
327 ],
328 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
329 {
330 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
331 &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.
332 },
333 ],
334 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700335 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
336 #
337 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
339 },
340 },
341 &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.
342 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
343 &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.
344 }</pre>
345</div>
346
347<div class="method">
348 <code class="details" id="getIamPolicy">getIamPolicy(project, zone, resource)</code>
349 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
350
351Args:
352 project: string, Project ID for this request. (required)
353 zone: string, The name of the zone for this request. (required)
354 resource: string, Name or id of the resource for this request. (required)
355
356Returns:
357 An object of the form:
358
359 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
360 #
361 #
362 #
363 # 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.
364 #
365 # 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).
366 #
367 # **JSON example:**
368 #
369 # { &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 }
370 #
371 # **YAML example:**
372 #
373 # 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
374 #
375 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
376 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
377 { # 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.
378 #
379 # 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.
380 #
381 # Example Policy with multiple AuditConfigs:
382 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700383 # { &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 Kim65020912020-05-20 12:08:20 -0700384 #
385 # 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.
386 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
387 { # Provides the configuration for logging a type of permissions. Example:
388 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700389 # { &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 Kim65020912020-05-20 12:08:20 -0700390 #
391 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
392 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
393 &quot;A String&quot;,
394 ],
395 &quot;ignoreChildExemptions&quot;: True or False,
396 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
397 },
398 ],
399 &quot;exemptedMembers&quot;: [
400 &quot;A String&quot;,
401 ],
402 &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.
403 },
404 ],
405 &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.
406 { # Associates `members` with a `role`.
407 &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.
408 #
409 # If the condition evaluates to `true`, then this binding applies to the current request.
410 #
411 # 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.
412 #
413 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
414 #
415 # Example (Comparison):
416 #
417 # 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;
418 #
419 # Example (Equality):
420 #
421 # 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;
422 #
423 # Example (Logic):
424 #
425 # 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;
426 #
427 # Example (Data Manipulation):
428 #
429 # 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;
430 #
431 # 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.
432 &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.
433 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
434 &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.
435 &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.
436 },
437 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
438 #
439 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
440 #
441 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
442 #
443 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
444 #
445 #
446 #
447 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
448 #
449 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
450 #
451 # * `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.
452 #
453 # * `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.
454 #
455 # * `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.
456 #
457 #
458 #
459 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
460 &quot;A String&quot;,
461 ],
462 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
463 },
464 ],
465 &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.
466 #
467 # **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.
468 &quot;iamOwned&quot;: True or False,
469 &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.
470 { # A rule to be applied in a Policy.
471 &quot;action&quot;: &quot;A String&quot;, # Required
472 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
473 { # A condition to be met.
474 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
475 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
476 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
477 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
478 &quot;values&quot;: [ # The objects of the condition.
479 &quot;A String&quot;,
480 ],
481 },
482 ],
483 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
484 &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.
485 &quot;A String&quot;,
486 ],
487 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
488 { # Specifies what kind of log the caller must write
489 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
490 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
491 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
492 },
493 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
494 },
495 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
496 #
497 # 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.
498 #
499 # Field names correspond to IAM request parameters and field values are their respective values.
500 #
501 # 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.
502 #
503 # 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]}
504 &quot;customFields&quot;: [ # Custom fields.
505 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
506 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
507 &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.
508 },
509 ],
510 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
511 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
512 },
513 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
514 &quot;logMode&quot;: &quot;A String&quot;,
515 },
516 },
517 ],
518 &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.
519 &quot;A String&quot;,
520 ],
521 &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.
522 &quot;A String&quot;,
523 ],
524 },
525 ],
526 &quot;version&quot;: 42, # Specifies the format of the policy.
527 #
528 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
529 #
530 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
531 #
532 # * 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
533 #
534 # **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.
535 #
536 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
537 #
538 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
539 }</pre>
540</div>
541
542<div class="method">
543 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
544 <pre>Creates a new reservation. For more information, read Reserving zonal resources.
545
546Args:
547 project: string, Project ID for this request. (required)
548 zone: string, Name of the zone for this request. (required)
549 body: object, The request body.
550 The object takes the form of:
551
552{ # 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 ==)
553 &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.
554 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
555 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
556 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
557 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
558 &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.
559 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
560 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
561 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
562 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700563 &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 -0700564 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
565 { # A specification of the type and number of accelerator cards attached to the instance.
566 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
567 &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.
568 },
569 ],
570 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
571 {
572 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
573 &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.
574 },
575 ],
576 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700577 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
578 #
579 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700580 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
581 },
582 },
583 &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.
584 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
585 &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.
586}
587
588 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.
589
590For 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.
591
592The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
593
594Returns:
595 An object of the form:
596
597 { # Represents an Operation resource.
598 #
599 # Google Compute Engine has three Operation resources:
600 #
601 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
602 #
603 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
604 #
605 # Operations can be global, regional or zonal.
606 # - For global operations, use the `globalOperations` resource.
607 # - For regional operations, use the `regionOperations` resource.
608 # - For zonal operations, use the `zonalOperations` resource.
609 #
610 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
611 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
612 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
613 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
614 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
615 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
616 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
617 {
618 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
619 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
620 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
621 },
622 ],
623 },
624 &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`.
625 &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.
626 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
627 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
628 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
629 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
630 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
631 &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.
632 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
633 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
634 &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.
635 &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`.
636 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
637 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
638 &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.
639 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
640 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
641 {
642 &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.
643 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
644 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
645 {
646 &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).
647 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
648 },
649 ],
650 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
651 },
652 ],
653 &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.
654 }</pre>
655</div>
656
657<div class="method">
658 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
659 <pre>A list of all the reservations that have been configured for the specified project in specified zone.
660
661Args:
662 project: string, Project ID for this request. (required)
663 zone: string, Name of the zone for this request. (required)
664 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;`.
665
666For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
667
668You 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.
669
670To 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) ```
671 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`)
672 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
673
674You 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.
675
676Currently, only sorting by `name` or `creationTimestamp desc` is supported.
677 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.
678
679Returns:
680 An object of the form:
681
682 {
683 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
684 &quot;items&quot;: [ # [Output Only] A list of Allocation resources.
685 { # 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 ==)
686 &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.
687 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
688 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
689 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
690 &quot;kind&quot;: &quot;compute#reservation&quot;, # [Output Only] Type of the resource. Always compute#reservations for reservations.
691 &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.
692 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
693 &quot;specificReservation&quot;: { # This reservation type allows to pre allocate specific instance configuration. # Reservation for instances with specific machine shapes.
694 &quot;count&quot;: &quot;A String&quot;, # Specifies the number of resources that are allocated.
695 &quot;inUseCount&quot;: &quot;A String&quot;, # [Output Only] Indicates how many instances are in use.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700696 &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 -0700697 &quot;guestAccelerators&quot;: [ # Specifies accelerator type and count.
698 { # A specification of the type and number of accelerator cards attached to the instance.
699 &quot;acceleratorCount&quot;: 42, # The number of the guest accelerator cards exposed to this instance.
700 &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.
701 },
702 ],
703 &quot;localSsds&quot;: [ # Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
704 {
705 &quot;diskSizeGb&quot;: &quot;A String&quot;, # Specifies the size of the disk in base-2 GB.
706 &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.
707 },
708 ],
709 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700710 &quot;maintenanceInterval&quot;: &quot;A String&quot;, # Specifies whether this VM may be a stable fleet VM. Setting this to &quot;Periodic&quot; designates this VM as a Stable Fleet VM.
711 #
712 # See go/stable-fleet-ug for more details.
Bu Sun Kim65020912020-05-20 12:08:20 -0700713 &quot;minCpuPlatform&quot;: &quot;A String&quot;, # Minimum cpu platform the reservation.
714 },
715 },
716 &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.
717 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the reservation.
718 &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.
719 },
720 ],
721 &quot;kind&quot;: &quot;compute#reservationList&quot;, # [Output Only] Type of resource.Always compute#reservationsList for listsof reservations
722 &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.
723 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
724 &quot;warning&quot;: { # [Output Only] Informational warning message.
725 &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.
726 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
727 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
728 {
729 &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).
730 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
731 },
732 ],
733 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
734 },
735 }</pre>
736</div>
737
738<div class="method">
739 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
740 <pre>Retrieves the next page of results.
741
742Args:
743 previous_request: The request for the previous page. (required)
744 previous_response: The response from the request for the previous page. (required)
745
746Returns:
747 A request object that you can call &#x27;execute()&#x27; on to request the next
748 page. Returns None if there are no more items in the collection.
749 </pre>
750</div>
751
752<div class="method">
753 <code class="details" id="resize">resize(project, zone, reservation, body=None, requestId=None)</code>
754 <pre>Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.
755
756Args:
757 project: string, Project ID for this request. (required)
758 zone: string, Name of the zone for this request. (required)
759 reservation: string, Name of the reservation to update. (required)
760 body: object, The request body.
761 The object takes the form of:
762
763{
764 &quot;specificSkuCount&quot;: &quot;A String&quot;, # Number of allocated resources can be resized with minimum = 1 and maximum = 1000.
765 }
766
767 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.
768
769For 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.
770
771The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
772
773Returns:
774 An object of the form:
775
776 { # Represents an Operation resource.
777 #
778 # Google Compute Engine has three Operation resources:
779 #
780 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
781 #
782 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
783 #
784 # Operations can be global, regional or zonal.
785 # - For global operations, use the `globalOperations` resource.
786 # - For regional operations, use the `regionOperations` resource.
787 # - For zonal operations, use the `zonalOperations` resource.
788 #
789 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
790 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
791 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
792 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
793 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
794 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
795 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
796 {
797 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
798 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
799 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
800 },
801 ],
802 },
803 &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`.
804 &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.
805 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
806 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
807 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
808 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
809 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
810 &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.
811 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
812 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
813 &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.
814 &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`.
815 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
816 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
817 &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.
818 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
819 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
820 {
821 &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.
822 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
823 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
824 {
825 &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).
826 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
827 },
828 ],
829 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
830 },
831 ],
832 &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.
833 }</pre>
834</div>
835
836<div class="method">
837 <code class="details" id="setIamPolicy">setIamPolicy(project, zone, resource, body=None)</code>
838 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
839
840Args:
841 project: string, Project ID for this request. (required)
842 zone: string, The name of the zone for this request. (required)
843 resource: string, Name or id of the resource for this request. (required)
844 body: object, The request body.
845 The object takes the form of:
846
847{
848 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
849 { # Associates `members` with a `role`.
850 &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.
851 #
852 # If the condition evaluates to `true`, then this binding applies to the current request.
853 #
854 # 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.
855 #
856 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
857 #
858 # Example (Comparison):
859 #
860 # 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;
861 #
862 # Example (Equality):
863 #
864 # 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;
865 #
866 # Example (Logic):
867 #
868 # 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;
869 #
870 # Example (Data Manipulation):
871 #
872 # 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;
873 #
874 # 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.
875 &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.
876 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
877 &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.
878 &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.
879 },
880 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
881 #
882 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
883 #
884 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
885 #
886 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
887 #
888 #
889 #
890 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
891 #
892 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
893 #
894 # * `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.
895 #
896 # * `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.
897 #
898 # * `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.
899 #
900 #
901 #
902 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
903 &quot;A String&quot;,
904 ],
905 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
906 },
907 ],
908 &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.
909 &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.
910 #
911 #
912 #
913 # 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.
914 #
915 # 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).
916 #
917 # **JSON example:**
918 #
919 # { &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 }
920 #
921 # **YAML example:**
922 #
923 # 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
924 #
925 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
926 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
927 { # 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.
928 #
929 # 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.
930 #
931 # Example Policy with multiple AuditConfigs:
932 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700933 # { &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 Kim65020912020-05-20 12:08:20 -0700934 #
935 # 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.
936 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
937 { # Provides the configuration for logging a type of permissions. Example:
938 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700939 # { &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 Kim65020912020-05-20 12:08:20 -0700940 #
941 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
942 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
943 &quot;A String&quot;,
944 ],
945 &quot;ignoreChildExemptions&quot;: True or False,
946 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
947 },
948 ],
949 &quot;exemptedMembers&quot;: [
950 &quot;A String&quot;,
951 ],
952 &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.
953 },
954 ],
955 &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.
956 { # Associates `members` with a `role`.
957 &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.
958 #
959 # If the condition evaluates to `true`, then this binding applies to the current request.
960 #
961 # 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.
962 #
963 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
964 #
965 # Example (Comparison):
966 #
967 # 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;
968 #
969 # Example (Equality):
970 #
971 # 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;
972 #
973 # Example (Logic):
974 #
975 # 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;
976 #
977 # Example (Data Manipulation):
978 #
979 # 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;
980 #
981 # 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.
982 &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.
983 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
984 &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.
985 &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.
986 },
987 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
988 #
989 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
990 #
991 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
992 #
993 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
994 #
995 #
996 #
997 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
998 #
999 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1000 #
1001 # * `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.
1002 #
1003 # * `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.
1004 #
1005 # * `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.
1006 #
1007 #
1008 #
1009 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1010 &quot;A String&quot;,
1011 ],
1012 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1013 },
1014 ],
1015 &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.
1016 #
1017 # **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.
1018 &quot;iamOwned&quot;: True or False,
1019 &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.
1020 { # A rule to be applied in a Policy.
1021 &quot;action&quot;: &quot;A String&quot;, # Required
1022 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1023 { # A condition to be met.
1024 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1025 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1026 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1027 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1028 &quot;values&quot;: [ # The objects of the condition.
1029 &quot;A String&quot;,
1030 ],
1031 },
1032 ],
1033 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1034 &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.
1035 &quot;A String&quot;,
1036 ],
1037 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1038 { # Specifies what kind of log the caller must write
1039 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1040 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1041 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1042 },
1043 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1044 },
1045 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1046 #
1047 # 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.
1048 #
1049 # Field names correspond to IAM request parameters and field values are their respective values.
1050 #
1051 # 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.
1052 #
1053 # 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]}
1054 &quot;customFields&quot;: [ # Custom fields.
1055 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1056 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1057 &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.
1058 },
1059 ],
1060 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1061 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1062 },
1063 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1064 &quot;logMode&quot;: &quot;A String&quot;,
1065 },
1066 },
1067 ],
1068 &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.
1069 &quot;A String&quot;,
1070 ],
1071 &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.
1072 &quot;A String&quot;,
1073 ],
1074 },
1075 ],
1076 &quot;version&quot;: 42, # Specifies the format of the policy.
1077 #
1078 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1079 #
1080 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1081 #
1082 # * 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
1083 #
1084 # **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.
1085 #
1086 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1087 #
1088 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1089 },
1090 }
1091
1092
1093Returns:
1094 An object of the form:
1095
1096 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
1097 #
1098 #
1099 #
1100 # 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.
1101 #
1102 # 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).
1103 #
1104 # **JSON example:**
1105 #
1106 # { &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 }
1107 #
1108 # **YAML example:**
1109 #
1110 # 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
1111 #
1112 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
1113 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1114 { # 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.
1115 #
1116 # 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.
1117 #
1118 # Example Policy with multiple AuditConfigs:
1119 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001120 # { &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 Kim65020912020-05-20 12:08:20 -07001121 #
1122 # 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.
1123 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1124 { # Provides the configuration for logging a type of permissions. Example:
1125 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001126 # { &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 Kim65020912020-05-20 12:08:20 -07001127 #
1128 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1129 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1130 &quot;A String&quot;,
1131 ],
1132 &quot;ignoreChildExemptions&quot;: True or False,
1133 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1134 },
1135 ],
1136 &quot;exemptedMembers&quot;: [
1137 &quot;A String&quot;,
1138 ],
1139 &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.
1140 },
1141 ],
1142 &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.
1143 { # Associates `members` with a `role`.
1144 &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.
1145 #
1146 # If the condition evaluates to `true`, then this binding applies to the current request.
1147 #
1148 # 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.
1149 #
1150 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1151 #
1152 # Example (Comparison):
1153 #
1154 # 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;
1155 #
1156 # Example (Equality):
1157 #
1158 # 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;
1159 #
1160 # Example (Logic):
1161 #
1162 # 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;
1163 #
1164 # Example (Data Manipulation):
1165 #
1166 # 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;
1167 #
1168 # 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.
1169 &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.
1170 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1171 &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.
1172 &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.
1173 },
1174 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
1175 #
1176 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1177 #
1178 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1179 #
1180 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
1181 #
1182 #
1183 #
1184 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1185 #
1186 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1187 #
1188 # * `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.
1189 #
1190 # * `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.
1191 #
1192 # * `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.
1193 #
1194 #
1195 #
1196 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
1197 &quot;A String&quot;,
1198 ],
1199 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1200 },
1201 ],
1202 &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.
1203 #
1204 # **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.
1205 &quot;iamOwned&quot;: True or False,
1206 &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.
1207 { # A rule to be applied in a Policy.
1208 &quot;action&quot;: &quot;A String&quot;, # Required
1209 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1210 { # A condition to be met.
1211 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1212 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1213 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1214 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1215 &quot;values&quot;: [ # The objects of the condition.
1216 &quot;A String&quot;,
1217 ],
1218 },
1219 ],
1220 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1221 &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.
1222 &quot;A String&quot;,
1223 ],
1224 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1225 { # Specifies what kind of log the caller must write
1226 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1227 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1228 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1229 },
1230 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1231 },
1232 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1233 #
1234 # 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.
1235 #
1236 # Field names correspond to IAM request parameters and field values are their respective values.
1237 #
1238 # 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.
1239 #
1240 # 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]}
1241 &quot;customFields&quot;: [ # Custom fields.
1242 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1243 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1244 &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.
1245 },
1246 ],
1247 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1248 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1249 },
1250 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1251 &quot;logMode&quot;: &quot;A String&quot;,
1252 },
1253 },
1254 ],
1255 &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.
1256 &quot;A String&quot;,
1257 ],
1258 &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.
1259 &quot;A String&quot;,
1260 ],
1261 },
1262 ],
1263 &quot;version&quot;: 42, # Specifies the format of the policy.
1264 #
1265 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1266 #
1267 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1268 #
1269 # * 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
1270 #
1271 # **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.
1272 #
1273 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1274 #
1275 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1276 }</pre>
1277</div>
1278
1279<div class="method">
1280 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
1281 <pre>Returns permissions that a caller has on the specified resource.
1282
1283Args:
1284 project: string, Project ID for this request. (required)
1285 zone: string, The name of the zone for this request. (required)
1286 resource: string, Name or id of the resource for this request. (required)
1287 body: object, The request body.
1288 The object takes the form of:
1289
1290{
1291 &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.
1292 &quot;A String&quot;,
1293 ],
1294 }
1295
1296
1297Returns:
1298 An object of the form:
1299
1300 {
1301 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1302 &quot;A String&quot;,
1303 ],
1304 }</pre>
1305</div>
1306
1307</body></html>