Debian Codegraph @

docs/dyn/compute_v1.resourcePolicies.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, 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.resourcePolicies.html">resourcePolicies</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, returnPartialSuccess=None, serviceProjectNumber=None, x__xgafv=None)</a></code></p>
79 <p class="firstline">Retrieves an aggregated list of resource policies.</p>
80 <p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next()</a></code></p>
82 <p class="firstline">Retrieves the next page of results.</p>
83 <p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85 <p class="firstline">Close httplib2 connections.</p>
86 <p class="toc_element">
87 <code><a href="#delete">delete(project, region, resourcePolicy, requestId=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Deletes the specified resource policy.</p>
89 <p class="toc_element">
90 <code><a href="#get">get(project, region, resourcePolicy, x__xgafv=None)</a></code></p>
91 <p class="firstline">Retrieves all information of the specified resource policy.</p>
92 <p class="toc_element">
93 <code><a href="#getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</a></code></p>
94 <p class="firstline">Gets the access control policy for a resource. May be empty if no such</p>
95 <p class="toc_element">
96 <code><a href="#insert">insert(project, region, body=None, requestId=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Creates a new resource policy.</p>
98 <p class="toc_element">
99 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
100 <p class="firstline">A list all the resource policies that have been configured for the</p>
101 <p class="toc_element">
102 <code><a href="#list_next">list_next()</a></code></p>
103 <p class="firstline">Retrieves the next page of results.</p>
104 <p class="toc_element">
105 <code><a href="#patch">patch(project, region, resourcePolicy, body=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p>
106 <p class="firstline">Modify the specified resource policy.</p>
107 <p class="toc_element">
108 <code><a href="#setIamPolicy">setIamPolicy(project, region, resource, body=None, x__xgafv=None)</a></code></p>
109 <p class="firstline">Sets the access control policy on the specified resource.</p>
110 <p class="toc_element">
111 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None, x__xgafv=None)</a></code></p>
112 <p class="firstline">Returns permissions that a caller has on the specified resource.</p>
113 <h3>Method Details</h3>
114 <div class="method">
115 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, serviceProjectNumber=None, x__xgafv=None)</code>
116 <pre>Retrieves an aggregated list of resource policies.
117
118 To prevent failure, Google recommends that you set the
119 `returnPartialSuccess` parameter to `true`.
120
121 Args:
122 project: string, Project ID for this request. (required)
123 filter: string, A filter expression that filters resources listed in the response. Most
124 Compute resources support two types of filter expressions:
125 expressions that support regular expressions and expressions that follow
126 API improvement proposal AIP-160.
127 These two types of filter expressions cannot be mixed in one request.
128
129 If you want to use AIP-160, your expression must specify the field name, an
130 operator, and the value that you want to use for filtering. The value
131 must be a string, a number, or a boolean. The operator
132 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
133
134 For example, if you are filtering Compute Engine instances, you can
135 exclude instances named `example-instance` by specifying
136 `name != example-instance`.
137
138 The `:*` comparison can be used to test whether a key has been defined.
139 For example, to find all objects with `owner` label use:
140 ```
141 labels.owner:*
142 ```
143
144 You can also filter nested fields. For example, you could specify
145 `scheduling.automaticRestart = false` to include instances only
146 if they are not scheduled for automatic restarts. You can use filtering
147 on nested fields to filter based onresource labels.
148
149 To filter on multiple expressions, provide each separate expression within
150 parentheses. For example:
151 ```
152 (scheduling.automaticRestart = true)
153 (cpuPlatform = &quot;Intel Skylake&quot;)
154 ```
155 By default, each expression is an `AND` expression. However, you
156 can include `AND` and `OR` expressions explicitly.
157 For example:
158 ```
159 (cpuPlatform = &quot;Intel Skylake&quot;) OR
160 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
161 (scheduling.automaticRestart = true)
162 ```
163
164 If you want to use a regular expression, use the `eq` (equal) or `ne`
165 (not equal) operator against a single un-parenthesized expression with or
166 without quotes or against multiple parenthesized expressions. Examples:
167
168 `fieldname eq unquoted literal`
169 `fieldname eq &#x27;single quoted literal&#x27;`
170 `fieldname eq &quot;double quoted literal&quot;`
171 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
172
173 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
174 The literal value must match the entire field.
175
176 For example, to filter for instances that do not end with name &quot;instance&quot;,
177 you would use `name ne .*instance`.
178
179 You cannot combine constraints on multiple fields using regular
180 expressions.
181 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region,
182 global) should be included in the response. For new resource types added
183 after this field, the flag has no effect as new resource types will always
184 include every visible scope for each scope type in response. For resource
185 types which predate this field, if this flag is omitted or false, only
186 scopes of the scope types where the resource type is expected to be found
187 will be included.
188 maxResults: integer, The maximum number of results per page that should be returned.
189 If the number of available results is larger than `maxResults`,
190 Compute Engine returns a `nextPageToken` that can be used to get
191 the next page of results in subsequent list requests. Acceptable values are
192 `0` to `500`, inclusive. (Default: `500`)
193 orderBy: string, Sorts list results by a certain order. By default, results
194 are returned in alphanumerical order based on the resource name.
195
196 You can also sort results in descending order based on the creation
197 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
198 results based on the `creationTimestamp` field in
199 reverse chronological order (newest result first). Use this to sort
200 resources like operations so that the newest operation is returned first.
201
202 Currently, only sorting by `name` or
203 `creationTimestamp desc` is supported.
204 pageToken: string, Specifies a page token to use. Set `pageToken` to the
205 `nextPageToken` returned by a previous list request to get
206 the next page of results.
207 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
208 of failure. The default value is false.
209
210 For example, when partial success behavior is enabled, aggregatedList for a
211 single zone scope either returns all resources in the zone or no resources,
212 with an error code.
213 serviceProjectNumber: string, The Shared VPC service project id or service project number for which
214 aggregated list request is invoked for subnetworks list-usable api.
215 x__xgafv: string, V1 error format.
216 Allowed values
217 1 - v1 error format
218 2 - v2 error format
219
220 Returns:
221 An object of the form:
222
223 { # Contains a list of resourcePolicies.
224 &quot;etag&quot;: &quot;A String&quot;,
225 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
226 &quot;items&quot;: { # A list of ResourcePolicy resources.
227 &quot;a_key&quot;: { # Name of the scope containing this set of resourcePolicies.
228 &quot;resourcePolicies&quot;: [ # A list of resourcePolicies contained in this scope.
229 { # Represents a Resource Policy resource. You can use resource policies to
230 # schedule actions for some Compute Engine resources. For example, you can
231 # use them toschedule persistent disk
232 # snapshots.
233 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
234 # text format.
235 &quot;description&quot;: &quot;A String&quot;,
236 &quot;diskConsistencyGroupPolicy&quot;: { # Resource policy for disk consistency groups. # Resource policy for disk consistency groups.
237 },
238 &quot;groupPlacementPolicy&quot;: { # A GroupPlacementPolicy specifies resource placement configuration. # Resource policy for instances for placement configuration.
239 # It specifies the failure bucket separation
240 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
241 # specified, the default is AUTO_CONNECT.
242 &quot;availabilityDomainCount&quot;: 42, # The number of availability domains to spread instances across. If two
243 # instances are in different availability domain, they are not in the same
244 # low latency network.
245 &quot;collocation&quot;: &quot;A String&quot;, # Specifies network collocation
246 &quot;gpuTopology&quot;: &quot;A String&quot;, # Specifies the shape of the GPU slice, in slice based GPU families eg.
247 # A4X.
248 &quot;vmCount&quot;: 42, # Number of VMs in this placement group. Google does not recommend that you
249 # use this field unless you use a compact policy and you want your policy
250 # to work only if it contains this exact number of VMs.
251 },
252 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
253 # defined by the server.
254 &quot;instanceSchedulePolicy&quot;: { # An InstanceSchedulePolicy specifies when and how frequent certain # Resource policy for scheduling instance operations.
255 # operations are performed on the instance.
256 &quot;expirationTime&quot;: &quot;A String&quot;, # The expiration time of the schedule. The timestamp is an RFC3339 string.
257 &quot;startTime&quot;: &quot;A String&quot;, # The start time of the schedule. The timestamp is an RFC3339 string.
258 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting Schedule.schedule.
259 # The value of this field must be a time zone name from the tz database:
260 # https://wikipedia.org/wiki/Tz_database.
261 &quot;vmStartSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for starting instances.
262 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
263 },
264 &quot;vmStopSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for stopping instances.
265 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
266 },
267 },
268 &quot;kind&quot;: &quot;compute#resourcePolicy&quot;, # Output only. [Output Only] Type of the resource. Alwayscompute#resource_policies for resource policies.
269 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating
270 # the resource. The resource name must be 1-63 characters long, and comply
271 # withRFC1035.
272 # Specifically, the name must be 1-63 characters long and match the regular
273 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
274 # character must be a lowercase letter, and all following characters must be
275 # a dash, lowercase letter, or digit, except the last character, which cannot
276 # be a dash.
277 &quot;region&quot;: &quot;A String&quot;,
278 &quot;resourceStatus&quot;: { # Contains output only fields. # Output only. [Output Only] The system status of the resource policy.
279 # Use this sub-message for all output fields set on ResourcePolicy.
280 # The internal structure of this &quot;status&quot; field should mimic the structure
281 # of ResourcePolicy proto specification.
282 &quot;instanceSchedulePolicy&quot;: { # Output only. [Output Only] Specifies a set of output values reffering to
283 # the instance_schedule_policy system status.
284 # This field should have the same name as corresponding policy field.
285 &quot;lastRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The last time the schedule successfully ran.
286 # The timestamp is an RFC3339 string.
287 &quot;nextRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The next time the schedule is planned to run.
288 # The actual time might be slightly different.
289 # The timestamp is an RFC3339 string.
290 },
291 },
292 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined fully-qualified URL for this resource.
293 &quot;snapshotSchedulePolicy&quot;: { # A snapshot schedule policy specifies when and how frequently snapshots are # Resource policy for persistent disks for creating snapshots.
294 # to be created for the target disk. Also specifies how many and how long
295 # these scheduled snapshots should be retained.
296 &quot;retentionPolicy&quot;: { # Policy for retention of scheduled snapshots. # Retention policy applied to snapshots created by this resource policy.
297 &quot;maxRetentionDays&quot;: 42, # Maximum age of the snapshot that is allowed to be kept.
298 &quot;onSourceDiskDelete&quot;: &quot;A String&quot;, # Specifies the behavior to apply to scheduled snapshots when
299 # the source disk is deleted.
300 },
301 &quot;schedule&quot;: { # A schedule for disks where the schedueled operations are performed. # A Vm Maintenance Policy specifies what kind of infrastructure
302 # maintenance we are allowed to perform on this VM and when. Schedule
303 # that is applied to disks covered by this policy.
304 &quot;dailySchedule&quot;: { # Time window specified for daily operations.
305 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in days. The value determines
306 # how many days pass between the start of each cycle.
307 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] A predetermined duration for the window, automatically
308 # chosen to be the smallest possible in the given scenario.
309 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one
310 # of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For
311 # example, both 13:00-5 and 08:00 are valid.
312 },
313 &quot;hourlySchedule&quot;: { # Time window specified for hourly operations.
314 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
315 # smallest possible in the given scenario.
316 &quot;hoursInCycle&quot;: 42, # Defines a schedule with units measured in hours. The value determines
317 # how many hours pass between the start of each cycle.
318 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
319 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
320 },
321 &quot;weeklySchedule&quot;: { # Time window specified for weekly operations.
322 &quot;dayOfWeeks&quot;: [ # Up to 7 intervals/windows, one for each day of the week.
323 {
324 &quot;day&quot;: &quot;A String&quot;, # Defines a schedule that runs on specific days of the week. Specify
325 # one or more days. The following options are available:
326 # MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
327 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
328 # smallest possible in the given scenario.
329 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
330 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
331 },
332 ],
333 },
334 },
335 &quot;snapshotProperties&quot;: { # Specified snapshot properties for scheduled snapshots created by this # Properties with which snapshots are created such as labels, encryption
336 # keys.
337 # policy.
338 &quot;chainName&quot;: &quot;A String&quot;, # Chain name that the snapshot is created in.
339 &quot;guestFlush&quot;: True or False, # Indication to perform a &#x27;guest aware&#x27; snapshot.
340 &quot;labels&quot;: { # Labels to apply to scheduled snapshots. These can be later modified
341 # by the setLabels method. Label values may be empty.
342 &quot;a_key&quot;: &quot;A String&quot;,
343 },
344 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the auto snapshot (regional or
345 # multi-regional).
346 &quot;A String&quot;,
347 ],
348 },
349 },
350 &quot;status&quot;: &quot;A String&quot;, # Output only. [Output Only] The status of resource policy creation.
351 &quot;workloadPolicy&quot;: { # Represents the workload policy. # Resource policy for defining instance placement for MIGs.
352 &quot;acceleratorTopology&quot;: &quot;A String&quot;, # Specifies the topology required to create a partition for VMs that have
353 # interconnected GPUs.
354 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
355 # specified, the default is AUTO_CONNECT.
356 &quot;maxTopologyDistance&quot;: &quot;A String&quot;, # Specifies the maximum distance between instances.
357 &quot;type&quot;: &quot;A String&quot;, # Specifies the intent of the instance placement in the MIG.
358 },
359 },
360 ],
361 &quot;warning&quot;: { # Informational warning which replaces the list of resourcePolicies when
362 # the list is empty.
363 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
364 # Engine returns NO_RESULTS_ON_PAGE if there
365 # are no results in the response.
366 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
367 # value format. For example:
368 #
369 # &quot;data&quot;: [
370 # {
371 # &quot;key&quot;: &quot;scope&quot;,
372 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
373 # }
374 {
375 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
376 # returned. For example, for warnings where there are no results in a list
377 # request for a particular zone, this key might be scope and
378 # the key value might be the zone name. Other examples might be a key
379 # indicating a deprecated resource and a suggested replacement, or a
380 # warning about invalid network settings (for example, if an instance
381 # attempts to perform IP forwarding but is not enabled for IP forwarding).
382 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
383 },
384 ],
385 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
386 },
387 },
388 },
389 &quot;kind&quot;: &quot;compute#resourcePolicyAggregatedList&quot;, # Output only. Type of resource.
390 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
391 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
392 # the query parameter pageToken in the next list request.
393 # Subsequent list requests will have their own nextPageToken to
394 # continue paging through the results.
395 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource.
396 &quot;unreachables&quot;: [ # Output only. [Output Only] Unreachable resources.
397 &quot;A String&quot;,
398 ],
399 &quot;warning&quot;: { # [Output Only] Informational warning message.
400 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
401 # Engine returns NO_RESULTS_ON_PAGE if there
402 # are no results in the response.
403 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
404 # value format. For example:
405 #
406 # &quot;data&quot;: [
407 # {
408 # &quot;key&quot;: &quot;scope&quot;,
409 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
410 # }
411 {
412 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
413 # returned. For example, for warnings where there are no results in a list
414 # request for a particular zone, this key might be scope and
415 # the key value might be the zone name. Other examples might be a key
416 # indicating a deprecated resource and a suggested replacement, or a
417 # warning about invalid network settings (for example, if an instance
418 # attempts to perform IP forwarding but is not enabled for IP forwarding).
419 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
420 },
421 ],
422 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
423 },
424 }</pre>
425 </div>
426
427 <div class="method">
428 <code class="details" id="aggregatedList_next">aggregatedList_next()</code>
429 <pre>Retrieves the next page of results.
430
431 Args:
432 previous_request: The request for the previous page. (required)
433 previous_response: The response from the request for the previous page. (required)
434
435 Returns:
436 A request object that you can call &#x27;execute()&#x27; on to request the next
437 page. Returns None if there are no more items in the collection.
438 </pre>
439 </div>
440
441 <div class="method">
442 <code class="details" id="close">close()</code>
443 <pre>Close httplib2 connections.</pre>
444 </div>
445
446 <div class="method">
447 <code class="details" id="delete">delete(project, region, resourcePolicy, requestId=None, x__xgafv=None)</code>
448 <pre>Deletes the specified resource policy.
449
450 Args:
451 project: string, Project ID for this request. (required)
452 region: string, Name of the region for this request. (required)
453 resourcePolicy: string, Name of the resource policy to delete. (required)
454 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
455 that if you must retry your request, the server will know to ignore the
456 request if it has already been completed.
457
458 For example, consider a situation where you make an initial request and
459 the request times out. If you make the request again with the same
460 request ID, the server can check if original operation with the same
461 request ID was received, and if so, will ignore the second request. This
462 prevents clients from accidentally creating duplicate commitments.
463
464 The request ID must be
465 a valid UUID with the exception that zero UUID is not supported
466 (00000000-0000-0000-0000-000000000000).
467 x__xgafv: string, V1 error format.
468 Allowed values
469 1 - v1 error format
470 2 - v2 error format
471
472 Returns:
473 An object of the form:
474
475 { # Represents an Operation resource.
476 #
477 # Google Compute Engine has three Operation resources:
478 #
479 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
480 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
481 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
482 #
483 # You can use an operation resource to manage asynchronous API requests.
484 # For more information, readHandling
485 # API responses.
486 #
487 # Operations can be global, regional or zonal.
488 #
489 # - For global operations, use the `globalOperations`
490 # resource.
491 # - For regional operations, use the
492 # `regionOperations` resource.
493 # - For zonal operations, use
494 # the `zoneOperations` resource.
495 #
496 #
497 #
498 # For more information, read
499 # Global, Regional, and Zonal Resources.
500 #
501 # Note that completed Operation resources have a limited
502 # retention period.
503 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
504 # Not present otherwise.
505 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
506 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
507 # set when the operation is created.
508 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
509 # text format.
510 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
511 # this field will be populated.
512 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
513 # operation.
514 {
515 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
516 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
517 # details. There is a set of defined message types to use for providing
518 # details.The syntax depends on the error code. For example,
519 # QuotaExceededInfo will have details when the error code is
520 # QUOTA_EXCEEDED.
521 {
522 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
523 #
524 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
525 # is not enabled:
526 #
527 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
528 # &quot;domain&quot;: &quot;googleapis.com&quot;
529 # &quot;metadata&quot;: {
530 # &quot;resource&quot;: &quot;projects/123&quot;,
531 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
532 # }
533 # }
534 #
535 # This response indicates that the pubsub.googleapis.com API is not enabled.
536 #
537 # Example of an error that is returned when attempting to create a Spanner
538 # instance in a region that is out of stock:
539 #
540 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
541 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
542 # &quot;metadata&quot;: {
543 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
544 # }
545 # }
546 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
547 # is typically the registered service name of the tool or product that
548 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
549 # generated by some common infrastructure, the error domain must be a
550 # globally unique value that identifies the infrastructure. For Google API
551 # infrastructure, the error domain is &quot;googleapis.com&quot;.
552 &quot;metadatas&quot;: { # Additional structured details about this error.
553 #
554 # Keys must match a regular expression of `a-z+` but should
555 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
556 # length. When identifying the current value of an exceeded limit, the units
557 # should be contained in the key, not the value. For example, rather than
558 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
559 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
560 # instances that can be created in a single (batch) request.
561 &quot;a_key&quot;: &quot;A String&quot;,
562 },
563 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
564 # proximate cause of the error. Error reasons are unique within a particular
565 # domain of errors. This should be at most 63 characters and match a
566 # regular expression of `A-Z+[A-Z0-9]`, which represents
567 # UPPER_SNAKE_CASE.
568 },
569 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
570 #
571 # For example, if a quota check failed with an error indicating the calling
572 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
573 # directly to the right place in the developer console to flip the bit.
574 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
575 { # Describes a URL link.
576 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
577 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
578 },
579 ],
580 },
581 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
582 # which can be attached to an RPC error.
583 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
584 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
585 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
586 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
587 },
588 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
589 &quot;dimensions&quot;: { # The map holding related quota dimensions.
590 &quot;a_key&quot;: &quot;A String&quot;,
591 },
592 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
593 # type or metric.
594 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
595 # or metric.
596 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
597 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
598 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
599 },
600 },
601 ],
602 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
603 # This property is optional.
604 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
605 },
606 ],
607 },
608 &quot;getVersionOperationMetadata&quot;: {
609 &quot;inlineSbomInfo&quot;: {
610 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
611 # appropriate identifiers.
612 &quot;a_key&quot;: &quot;A String&quot;,
613 },
614 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
615 # identifiers.
616 &quot;a_key&quot;: &quot;A String&quot;,
617 },
618 },
619 },
620 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
621 # message that was returned, such as `NOT FOUND`.
622 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
623 # status code that was returned. For example, a `404` means the
624 # resource was not found.
625 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
626 # defined by the server.
627 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
628 # This value is inRFC3339
629 # text format.
630 &quot;instancesBulkInsertOperationMetadata&quot;: {
631 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
632 # Example key: zones/us-central1-a
633 &quot;a_key&quot;: {
634 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
635 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
636 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
637 # error.
638 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
639 # if the flow is rolling forward or rolling back.
640 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
641 },
642 },
643 },
644 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
645 # Operation resources.
646 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
647 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
648 # group of operations results from a `bulkInsert` API request.
649 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
650 # `update`, or `delete`, and so on.
651 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
652 # There is no requirement that this be linear or support any granularity of
653 # operations. This should not be used to guess when the operation will be
654 # complete. This number should monotonically increase as the operation
655 # progresses.
656 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
657 # applicable when performing regional operations.
658 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
659 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
660 # this field will contain information on all underlying zonal actions and
661 # their state.
662 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
663 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
664 # Example key: zones/us-central1-a
665 &quot;a_key&quot;: {
666 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
667 # populated.
668 # different programming environments, including REST APIs and RPC APIs. It is
669 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
670 # three pieces of data: error code, error message, and error details.
671 #
672 # You can find out more about this error model and how to work with it in the
673 # [API Design Guide](https://cloud.google.com/apis/design/errors).
674 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
675 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
676 # message types for APIs to use.
677 {
678 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
679 },
680 ],
681 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
682 # user-facing error message should be localized and sent in the
683 # google.rpc.Status.details field, or localized by the client.
684 },
685 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
686 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
687 },
688 },
689 },
690 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
691 # This value is inRFC3339
692 # text format.
693 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
694 # following:
695 # `PENDING`, `RUNNING`, or `DONE`.
696 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
697 # operation.
698 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
699 # of the target resource.
700 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
701 # operations related to creating a snapshot, this points to the disk
702 # that the snapshot was created from.
703 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
704 # `[email protected]` or
705 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
706 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
707 # operation, this field will be populated.
708 {
709 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
710 # Engine returns NO_RESULTS_ON_PAGE if there
711 # are no results in the response.
712 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
713 # value format. For example:
714 #
715 # &quot;data&quot;: [
716 # {
717 # &quot;key&quot;: &quot;scope&quot;,
718 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
719 # }
720 {
721 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
722 # returned. For example, for warnings where there are no results in a list
723 # request for a particular zone, this key might be scope and
724 # the key value might be the zone name. Other examples might be a key
725 # indicating a deprecated resource and a suggested replacement, or a
726 # warning about invalid network settings (for example, if an instance
727 # attempts to perform IP forwarding but is not enabled for IP forwarding).
728 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
729 },
730 ],
731 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
732 },
733 ],
734 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
735 # applicable when performing per-zone operations.
736 }</pre>
737 </div>
738
739 <div class="method">
740 <code class="details" id="get">get(project, region, resourcePolicy, x__xgafv=None)</code>
741 <pre>Retrieves all information of the specified resource policy.
742
743 Args:
744 project: string, Project ID for this request. (required)
745 region: string, Name of the region for this request. (required)
746 resourcePolicy: string, Name of the resource policy to retrieve. (required)
747 x__xgafv: string, V1 error format.
748 Allowed values
749 1 - v1 error format
750 2 - v2 error format
751
752 Returns:
753 An object of the form:
754
755 { # Represents a Resource Policy resource. You can use resource policies to
756 # schedule actions for some Compute Engine resources. For example, you can
757 # use them toschedule persistent disk
758 # snapshots.
759 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
760 # text format.
761 &quot;description&quot;: &quot;A String&quot;,
762 &quot;diskConsistencyGroupPolicy&quot;: { # Resource policy for disk consistency groups. # Resource policy for disk consistency groups.
763 },
764 &quot;groupPlacementPolicy&quot;: { # A GroupPlacementPolicy specifies resource placement configuration. # Resource policy for instances for placement configuration.
765 # It specifies the failure bucket separation
766 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
767 # specified, the default is AUTO_CONNECT.
768 &quot;availabilityDomainCount&quot;: 42, # The number of availability domains to spread instances across. If two
769 # instances are in different availability domain, they are not in the same
770 # low latency network.
771 &quot;collocation&quot;: &quot;A String&quot;, # Specifies network collocation
772 &quot;gpuTopology&quot;: &quot;A String&quot;, # Specifies the shape of the GPU slice, in slice based GPU families eg.
773 # A4X.
774 &quot;vmCount&quot;: 42, # Number of VMs in this placement group. Google does not recommend that you
775 # use this field unless you use a compact policy and you want your policy
776 # to work only if it contains this exact number of VMs.
777 },
778 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
779 # defined by the server.
780 &quot;instanceSchedulePolicy&quot;: { # An InstanceSchedulePolicy specifies when and how frequent certain # Resource policy for scheduling instance operations.
781 # operations are performed on the instance.
782 &quot;expirationTime&quot;: &quot;A String&quot;, # The expiration time of the schedule. The timestamp is an RFC3339 string.
783 &quot;startTime&quot;: &quot;A String&quot;, # The start time of the schedule. The timestamp is an RFC3339 string.
784 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting Schedule.schedule.
785 # The value of this field must be a time zone name from the tz database:
786 # https://wikipedia.org/wiki/Tz_database.
787 &quot;vmStartSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for starting instances.
788 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
789 },
790 &quot;vmStopSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for stopping instances.
791 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
792 },
793 },
794 &quot;kind&quot;: &quot;compute#resourcePolicy&quot;, # Output only. [Output Only] Type of the resource. Alwayscompute#resource_policies for resource policies.
795 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating
796 # the resource. The resource name must be 1-63 characters long, and comply
797 # withRFC1035.
798 # Specifically, the name must be 1-63 characters long and match the regular
799 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
800 # character must be a lowercase letter, and all following characters must be
801 # a dash, lowercase letter, or digit, except the last character, which cannot
802 # be a dash.
803 &quot;region&quot;: &quot;A String&quot;,
804 &quot;resourceStatus&quot;: { # Contains output only fields. # Output only. [Output Only] The system status of the resource policy.
805 # Use this sub-message for all output fields set on ResourcePolicy.
806 # The internal structure of this &quot;status&quot; field should mimic the structure
807 # of ResourcePolicy proto specification.
808 &quot;instanceSchedulePolicy&quot;: { # Output only. [Output Only] Specifies a set of output values reffering to
809 # the instance_schedule_policy system status.
810 # This field should have the same name as corresponding policy field.
811 &quot;lastRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The last time the schedule successfully ran.
812 # The timestamp is an RFC3339 string.
813 &quot;nextRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The next time the schedule is planned to run.
814 # The actual time might be slightly different.
815 # The timestamp is an RFC3339 string.
816 },
817 },
818 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined fully-qualified URL for this resource.
819 &quot;snapshotSchedulePolicy&quot;: { # A snapshot schedule policy specifies when and how frequently snapshots are # Resource policy for persistent disks for creating snapshots.
820 # to be created for the target disk. Also specifies how many and how long
821 # these scheduled snapshots should be retained.
822 &quot;retentionPolicy&quot;: { # Policy for retention of scheduled snapshots. # Retention policy applied to snapshots created by this resource policy.
823 &quot;maxRetentionDays&quot;: 42, # Maximum age of the snapshot that is allowed to be kept.
824 &quot;onSourceDiskDelete&quot;: &quot;A String&quot;, # Specifies the behavior to apply to scheduled snapshots when
825 # the source disk is deleted.
826 },
827 &quot;schedule&quot;: { # A schedule for disks where the schedueled operations are performed. # A Vm Maintenance Policy specifies what kind of infrastructure
828 # maintenance we are allowed to perform on this VM and when. Schedule
829 # that is applied to disks covered by this policy.
830 &quot;dailySchedule&quot;: { # Time window specified for daily operations.
831 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in days. The value determines
832 # how many days pass between the start of each cycle.
833 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] A predetermined duration for the window, automatically
834 # chosen to be the smallest possible in the given scenario.
835 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one
836 # of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For
837 # example, both 13:00-5 and 08:00 are valid.
838 },
839 &quot;hourlySchedule&quot;: { # Time window specified for hourly operations.
840 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
841 # smallest possible in the given scenario.
842 &quot;hoursInCycle&quot;: 42, # Defines a schedule with units measured in hours. The value determines
843 # how many hours pass between the start of each cycle.
844 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
845 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
846 },
847 &quot;weeklySchedule&quot;: { # Time window specified for weekly operations.
848 &quot;dayOfWeeks&quot;: [ # Up to 7 intervals/windows, one for each day of the week.
849 {
850 &quot;day&quot;: &quot;A String&quot;, # Defines a schedule that runs on specific days of the week. Specify
851 # one or more days. The following options are available:
852 # MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
853 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
854 # smallest possible in the given scenario.
855 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
856 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
857 },
858 ],
859 },
860 },
861 &quot;snapshotProperties&quot;: { # Specified snapshot properties for scheduled snapshots created by this # Properties with which snapshots are created such as labels, encryption
862 # keys.
863 # policy.
864 &quot;chainName&quot;: &quot;A String&quot;, # Chain name that the snapshot is created in.
865 &quot;guestFlush&quot;: True or False, # Indication to perform a &#x27;guest aware&#x27; snapshot.
866 &quot;labels&quot;: { # Labels to apply to scheduled snapshots. These can be later modified
867 # by the setLabels method. Label values may be empty.
868 &quot;a_key&quot;: &quot;A String&quot;,
869 },
870 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the auto snapshot (regional or
871 # multi-regional).
872 &quot;A String&quot;,
873 ],
874 },
875 },
876 &quot;status&quot;: &quot;A String&quot;, # Output only. [Output Only] The status of resource policy creation.
877 &quot;workloadPolicy&quot;: { # Represents the workload policy. # Resource policy for defining instance placement for MIGs.
878 &quot;acceleratorTopology&quot;: &quot;A String&quot;, # Specifies the topology required to create a partition for VMs that have
879 # interconnected GPUs.
880 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
881 # specified, the default is AUTO_CONNECT.
882 &quot;maxTopologyDistance&quot;: &quot;A String&quot;, # Specifies the maximum distance between instances.
883 &quot;type&quot;: &quot;A String&quot;, # Specifies the intent of the instance placement in the MIG.
884 },
885 }</pre>
886 </div>
887
888 <div class="method">
889 <code class="details" id="getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</code>
890 <pre>Gets the access control policy for a resource. May be empty if no such
891 policy or resource exists.
892
893 Args:
894 project: string, Project ID for this request. (required)
895 region: string, The name of the region for this request. (required)
896 resource: string, Name or id of the resource for this request. (required)
897 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
898 x__xgafv: string, V1 error format.
899 Allowed values
900 1 - v1 error format
901 2 - v2 error format
902
903 Returns:
904 An object of the form:
905
906 { # An Identity and Access Management (IAM) policy, which specifies access
907 # controls for Google Cloud resources.
908 #
909 #
910 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
911 # `members`, or principals, to a single `role`. Principals can be user
912 # accounts, service accounts, Google groups, and domains (such as G Suite). A
913 # `role` is a named list of permissions; each `role` can be an IAM predefined
914 # role or a user-created custom role.
915 #
916 # For some types of Google Cloud resources, a `binding` can also specify a
917 # `condition`, which is a logical expression that allows access to a resource
918 # only if the expression evaluates to `true`. A condition can add constraints
919 # based on attributes of the request, the resource, or both. To learn which
920 # resources support conditions in their IAM policies, see the
921 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
922 #
923 # **JSON example:**
924 #
925 # ```
926 # {
927 # &quot;bindings&quot;: [
928 # {
929 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
930 # &quot;members&quot;: [
931 # &quot;user:[email protected]&quot;,
932 # &quot;group:[email protected]&quot;,
933 # &quot;domain:google.com&quot;,
934 # &quot;serviceAccount:[email protected]&quot;
935 # ]
936 # },
937 # {
938 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
939 # &quot;members&quot;: [
940 # &quot;user:[email protected]&quot;
941 # ],
942 # &quot;condition&quot;: {
943 # &quot;title&quot;: &quot;expirable access&quot;,
944 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
945 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
946 # }
947 # }
948 # ],
949 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
950 # &quot;version&quot;: 3
951 # }
952 # ```
953 #
954 # **YAML example:**
955 #
956 # ```
957 # bindings:
958 # - members:
959 # - user:[email protected]
960 # - group:[email protected]
961 # - domain:google.com
962 # - serviceAccount:[email protected]
963 # role: roles/resourcemanager.organizationAdmin
964 # - members:
965 # - user:[email protected]
966 # role: roles/resourcemanager.organizationViewer
967 # condition:
968 # title: expirable access
969 # description: Does not grant access after Sep 2020
970 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
971 # etag: BwWWja0YfJA=
972 # version: 3
973 # ```
974 #
975 # For a description of IAM and its features, see the
976 # [IAM documentation](https://cloud.google.com/iam/docs/).
977 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
978 { # Specifies the audit configuration for a service.
979 # The configuration determines which permission types are logged, and what
980 # identities, if any, are exempted from logging.
981 # An AuditConfig must have one or more AuditLogConfigs.
982 #
983 # If there are AuditConfigs for both `allServices` and a specific service,
984 # the union of the two AuditConfigs is used for that service: the log_types
985 # specified in each AuditConfig are enabled, and the exempted_members in each
986 # AuditLogConfig are exempted.
987 #
988 # Example Policy with multiple AuditConfigs:
989 #
990 # {
991 # &quot;audit_configs&quot;: [
992 # {
993 # &quot;service&quot;: &quot;allServices&quot;,
994 # &quot;audit_log_configs&quot;: [
995 # {
996 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
997 # &quot;exempted_members&quot;: [
998 # &quot;user:[email protected]&quot;
999 # ]
1000 # },
1001 # {
1002 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1003 # },
1004 # {
1005 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
1006 # }
1007 # ]
1008 # },
1009 # {
1010 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
1011 # &quot;audit_log_configs&quot;: [
1012 # {
1013 # &quot;log_type&quot;: &quot;DATA_READ&quot;
1014 # },
1015 # {
1016 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1017 # &quot;exempted_members&quot;: [
1018 # &quot;user:[email protected]&quot;
1019 # ]
1020 # }
1021 # ]
1022 # }
1023 # ]
1024 # }
1025 #
1026 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1027 # logging. It also exempts `[email protected]` from DATA_READ logging, and
1028 # `[email protected]` from DATA_WRITE logging.
1029 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1030 { # Provides the configuration for logging a type of permissions.
1031 # Example:
1032 #
1033 # {
1034 # &quot;audit_log_configs&quot;: [
1035 # {
1036 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1037 # &quot;exempted_members&quot;: [
1038 # &quot;user:[email protected]&quot;
1039 # ]
1040 # },
1041 # {
1042 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1043 # }
1044 # ]
1045 # }
1046 #
1047 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1048 # [email protected] from DATA_READ logging.
1049 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1050 # permission.
1051 # Follows the same format of Binding.members.
1052 &quot;A String&quot;,
1053 ],
1054 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1055 },
1056 ],
1057 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1058 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1059 # `allServices` is a special value that covers all services.
1060 },
1061 ],
1062 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally,
1063 # may specify a `condition` that determines how and when the `bindings` are
1064 # applied. Each of the `bindings` must contain at least one principal.
1065 #
1066 # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
1067 # of these principals can be Google groups. Each occurrence of a principal
1068 # counts towards these limits. For example, if the `bindings` grant 50
1069 # different roles to `user:[email protected]`, and not to any other
1070 # principal, then you can add another 1,450 principals to the `bindings` in
1071 # the `Policy`.
1072 { # Associates `members`, or principals, with a `role`.
1073 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1074 #
1075 # If the condition evaluates to `true`, then this binding applies to the
1076 # current request.
1077 #
1078 # If the condition evaluates to `false`, then this binding does not apply to
1079 # the current request. However, a different role binding might grant the same
1080 # role to one or more of the principals in this binding.
1081 #
1082 # To learn which resources support conditions in their IAM policies, see the
1083 # [IAM
1084 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1085 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1086 # are documented at https://github.com/google/cel-spec.
1087 #
1088 # Example (Comparison):
1089 #
1090 # title: &quot;Summary size limit&quot;
1091 # description: &quot;Determines if a summary is less than 100 chars&quot;
1092 # expression: &quot;document.summary.size() &lt; 100&quot;
1093 #
1094 # Example (Equality):
1095 #
1096 # title: &quot;Requestor is owner&quot;
1097 # description: &quot;Determines if requestor is the document owner&quot;
1098 # expression: &quot;document.owner == request.auth.claims.email&quot;
1099 #
1100 # Example (Logic):
1101 #
1102 # title: &quot;Public documents&quot;
1103 # description: &quot;Determine whether the document should be publicly visible&quot;
1104 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1105 #
1106 # Example (Data Manipulation):
1107 #
1108 # title: &quot;Notification string&quot;
1109 # description: &quot;Create a notification string with a timestamp.&quot;
1110 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1111 #
1112 # The exact variables and functions that may be referenced within an expression
1113 # are determined by the service that evaluates it. See the service
1114 # documentation for additional information.
1115 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1116 # describes the expression, e.g. when hovered over it in a UI.
1117 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1118 # syntax.
1119 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1120 # reporting, e.g. a file name and a position in the file.
1121 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1122 # its purpose. This can be used e.g. in UIs which allow to enter the
1123 # expression.
1124 },
1125 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource.
1126 # `members` can have the following values:
1127 #
1128 # * `allUsers`: A special identifier that represents anyone who is
1129 # on the internet; with or without a Google account.
1130 #
1131 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1132 # who is authenticated with a Google account or a service account.
1133 # Does not include identities that come from external identity providers
1134 # (IdPs) through identity federation.
1135 #
1136 # * `user:{emailid}`: An email address that represents a specific Google
1137 # account. For example, `[email protected]` .
1138 #
1139 #
1140 # * `serviceAccount:{emailid}`: An email address that represents a Google
1141 # service account. For example,
1142 # `[email protected]`.
1143 #
1144 # * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
1145 # identifier for a
1146 # [Kubernetes service
1147 # account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
1148 # For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.
1149 #
1150 # * `group:{emailid}`: An email address that represents a Google group.
1151 # For example, `[email protected]`.
1152 #
1153 #
1154 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1155 # users of that domain. For example, `google.com` or `example.com`.
1156 #
1157 #
1158 #
1159 #
1160 # * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
1161 # A single identity in a workforce identity pool.
1162 #
1163 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
1164 # All workforce identities in a group.
1165 #
1166 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
1167 # All workforce identities with a specific attribute value.
1168 #
1169 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:
1170 # All identities in a workforce identity pool.
1171 #
1172 # * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:
1173 # A single identity in a workload identity pool.
1174 #
1175 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:
1176 # A workload identity pool group.
1177 #
1178 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
1179 # All identities in a workload identity pool with a certain attribute.
1180 #
1181 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:
1182 # All identities in a workload identity pool.
1183 #
1184 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1185 # identifier) representing a user that has been recently deleted. For
1186 # example, `[email protected]?uid=123456789012345678901`. If the user is
1187 # recovered, this value reverts to `user:{emailid}` and the recovered user
1188 # retains the role in the binding.
1189 #
1190 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1191 # unique identifier) representing a service account that has been recently
1192 # deleted. For example,
1193 # `[email protected]?uid=123456789012345678901`.
1194 # If the service account is undeleted, this value reverts to
1195 # `serviceAccount:{emailid}` and the undeleted service account retains the
1196 # role in the binding.
1197 #
1198 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1199 # identifier) representing a Google group that has been recently
1200 # deleted. For example, `[email protected]?uid=123456789012345678901`. If
1201 # the group is recovered, this value reverts to `group:{emailid}` and the
1202 # recovered group retains the role in the binding.
1203 #
1204 # * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
1205 # Deleted single identity in a workforce identity pool. For example,
1206 # `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
1207 &quot;A String&quot;,
1208 ],
1209 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals.
1210 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1211 #
1212 # For an overview of the IAM roles and permissions, see the
1213 # [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For
1214 # a list of the available pre-defined roles, see
1215 # [here](https://cloud.google.com/iam/docs/understanding-roles).
1216 },
1217 ],
1218 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1219 # prevent simultaneous updates of a policy from overwriting each other.
1220 # It is strongly suggested that systems make use of the `etag` in the
1221 # read-modify-write cycle to perform policy updates in order to avoid race
1222 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1223 # systems are expected to put that etag in the request to `setIamPolicy` to
1224 # ensure that their change will be applied to the same version of the policy.
1225 #
1226 # **Important:** If you use IAM Conditions, you must include the `etag` field
1227 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1228 # you to overwrite a version `3` policy with a version `1` policy, and all of
1229 # the conditions in the version `3` policy are lost.
1230 &quot;version&quot;: 42, # Specifies the format of the policy.
1231 #
1232 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1233 # are rejected.
1234 #
1235 # Any operation that affects conditional role bindings must specify version
1236 # `3`. This requirement applies to the following operations:
1237 #
1238 # * Getting a policy that includes a conditional role binding
1239 # * Adding a conditional role binding to a policy
1240 # * Changing a conditional role binding in a policy
1241 # * Removing any role binding, with or without a condition, from a policy
1242 # that includes conditions
1243 #
1244 # **Important:** If you use IAM Conditions, you must include the `etag` field
1245 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1246 # you to overwrite a version `3` policy with a version `1` policy, and all of
1247 # the conditions in the version `3` policy are lost.
1248 #
1249 # If a policy does not include any conditions, operations on that policy may
1250 # specify any valid version or leave the field unset.
1251 #
1252 # To learn which resources support conditions in their IAM policies, see the
1253 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1254 }</pre>
1255 </div>
1256
1257 <div class="method">
1258 <code class="details" id="insert">insert(project, region, body=None, requestId=None, x__xgafv=None)</code>
1259 <pre>Creates a new resource policy.
1260
1261 Args:
1262 project: string, Project ID for this request. (required)
1263 region: string, Name of the region for this request. (required)
1264 body: object, The request body.
1265 The object takes the form of:
1266
1267 { # Represents a Resource Policy resource. You can use resource policies to
1268 # schedule actions for some Compute Engine resources. For example, you can
1269 # use them toschedule persistent disk
1270 # snapshots.
1271 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1272 # text format.
1273 &quot;description&quot;: &quot;A String&quot;,
1274 &quot;diskConsistencyGroupPolicy&quot;: { # Resource policy for disk consistency groups. # Resource policy for disk consistency groups.
1275 },
1276 &quot;groupPlacementPolicy&quot;: { # A GroupPlacementPolicy specifies resource placement configuration. # Resource policy for instances for placement configuration.
1277 # It specifies the failure bucket separation
1278 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
1279 # specified, the default is AUTO_CONNECT.
1280 &quot;availabilityDomainCount&quot;: 42, # The number of availability domains to spread instances across. If two
1281 # instances are in different availability domain, they are not in the same
1282 # low latency network.
1283 &quot;collocation&quot;: &quot;A String&quot;, # Specifies network collocation
1284 &quot;gpuTopology&quot;: &quot;A String&quot;, # Specifies the shape of the GPU slice, in slice based GPU families eg.
1285 # A4X.
1286 &quot;vmCount&quot;: 42, # Number of VMs in this placement group. Google does not recommend that you
1287 # use this field unless you use a compact policy and you want your policy
1288 # to work only if it contains this exact number of VMs.
1289 },
1290 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1291 # defined by the server.
1292 &quot;instanceSchedulePolicy&quot;: { # An InstanceSchedulePolicy specifies when and how frequent certain # Resource policy for scheduling instance operations.
1293 # operations are performed on the instance.
1294 &quot;expirationTime&quot;: &quot;A String&quot;, # The expiration time of the schedule. The timestamp is an RFC3339 string.
1295 &quot;startTime&quot;: &quot;A String&quot;, # The start time of the schedule. The timestamp is an RFC3339 string.
1296 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting Schedule.schedule.
1297 # The value of this field must be a time zone name from the tz database:
1298 # https://wikipedia.org/wiki/Tz_database.
1299 &quot;vmStartSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for starting instances.
1300 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
1301 },
1302 &quot;vmStopSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for stopping instances.
1303 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
1304 },
1305 },
1306 &quot;kind&quot;: &quot;compute#resourcePolicy&quot;, # Output only. [Output Only] Type of the resource. Alwayscompute#resource_policies for resource policies.
1307 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating
1308 # the resource. The resource name must be 1-63 characters long, and comply
1309 # withRFC1035.
1310 # Specifically, the name must be 1-63 characters long and match the regular
1311 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
1312 # character must be a lowercase letter, and all following characters must be
1313 # a dash, lowercase letter, or digit, except the last character, which cannot
1314 # be a dash.
1315 &quot;region&quot;: &quot;A String&quot;,
1316 &quot;resourceStatus&quot;: { # Contains output only fields. # Output only. [Output Only] The system status of the resource policy.
1317 # Use this sub-message for all output fields set on ResourcePolicy.
1318 # The internal structure of this &quot;status&quot; field should mimic the structure
1319 # of ResourcePolicy proto specification.
1320 &quot;instanceSchedulePolicy&quot;: { # Output only. [Output Only] Specifies a set of output values reffering to
1321 # the instance_schedule_policy system status.
1322 # This field should have the same name as corresponding policy field.
1323 &quot;lastRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The last time the schedule successfully ran.
1324 # The timestamp is an RFC3339 string.
1325 &quot;nextRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The next time the schedule is planned to run.
1326 # The actual time might be slightly different.
1327 # The timestamp is an RFC3339 string.
1328 },
1329 },
1330 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined fully-qualified URL for this resource.
1331 &quot;snapshotSchedulePolicy&quot;: { # A snapshot schedule policy specifies when and how frequently snapshots are # Resource policy for persistent disks for creating snapshots.
1332 # to be created for the target disk. Also specifies how many and how long
1333 # these scheduled snapshots should be retained.
1334 &quot;retentionPolicy&quot;: { # Policy for retention of scheduled snapshots. # Retention policy applied to snapshots created by this resource policy.
1335 &quot;maxRetentionDays&quot;: 42, # Maximum age of the snapshot that is allowed to be kept.
1336 &quot;onSourceDiskDelete&quot;: &quot;A String&quot;, # Specifies the behavior to apply to scheduled snapshots when
1337 # the source disk is deleted.
1338 },
1339 &quot;schedule&quot;: { # A schedule for disks where the schedueled operations are performed. # A Vm Maintenance Policy specifies what kind of infrastructure
1340 # maintenance we are allowed to perform on this VM and when. Schedule
1341 # that is applied to disks covered by this policy.
1342 &quot;dailySchedule&quot;: { # Time window specified for daily operations.
1343 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in days. The value determines
1344 # how many days pass between the start of each cycle.
1345 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] A predetermined duration for the window, automatically
1346 # chosen to be the smallest possible in the given scenario.
1347 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one
1348 # of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For
1349 # example, both 13:00-5 and 08:00 are valid.
1350 },
1351 &quot;hourlySchedule&quot;: { # Time window specified for hourly operations.
1352 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
1353 # smallest possible in the given scenario.
1354 &quot;hoursInCycle&quot;: 42, # Defines a schedule with units measured in hours. The value determines
1355 # how many hours pass between the start of each cycle.
1356 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
1357 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
1358 },
1359 &quot;weeklySchedule&quot;: { # Time window specified for weekly operations.
1360 &quot;dayOfWeeks&quot;: [ # Up to 7 intervals/windows, one for each day of the week.
1361 {
1362 &quot;day&quot;: &quot;A String&quot;, # Defines a schedule that runs on specific days of the week. Specify
1363 # one or more days. The following options are available:
1364 # MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
1365 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
1366 # smallest possible in the given scenario.
1367 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
1368 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
1369 },
1370 ],
1371 },
1372 },
1373 &quot;snapshotProperties&quot;: { # Specified snapshot properties for scheduled snapshots created by this # Properties with which snapshots are created such as labels, encryption
1374 # keys.
1375 # policy.
1376 &quot;chainName&quot;: &quot;A String&quot;, # Chain name that the snapshot is created in.
1377 &quot;guestFlush&quot;: True or False, # Indication to perform a &#x27;guest aware&#x27; snapshot.
1378 &quot;labels&quot;: { # Labels to apply to scheduled snapshots. These can be later modified
1379 # by the setLabels method. Label values may be empty.
1380 &quot;a_key&quot;: &quot;A String&quot;,
1381 },
1382 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the auto snapshot (regional or
1383 # multi-regional).
1384 &quot;A String&quot;,
1385 ],
1386 },
1387 },
1388 &quot;status&quot;: &quot;A String&quot;, # Output only. [Output Only] The status of resource policy creation.
1389 &quot;workloadPolicy&quot;: { # Represents the workload policy. # Resource policy for defining instance placement for MIGs.
1390 &quot;acceleratorTopology&quot;: &quot;A String&quot;, # Specifies the topology required to create a partition for VMs that have
1391 # interconnected GPUs.
1392 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
1393 # specified, the default is AUTO_CONNECT.
1394 &quot;maxTopologyDistance&quot;: &quot;A String&quot;, # Specifies the maximum distance between instances.
1395 &quot;type&quot;: &quot;A String&quot;, # Specifies the intent of the instance placement in the MIG.
1396 },
1397 }
1398
1399 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1400 that if you must retry your request, the server will know to ignore the
1401 request if it has already been completed.
1402
1403 For example, consider a situation where you make an initial request and
1404 the request times out. If you make the request again with the same
1405 request ID, the server can check if original operation with the same
1406 request ID was received, and if so, will ignore the second request. This
1407 prevents clients from accidentally creating duplicate commitments.
1408
1409 The request ID must be
1410 a valid UUID with the exception that zero UUID is not supported
1411 (00000000-0000-0000-0000-000000000000).
1412 x__xgafv: string, V1 error format.
1413 Allowed values
1414 1 - v1 error format
1415 2 - v2 error format
1416
1417 Returns:
1418 An object of the form:
1419
1420 { # Represents an Operation resource.
1421 #
1422 # Google Compute Engine has three Operation resources:
1423 #
1424 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
1425 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
1426 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
1427 #
1428 # You can use an operation resource to manage asynchronous API requests.
1429 # For more information, readHandling
1430 # API responses.
1431 #
1432 # Operations can be global, regional or zonal.
1433 #
1434 # - For global operations, use the `globalOperations`
1435 # resource.
1436 # - For regional operations, use the
1437 # `regionOperations` resource.
1438 # - For zonal operations, use
1439 # the `zoneOperations` resource.
1440 #
1441 #
1442 #
1443 # For more information, read
1444 # Global, Regional, and Zonal Resources.
1445 #
1446 # Note that completed Operation resources have a limited
1447 # retention period.
1448 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1449 # Not present otherwise.
1450 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1451 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1452 # set when the operation is created.
1453 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1454 # text format.
1455 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1456 # this field will be populated.
1457 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1458 # operation.
1459 {
1460 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1461 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1462 # details. There is a set of defined message types to use for providing
1463 # details.The syntax depends on the error code. For example,
1464 # QuotaExceededInfo will have details when the error code is
1465 # QUOTA_EXCEEDED.
1466 {
1467 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1468 #
1469 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1470 # is not enabled:
1471 #
1472 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1473 # &quot;domain&quot;: &quot;googleapis.com&quot;
1474 # &quot;metadata&quot;: {
1475 # &quot;resource&quot;: &quot;projects/123&quot;,
1476 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1477 # }
1478 # }
1479 #
1480 # This response indicates that the pubsub.googleapis.com API is not enabled.
1481 #
1482 # Example of an error that is returned when attempting to create a Spanner
1483 # instance in a region that is out of stock:
1484 #
1485 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1486 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1487 # &quot;metadata&quot;: {
1488 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1489 # }
1490 # }
1491 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1492 # is typically the registered service name of the tool or product that
1493 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1494 # generated by some common infrastructure, the error domain must be a
1495 # globally unique value that identifies the infrastructure. For Google API
1496 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1497 &quot;metadatas&quot;: { # Additional structured details about this error.
1498 #
1499 # Keys must match a regular expression of `a-z+` but should
1500 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1501 # length. When identifying the current value of an exceeded limit, the units
1502 # should be contained in the key, not the value. For example, rather than
1503 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1504 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1505 # instances that can be created in a single (batch) request.
1506 &quot;a_key&quot;: &quot;A String&quot;,
1507 },
1508 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1509 # proximate cause of the error. Error reasons are unique within a particular
1510 # domain of errors. This should be at most 63 characters and match a
1511 # regular expression of `A-Z+[A-Z0-9]`, which represents
1512 # UPPER_SNAKE_CASE.
1513 },
1514 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1515 #
1516 # For example, if a quota check failed with an error indicating the calling
1517 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1518 # directly to the right place in the developer console to flip the bit.
1519 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1520 { # Describes a URL link.
1521 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1522 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1523 },
1524 ],
1525 },
1526 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1527 # which can be attached to an RPC error.
1528 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1529 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1530 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1531 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1532 },
1533 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1534 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1535 &quot;a_key&quot;: &quot;A String&quot;,
1536 },
1537 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1538 # type or metric.
1539 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1540 # or metric.
1541 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1542 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1543 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1544 },
1545 },
1546 ],
1547 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1548 # This property is optional.
1549 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1550 },
1551 ],
1552 },
1553 &quot;getVersionOperationMetadata&quot;: {
1554 &quot;inlineSbomInfo&quot;: {
1555 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1556 # appropriate identifiers.
1557 &quot;a_key&quot;: &quot;A String&quot;,
1558 },
1559 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1560 # identifiers.
1561 &quot;a_key&quot;: &quot;A String&quot;,
1562 },
1563 },
1564 },
1565 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1566 # message that was returned, such as `NOT FOUND`.
1567 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1568 # status code that was returned. For example, a `404` means the
1569 # resource was not found.
1570 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1571 # defined by the server.
1572 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1573 # This value is inRFC3339
1574 # text format.
1575 &quot;instancesBulkInsertOperationMetadata&quot;: {
1576 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1577 # Example key: zones/us-central1-a
1578 &quot;a_key&quot;: {
1579 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1580 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1581 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1582 # error.
1583 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1584 # if the flow is rolling forward or rolling back.
1585 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1586 },
1587 },
1588 },
1589 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1590 # Operation resources.
1591 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1592 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1593 # group of operations results from a `bulkInsert` API request.
1594 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1595 # `update`, or `delete`, and so on.
1596 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1597 # There is no requirement that this be linear or support any granularity of
1598 # operations. This should not be used to guess when the operation will be
1599 # complete. This number should monotonically increase as the operation
1600 # progresses.
1601 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1602 # applicable when performing regional operations.
1603 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1604 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1605 # this field will contain information on all underlying zonal actions and
1606 # their state.
1607 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1608 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1609 # Example key: zones/us-central1-a
1610 &quot;a_key&quot;: {
1611 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
1612 # populated.
1613 # different programming environments, including REST APIs and RPC APIs. It is
1614 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1615 # three pieces of data: error code, error message, and error details.
1616 #
1617 # You can find out more about this error model and how to work with it in the
1618 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1619 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1620 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1621 # message types for APIs to use.
1622 {
1623 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1624 },
1625 ],
1626 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1627 # user-facing error message should be localized and sent in the
1628 # google.rpc.Status.details field, or localized by the client.
1629 },
1630 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1631 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1632 },
1633 },
1634 },
1635 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1636 # This value is inRFC3339
1637 # text format.
1638 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1639 # following:
1640 # `PENDING`, `RUNNING`, or `DONE`.
1641 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1642 # operation.
1643 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1644 # of the target resource.
1645 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1646 # operations related to creating a snapshot, this points to the disk
1647 # that the snapshot was created from.
1648 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1649 # `[email protected]` or
1650 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1651 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1652 # operation, this field will be populated.
1653 {
1654 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1655 # Engine returns NO_RESULTS_ON_PAGE if there
1656 # are no results in the response.
1657 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1658 # value format. For example:
1659 #
1660 # &quot;data&quot;: [
1661 # {
1662 # &quot;key&quot;: &quot;scope&quot;,
1663 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1664 # }
1665 {
1666 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1667 # returned. For example, for warnings where there are no results in a list
1668 # request for a particular zone, this key might be scope and
1669 # the key value might be the zone name. Other examples might be a key
1670 # indicating a deprecated resource and a suggested replacement, or a
1671 # warning about invalid network settings (for example, if an instance
1672 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1673 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1674 },
1675 ],
1676 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1677 },
1678 ],
1679 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
1680 # applicable when performing per-zone operations.
1681 }</pre>
1682 </div>
1683
1684 <div class="method">
1685 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code>
1686 <pre>A list all the resource policies that have been configured for the
1687 specified project in specified region.
1688
1689 Args:
1690 project: string, Project ID for this request. (required)
1691 region: string, Name of the region for this request. (required)
1692 filter: string, A filter expression that filters resources listed in the response. Most
1693 Compute resources support two types of filter expressions:
1694 expressions that support regular expressions and expressions that follow
1695 API improvement proposal AIP-160.
1696 These two types of filter expressions cannot be mixed in one request.
1697
1698 If you want to use AIP-160, your expression must specify the field name, an
1699 operator, and the value that you want to use for filtering. The value
1700 must be a string, a number, or a boolean. The operator
1701 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
1702
1703 For example, if you are filtering Compute Engine instances, you can
1704 exclude instances named `example-instance` by specifying
1705 `name != example-instance`.
1706
1707 The `:*` comparison can be used to test whether a key has been defined.
1708 For example, to find all objects with `owner` label use:
1709 ```
1710 labels.owner:*
1711 ```
1712
1713 You can also filter nested fields. For example, you could specify
1714 `scheduling.automaticRestart = false` to include instances only
1715 if they are not scheduled for automatic restarts. You can use filtering
1716 on nested fields to filter based onresource labels.
1717
1718 To filter on multiple expressions, provide each separate expression within
1719 parentheses. For example:
1720 ```
1721 (scheduling.automaticRestart = true)
1722 (cpuPlatform = &quot;Intel Skylake&quot;)
1723 ```
1724 By default, each expression is an `AND` expression. However, you
1725 can include `AND` and `OR` expressions explicitly.
1726 For example:
1727 ```
1728 (cpuPlatform = &quot;Intel Skylake&quot;) OR
1729 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
1730 (scheduling.automaticRestart = true)
1731 ```
1732
1733 If you want to use a regular expression, use the `eq` (equal) or `ne`
1734 (not equal) operator against a single un-parenthesized expression with or
1735 without quotes or against multiple parenthesized expressions. Examples:
1736
1737 `fieldname eq unquoted literal`
1738 `fieldname eq &#x27;single quoted literal&#x27;`
1739 `fieldname eq &quot;double quoted literal&quot;`
1740 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
1741
1742 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
1743 The literal value must match the entire field.
1744
1745 For example, to filter for instances that do not end with name &quot;instance&quot;,
1746 you would use `name ne .*instance`.
1747
1748 You cannot combine constraints on multiple fields using regular
1749 expressions.
1750 maxResults: integer, The maximum number of results per page that should be returned.
1751 If the number of available results is larger than `maxResults`,
1752 Compute Engine returns a `nextPageToken` that can be used to get
1753 the next page of results in subsequent list requests. Acceptable values are
1754 `0` to `500`, inclusive. (Default: `500`)
1755 orderBy: string, Sorts list results by a certain order. By default, results
1756 are returned in alphanumerical order based on the resource name.
1757
1758 You can also sort results in descending order based on the creation
1759 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
1760 results based on the `creationTimestamp` field in
1761 reverse chronological order (newest result first). Use this to sort
1762 resources like operations so that the newest operation is returned first.
1763
1764 Currently, only sorting by `name` or
1765 `creationTimestamp desc` is supported.
1766 pageToken: string, Specifies a page token to use. Set `pageToken` to the
1767 `nextPageToken` returned by a previous list request to get
1768 the next page of results.
1769 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
1770 of failure. The default value is false.
1771
1772 For example, when partial success behavior is enabled, aggregatedList for a
1773 single zone scope either returns all resources in the zone or no resources,
1774 with an error code.
1775 x__xgafv: string, V1 error format.
1776 Allowed values
1777 1 - v1 error format
1778 2 - v2 error format
1779
1780 Returns:
1781 An object of the form:
1782
1783 {
1784 &quot;etag&quot;: &quot;A String&quot;,
1785 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is
1786 # defined by the server.
1787 &quot;items&quot;: [ # [Output Only] A list of ResourcePolicy resources.
1788 { # Represents a Resource Policy resource. You can use resource policies to
1789 # schedule actions for some Compute Engine resources. For example, you can
1790 # use them toschedule persistent disk
1791 # snapshots.
1792 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1793 # text format.
1794 &quot;description&quot;: &quot;A String&quot;,
1795 &quot;diskConsistencyGroupPolicy&quot;: { # Resource policy for disk consistency groups. # Resource policy for disk consistency groups.
1796 },
1797 &quot;groupPlacementPolicy&quot;: { # A GroupPlacementPolicy specifies resource placement configuration. # Resource policy for instances for placement configuration.
1798 # It specifies the failure bucket separation
1799 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
1800 # specified, the default is AUTO_CONNECT.
1801 &quot;availabilityDomainCount&quot;: 42, # The number of availability domains to spread instances across. If two
1802 # instances are in different availability domain, they are not in the same
1803 # low latency network.
1804 &quot;collocation&quot;: &quot;A String&quot;, # Specifies network collocation
1805 &quot;gpuTopology&quot;: &quot;A String&quot;, # Specifies the shape of the GPU slice, in slice based GPU families eg.
1806 # A4X.
1807 &quot;vmCount&quot;: 42, # Number of VMs in this placement group. Google does not recommend that you
1808 # use this field unless you use a compact policy and you want your policy
1809 # to work only if it contains this exact number of VMs.
1810 },
1811 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1812 # defined by the server.
1813 &quot;instanceSchedulePolicy&quot;: { # An InstanceSchedulePolicy specifies when and how frequent certain # Resource policy for scheduling instance operations.
1814 # operations are performed on the instance.
1815 &quot;expirationTime&quot;: &quot;A String&quot;, # The expiration time of the schedule. The timestamp is an RFC3339 string.
1816 &quot;startTime&quot;: &quot;A String&quot;, # The start time of the schedule. The timestamp is an RFC3339 string.
1817 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting Schedule.schedule.
1818 # The value of this field must be a time zone name from the tz database:
1819 # https://wikipedia.org/wiki/Tz_database.
1820 &quot;vmStartSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for starting instances.
1821 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
1822 },
1823 &quot;vmStopSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for stopping instances.
1824 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
1825 },
1826 },
1827 &quot;kind&quot;: &quot;compute#resourcePolicy&quot;, # Output only. [Output Only] Type of the resource. Alwayscompute#resource_policies for resource policies.
1828 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating
1829 # the resource. The resource name must be 1-63 characters long, and comply
1830 # withRFC1035.
1831 # Specifically, the name must be 1-63 characters long and match the regular
1832 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
1833 # character must be a lowercase letter, and all following characters must be
1834 # a dash, lowercase letter, or digit, except the last character, which cannot
1835 # be a dash.
1836 &quot;region&quot;: &quot;A String&quot;,
1837 &quot;resourceStatus&quot;: { # Contains output only fields. # Output only. [Output Only] The system status of the resource policy.
1838 # Use this sub-message for all output fields set on ResourcePolicy.
1839 # The internal structure of this &quot;status&quot; field should mimic the structure
1840 # of ResourcePolicy proto specification.
1841 &quot;instanceSchedulePolicy&quot;: { # Output only. [Output Only] Specifies a set of output values reffering to
1842 # the instance_schedule_policy system status.
1843 # This field should have the same name as corresponding policy field.
1844 &quot;lastRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The last time the schedule successfully ran.
1845 # The timestamp is an RFC3339 string.
1846 &quot;nextRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The next time the schedule is planned to run.
1847 # The actual time might be slightly different.
1848 # The timestamp is an RFC3339 string.
1849 },
1850 },
1851 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined fully-qualified URL for this resource.
1852 &quot;snapshotSchedulePolicy&quot;: { # A snapshot schedule policy specifies when and how frequently snapshots are # Resource policy for persistent disks for creating snapshots.
1853 # to be created for the target disk. Also specifies how many and how long
1854 # these scheduled snapshots should be retained.
1855 &quot;retentionPolicy&quot;: { # Policy for retention of scheduled snapshots. # Retention policy applied to snapshots created by this resource policy.
1856 &quot;maxRetentionDays&quot;: 42, # Maximum age of the snapshot that is allowed to be kept.
1857 &quot;onSourceDiskDelete&quot;: &quot;A String&quot;, # Specifies the behavior to apply to scheduled snapshots when
1858 # the source disk is deleted.
1859 },
1860 &quot;schedule&quot;: { # A schedule for disks where the schedueled operations are performed. # A Vm Maintenance Policy specifies what kind of infrastructure
1861 # maintenance we are allowed to perform on this VM and when. Schedule
1862 # that is applied to disks covered by this policy.
1863 &quot;dailySchedule&quot;: { # Time window specified for daily operations.
1864 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in days. The value determines
1865 # how many days pass between the start of each cycle.
1866 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] A predetermined duration for the window, automatically
1867 # chosen to be the smallest possible in the given scenario.
1868 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one
1869 # of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For
1870 # example, both 13:00-5 and 08:00 are valid.
1871 },
1872 &quot;hourlySchedule&quot;: { # Time window specified for hourly operations.
1873 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
1874 # smallest possible in the given scenario.
1875 &quot;hoursInCycle&quot;: 42, # Defines a schedule with units measured in hours. The value determines
1876 # how many hours pass between the start of each cycle.
1877 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
1878 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
1879 },
1880 &quot;weeklySchedule&quot;: { # Time window specified for weekly operations.
1881 &quot;dayOfWeeks&quot;: [ # Up to 7 intervals/windows, one for each day of the week.
1882 {
1883 &quot;day&quot;: &quot;A String&quot;, # Defines a schedule that runs on specific days of the week. Specify
1884 # one or more days. The following options are available:
1885 # MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
1886 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
1887 # smallest possible in the given scenario.
1888 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
1889 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
1890 },
1891 ],
1892 },
1893 },
1894 &quot;snapshotProperties&quot;: { # Specified snapshot properties for scheduled snapshots created by this # Properties with which snapshots are created such as labels, encryption
1895 # keys.
1896 # policy.
1897 &quot;chainName&quot;: &quot;A String&quot;, # Chain name that the snapshot is created in.
1898 &quot;guestFlush&quot;: True or False, # Indication to perform a &#x27;guest aware&#x27; snapshot.
1899 &quot;labels&quot;: { # Labels to apply to scheduled snapshots. These can be later modified
1900 # by the setLabels method. Label values may be empty.
1901 &quot;a_key&quot;: &quot;A String&quot;,
1902 },
1903 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the auto snapshot (regional or
1904 # multi-regional).
1905 &quot;A String&quot;,
1906 ],
1907 },
1908 },
1909 &quot;status&quot;: &quot;A String&quot;, # Output only. [Output Only] The status of resource policy creation.
1910 &quot;workloadPolicy&quot;: { # Represents the workload policy. # Resource policy for defining instance placement for MIGs.
1911 &quot;acceleratorTopology&quot;: &quot;A String&quot;, # Specifies the topology required to create a partition for VMs that have
1912 # interconnected GPUs.
1913 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
1914 # specified, the default is AUTO_CONNECT.
1915 &quot;maxTopologyDistance&quot;: &quot;A String&quot;, # Specifies the maximum distance between instances.
1916 &quot;type&quot;: &quot;A String&quot;, # Specifies the intent of the instance placement in the MIG.
1917 },
1918 },
1919 ],
1920 &quot;kind&quot;: &quot;compute#resourcePolicyList&quot;, # Output only. [Output Only] Type of resource.Alwayscompute#resourcePoliciesList for listsof resourcePolicies
1921 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
1922 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
1923 # the query parameter pageToken in the next list request.
1924 # Subsequent list requests will have their own nextPageToken to
1925 # continue paging through the results.
1926 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource.
1927 &quot;warning&quot;: { # [Output Only] Informational warning message.
1928 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1929 # Engine returns NO_RESULTS_ON_PAGE if there
1930 # are no results in the response.
1931 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1932 # value format. For example:
1933 #
1934 # &quot;data&quot;: [
1935 # {
1936 # &quot;key&quot;: &quot;scope&quot;,
1937 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1938 # }
1939 {
1940 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1941 # returned. For example, for warnings where there are no results in a list
1942 # request for a particular zone, this key might be scope and
1943 # the key value might be the zone name. Other examples might be a key
1944 # indicating a deprecated resource and a suggested replacement, or a
1945 # warning about invalid network settings (for example, if an instance
1946 # attempts to perform IP forwarding but is not enabled for IP forwarding).
1947 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1948 },
1949 ],
1950 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1951 },
1952 }</pre>
1953 </div>
1954
1955 <div class="method">
1956 <code class="details" id="list_next">list_next()</code>
1957 <pre>Retrieves the next page of results.
1958
1959 Args:
1960 previous_request: The request for the previous page. (required)
1961 previous_response: The response from the request for the previous page. (required)
1962
1963 Returns:
1964 A request object that you can call &#x27;execute()&#x27; on to request the next
1965 page. Returns None if there are no more items in the collection.
1966 </pre>
1967 </div>
1968
1969 <div class="method">
1970 <code class="details" id="patch">patch(project, region, resourcePolicy, body=None, requestId=None, updateMask=None, x__xgafv=None)</code>
1971 <pre>Modify the specified resource policy.
1972
1973 Args:
1974 project: string, Project ID for this request. (required)
1975 region: string, Name of the region for this request. (required)
1976 resourcePolicy: string, Id of the resource policy to patch. (required)
1977 body: object, The request body.
1978 The object takes the form of:
1979
1980 { # Represents a Resource Policy resource. You can use resource policies to
1981 # schedule actions for some Compute Engine resources. For example, you can
1982 # use them toschedule persistent disk
1983 # snapshots.
1984 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1985 # text format.
1986 &quot;description&quot;: &quot;A String&quot;,
1987 &quot;diskConsistencyGroupPolicy&quot;: { # Resource policy for disk consistency groups. # Resource policy for disk consistency groups.
1988 },
1989 &quot;groupPlacementPolicy&quot;: { # A GroupPlacementPolicy specifies resource placement configuration. # Resource policy for instances for placement configuration.
1990 # It specifies the failure bucket separation
1991 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
1992 # specified, the default is AUTO_CONNECT.
1993 &quot;availabilityDomainCount&quot;: 42, # The number of availability domains to spread instances across. If two
1994 # instances are in different availability domain, they are not in the same
1995 # low latency network.
1996 &quot;collocation&quot;: &quot;A String&quot;, # Specifies network collocation
1997 &quot;gpuTopology&quot;: &quot;A String&quot;, # Specifies the shape of the GPU slice, in slice based GPU families eg.
1998 # A4X.
1999 &quot;vmCount&quot;: 42, # Number of VMs in this placement group. Google does not recommend that you
2000 # use this field unless you use a compact policy and you want your policy
2001 # to work only if it contains this exact number of VMs.
2002 },
2003 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
2004 # defined by the server.
2005 &quot;instanceSchedulePolicy&quot;: { # An InstanceSchedulePolicy specifies when and how frequent certain # Resource policy for scheduling instance operations.
2006 # operations are performed on the instance.
2007 &quot;expirationTime&quot;: &quot;A String&quot;, # The expiration time of the schedule. The timestamp is an RFC3339 string.
2008 &quot;startTime&quot;: &quot;A String&quot;, # The start time of the schedule. The timestamp is an RFC3339 string.
2009 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting Schedule.schedule.
2010 # The value of this field must be a time zone name from the tz database:
2011 # https://wikipedia.org/wiki/Tz_database.
2012 &quot;vmStartSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for starting instances.
2013 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
2014 },
2015 &quot;vmStopSchedule&quot;: { # Schedule for an instance operation. # Specifies the schedule for stopping instances.
2016 &quot;schedule&quot;: &quot;A String&quot;, # Specifies the frequency for the operation, using the unix-cron format.
2017 },
2018 },
2019 &quot;kind&quot;: &quot;compute#resourcePolicy&quot;, # Output only. [Output Only] Type of the resource. Alwayscompute#resource_policies for resource policies.
2020 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating
2021 # the resource. The resource name must be 1-63 characters long, and comply
2022 # withRFC1035.
2023 # Specifically, the name must be 1-63 characters long and match the regular
2024 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
2025 # character must be a lowercase letter, and all following characters must be
2026 # a dash, lowercase letter, or digit, except the last character, which cannot
2027 # be a dash.
2028 &quot;region&quot;: &quot;A String&quot;,
2029 &quot;resourceStatus&quot;: { # Contains output only fields. # Output only. [Output Only] The system status of the resource policy.
2030 # Use this sub-message for all output fields set on ResourcePolicy.
2031 # The internal structure of this &quot;status&quot; field should mimic the structure
2032 # of ResourcePolicy proto specification.
2033 &quot;instanceSchedulePolicy&quot;: { # Output only. [Output Only] Specifies a set of output values reffering to
2034 # the instance_schedule_policy system status.
2035 # This field should have the same name as corresponding policy field.
2036 &quot;lastRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The last time the schedule successfully ran.
2037 # The timestamp is an RFC3339 string.
2038 &quot;nextRunStartTime&quot;: &quot;A String&quot;, # Output only. [Output Only] The next time the schedule is planned to run.
2039 # The actual time might be slightly different.
2040 # The timestamp is an RFC3339 string.
2041 },
2042 },
2043 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined fully-qualified URL for this resource.
2044 &quot;snapshotSchedulePolicy&quot;: { # A snapshot schedule policy specifies when and how frequently snapshots are # Resource policy for persistent disks for creating snapshots.
2045 # to be created for the target disk. Also specifies how many and how long
2046 # these scheduled snapshots should be retained.
2047 &quot;retentionPolicy&quot;: { # Policy for retention of scheduled snapshots. # Retention policy applied to snapshots created by this resource policy.
2048 &quot;maxRetentionDays&quot;: 42, # Maximum age of the snapshot that is allowed to be kept.
2049 &quot;onSourceDiskDelete&quot;: &quot;A String&quot;, # Specifies the behavior to apply to scheduled snapshots when
2050 # the source disk is deleted.
2051 },
2052 &quot;schedule&quot;: { # A schedule for disks where the schedueled operations are performed. # A Vm Maintenance Policy specifies what kind of infrastructure
2053 # maintenance we are allowed to perform on this VM and when. Schedule
2054 # that is applied to disks covered by this policy.
2055 &quot;dailySchedule&quot;: { # Time window specified for daily operations.
2056 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in days. The value determines
2057 # how many days pass between the start of each cycle.
2058 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] A predetermined duration for the window, automatically
2059 # chosen to be the smallest possible in the given scenario.
2060 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one
2061 # of 00:00, 04:00, 08:00,12:00, 16:00, or 20:00. For
2062 # example, both 13:00-5 and 08:00 are valid.
2063 },
2064 &quot;hourlySchedule&quot;: { # Time window specified for hourly operations.
2065 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
2066 # smallest possible in the given scenario.
2067 &quot;hoursInCycle&quot;: 42, # Defines a schedule with units measured in hours. The value determines
2068 # how many hours pass between the start of each cycle.
2069 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
2070 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
2071 },
2072 &quot;weeklySchedule&quot;: { # Time window specified for weekly operations.
2073 &quot;dayOfWeeks&quot;: [ # Up to 7 intervals/windows, one for each day of the week.
2074 {
2075 &quot;day&quot;: &quot;A String&quot;, # Defines a schedule that runs on specific days of the week. Specify
2076 # one or more days. The following options are available:
2077 # MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
2078 &quot;duration&quot;: &quot;A String&quot;, # Output only. [Output only] Duration of the time window, automatically chosen to be
2079 # smallest possible in the given scenario.
2080 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations.
2081 # It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
2082 },
2083 ],
2084 },
2085 },
2086 &quot;snapshotProperties&quot;: { # Specified snapshot properties for scheduled snapshots created by this # Properties with which snapshots are created such as labels, encryption
2087 # keys.
2088 # policy.
2089 &quot;chainName&quot;: &quot;A String&quot;, # Chain name that the snapshot is created in.
2090 &quot;guestFlush&quot;: True or False, # Indication to perform a &#x27;guest aware&#x27; snapshot.
2091 &quot;labels&quot;: { # Labels to apply to scheduled snapshots. These can be later modified
2092 # by the setLabels method. Label values may be empty.
2093 &quot;a_key&quot;: &quot;A String&quot;,
2094 },
2095 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the auto snapshot (regional or
2096 # multi-regional).
2097 &quot;A String&quot;,
2098 ],
2099 },
2100 },
2101 &quot;status&quot;: &quot;A String&quot;, # Output only. [Output Only] The status of resource policy creation.
2102 &quot;workloadPolicy&quot;: { # Represents the workload policy. # Resource policy for defining instance placement for MIGs.
2103 &quot;acceleratorTopology&quot;: &quot;A String&quot;, # Specifies the topology required to create a partition for VMs that have
2104 # interconnected GPUs.
2105 &quot;acceleratorTopologyMode&quot;: &quot;A String&quot;, # Specifies the connection mode for the accelerator topology. If not
2106 # specified, the default is AUTO_CONNECT.
2107 &quot;maxTopologyDistance&quot;: &quot;A String&quot;, # Specifies the maximum distance between instances.
2108 &quot;type&quot;: &quot;A String&quot;, # Specifies the intent of the instance placement in the MIG.
2109 },
2110 }
2111
2112 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
2113 that if you must retry your request, the server will know to ignore the
2114 request if it has already been completed.
2115
2116 For example, consider a situation where you make an initial request and
2117 the request times out. If you make the request again with the same
2118 request ID, the server can check if original operation with the same
2119 request ID was received, and if so, will ignore the second request. This
2120 prevents clients from accidentally creating duplicate commitments.
2121
2122 The request ID must be
2123 a valid UUID with the exception that zero UUID is not supported
2124 (00000000-0000-0000-0000-000000000000).
2125 updateMask: string, update_mask indicates fields to be updated as part of this request.
2126 x__xgafv: string, V1 error format.
2127 Allowed values
2128 1 - v1 error format
2129 2 - v2 error format
2130
2131 Returns:
2132 An object of the form:
2133
2134 { # Represents an Operation resource.
2135 #
2136 # Google Compute Engine has three Operation resources:
2137 #
2138 # * [Global](/compute/docs/reference/rest/v1/globalOperations)
2139 # * [Regional](/compute/docs/reference/rest/v1/regionOperations)
2140 # * [Zonal](/compute/docs/reference/rest/v1/zoneOperations)
2141 #
2142 # You can use an operation resource to manage asynchronous API requests.
2143 # For more information, readHandling
2144 # API responses.
2145 #
2146 # Operations can be global, regional or zonal.
2147 #
2148 # - For global operations, use the `globalOperations`
2149 # resource.
2150 # - For regional operations, use the
2151 # `regionOperations` resource.
2152 # - For zonal operations, use
2153 # the `zoneOperations` resource.
2154 #
2155 #
2156 #
2157 # For more information, read
2158 # Global, Regional, and Zonal Resources.
2159 #
2160 # Note that completed Operation resources have a limited
2161 # retention period.
2162 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
2163 # Not present otherwise.
2164 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2165 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
2166 # set when the operation is created.
2167 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
2168 # text format.
2169 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
2170 # this field will be populated.
2171 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
2172 # operation.
2173 {
2174 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2175 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
2176 # details. There is a set of defined message types to use for providing
2177 # details.The syntax depends on the error code. For example,
2178 # QuotaExceededInfo will have details when the error code is
2179 # QUOTA_EXCEEDED.
2180 {
2181 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
2182 #
2183 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
2184 # is not enabled:
2185 #
2186 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
2187 # &quot;domain&quot;: &quot;googleapis.com&quot;
2188 # &quot;metadata&quot;: {
2189 # &quot;resource&quot;: &quot;projects/123&quot;,
2190 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
2191 # }
2192 # }
2193 #
2194 # This response indicates that the pubsub.googleapis.com API is not enabled.
2195 #
2196 # Example of an error that is returned when attempting to create a Spanner
2197 # instance in a region that is out of stock:
2198 #
2199 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
2200 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
2201 # &quot;metadata&quot;: {
2202 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
2203 # }
2204 # }
2205 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
2206 # is typically the registered service name of the tool or product that
2207 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
2208 # generated by some common infrastructure, the error domain must be a
2209 # globally unique value that identifies the infrastructure. For Google API
2210 # infrastructure, the error domain is &quot;googleapis.com&quot;.
2211 &quot;metadatas&quot;: { # Additional structured details about this error.
2212 #
2213 # Keys must match a regular expression of `a-z+` but should
2214 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
2215 # length. When identifying the current value of an exceeded limit, the units
2216 # should be contained in the key, not the value. For example, rather than
2217 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
2218 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
2219 # instances that can be created in a single (batch) request.
2220 &quot;a_key&quot;: &quot;A String&quot;,
2221 },
2222 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
2223 # proximate cause of the error. Error reasons are unique within a particular
2224 # domain of errors. This should be at most 63 characters and match a
2225 # regular expression of `A-Z+[A-Z0-9]`, which represents
2226 # UPPER_SNAKE_CASE.
2227 },
2228 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
2229 #
2230 # For example, if a quota check failed with an error indicating the calling
2231 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
2232 # directly to the right place in the developer console to flip the bit.
2233 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
2234 { # Describes a URL link.
2235 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
2236 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
2237 },
2238 ],
2239 },
2240 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
2241 # which can be attached to an RPC error.
2242 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
2243 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
2244 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
2245 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
2246 },
2247 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
2248 &quot;dimensions&quot;: { # The map holding related quota dimensions.
2249 &quot;a_key&quot;: &quot;A String&quot;,
2250 },
2251 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
2252 # type or metric.
2253 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
2254 # or metric.
2255 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
2256 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
2257 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
2258 },
2259 },
2260 ],
2261 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
2262 # This property is optional.
2263 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
2264 },
2265 ],
2266 },
2267 &quot;getVersionOperationMetadata&quot;: {
2268 &quot;inlineSbomInfo&quot;: {
2269 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
2270 # appropriate identifiers.
2271 &quot;a_key&quot;: &quot;A String&quot;,
2272 },
2273 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
2274 # identifiers.
2275 &quot;a_key&quot;: &quot;A String&quot;,
2276 },
2277 },
2278 },
2279 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
2280 # message that was returned, such as `NOT FOUND`.
2281 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
2282 # status code that was returned. For example, a `404` means the
2283 # resource was not found.
2284 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
2285 # defined by the server.
2286 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
2287 # This value is inRFC3339
2288 # text format.
2289 &quot;instancesBulkInsertOperationMetadata&quot;: {
2290 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
2291 # Example key: zones/us-central1-a
2292 &quot;a_key&quot;: {
2293 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
2294 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
2295 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
2296 # error.
2297 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
2298 # if the flow is rolling forward or rolling back.
2299 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
2300 },
2301 },
2302 },
2303 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
2304 # Operation resources.
2305 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2306 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
2307 # group of operations results from a `bulkInsert` API request.
2308 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
2309 # `update`, or `delete`, and so on.
2310 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
2311 # There is no requirement that this be linear or support any granularity of
2312 # operations. This should not be used to guess when the operation will be
2313 # complete. This number should monotonically increase as the operation
2314 # progresses.
2315 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
2316 # applicable when performing regional operations.
2317 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2318 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
2319 # this field will contain information on all underlying zonal actions and
2320 # their state.
2321 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
2322 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
2323 # Example key: zones/us-central1-a
2324 &quot;a_key&quot;: {
2325 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
2326 # populated.
2327 # different programming environments, including REST APIs and RPC APIs. It is
2328 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2329 # three pieces of data: error code, error message, and error details.
2330 #
2331 # You can find out more about this error model and how to work with it in the
2332 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2333 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2334 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2335 # message types for APIs to use.
2336 {
2337 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2338 },
2339 ],
2340 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2341 # user-facing error message should be localized and sent in the
2342 # google.rpc.Status.details field, or localized by the client.
2343 },
2344 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
2345 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
2346 },
2347 },
2348 },
2349 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
2350 # This value is inRFC3339
2351 # text format.
2352 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
2353 # following:
2354 # `PENDING`, `RUNNING`, or `DONE`.
2355 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
2356 # operation.
2357 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
2358 # of the target resource.
2359 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
2360 # operations related to creating a snapshot, this points to the disk
2361 # that the snapshot was created from.
2362 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
2363 # `[email protected]` or
2364 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
2365 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
2366 # operation, this field will be populated.
2367 {
2368 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
2369 # Engine returns NO_RESULTS_ON_PAGE if there
2370 # are no results in the response.
2371 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
2372 # value format. For example:
2373 #
2374 # &quot;data&quot;: [
2375 # {
2376 # &quot;key&quot;: &quot;scope&quot;,
2377 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
2378 # }
2379 {
2380 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
2381 # returned. For example, for warnings where there are no results in a list
2382 # request for a particular zone, this key might be scope and
2383 # the key value might be the zone name. Other examples might be a key
2384 # indicating a deprecated resource and a suggested replacement, or a
2385 # warning about invalid network settings (for example, if an instance
2386 # attempts to perform IP forwarding but is not enabled for IP forwarding).
2387 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2388 },
2389 ],
2390 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2391 },
2392 ],
2393 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
2394 # applicable when performing per-zone operations.
2395 }</pre>
2396 </div>
2397
2398 <div class="method">
2399 <code class="details" id="setIamPolicy">setIamPolicy(project, region, resource, body=None, x__xgafv=None)</code>
2400 <pre>Sets the access control policy on the specified resource.
2401 Replaces any existing policy.
2402
2403 Args:
2404 project: string, Project ID for this request. (required)
2405 region: string, The name of the region for this request. (required)
2406 resource: string, Name or id of the resource for this request. (required)
2407 body: object, The request body.
2408 The object takes the form of:
2409
2410 {
2411 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format.
2412 # Deprecated. Use &#x27;policy&#x27; to specify bindings.
2413 { # Associates `members`, or principals, with a `role`.
2414 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
2415 #
2416 # If the condition evaluates to `true`, then this binding applies to the
2417 # current request.
2418 #
2419 # If the condition evaluates to `false`, then this binding does not apply to
2420 # the current request. However, a different role binding might grant the same
2421 # role to one or more of the principals in this binding.
2422 #
2423 # To learn which resources support conditions in their IAM policies, see the
2424 # [IAM
2425 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2426 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2427 # are documented at https://github.com/google/cel-spec.
2428 #
2429 # Example (Comparison):
2430 #
2431 # title: &quot;Summary size limit&quot;
2432 # description: &quot;Determines if a summary is less than 100 chars&quot;
2433 # expression: &quot;document.summary.size() &lt; 100&quot;
2434 #
2435 # Example (Equality):
2436 #
2437 # title: &quot;Requestor is owner&quot;
2438 # description: &quot;Determines if requestor is the document owner&quot;
2439 # expression: &quot;document.owner == request.auth.claims.email&quot;
2440 #
2441 # Example (Logic):
2442 #
2443 # title: &quot;Public documents&quot;
2444 # description: &quot;Determine whether the document should be publicly visible&quot;
2445 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2446 #
2447 # Example (Data Manipulation):
2448 #
2449 # title: &quot;Notification string&quot;
2450 # description: &quot;Create a notification string with a timestamp.&quot;
2451 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2452 #
2453 # The exact variables and functions that may be referenced within an expression
2454 # are determined by the service that evaluates it. See the service
2455 # documentation for additional information.
2456 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2457 # describes the expression, e.g. when hovered over it in a UI.
2458 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2459 # syntax.
2460 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2461 # reporting, e.g. a file name and a position in the file.
2462 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2463 # its purpose. This can be used e.g. in UIs which allow to enter the
2464 # expression.
2465 },
2466 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource.
2467 # `members` can have the following values:
2468 #
2469 # * `allUsers`: A special identifier that represents anyone who is
2470 # on the internet; with or without a Google account.
2471 #
2472 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2473 # who is authenticated with a Google account or a service account.
2474 # Does not include identities that come from external identity providers
2475 # (IdPs) through identity federation.
2476 #
2477 # * `user:{emailid}`: An email address that represents a specific Google
2478 # account. For example, `[email protected]` .
2479 #
2480 #
2481 # * `serviceAccount:{emailid}`: An email address that represents a Google
2482 # service account. For example,
2483 # `[email protected]`.
2484 #
2485 # * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
2486 # identifier for a
2487 # [Kubernetes service
2488 # account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
2489 # For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.
2490 #
2491 # * `group:{emailid}`: An email address that represents a Google group.
2492 # For example, `[email protected]`.
2493 #
2494 #
2495 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
2496 # users of that domain. For example, `google.com` or `example.com`.
2497 #
2498 #
2499 #
2500 #
2501 # * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
2502 # A single identity in a workforce identity pool.
2503 #
2504 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
2505 # All workforce identities in a group.
2506 #
2507 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
2508 # All workforce identities with a specific attribute value.
2509 #
2510 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:
2511 # All identities in a workforce identity pool.
2512 #
2513 # * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:
2514 # A single identity in a workload identity pool.
2515 #
2516 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:
2517 # A workload identity pool group.
2518 #
2519 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
2520 # All identities in a workload identity pool with a certain attribute.
2521 #
2522 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:
2523 # All identities in a workload identity pool.
2524 #
2525 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2526 # identifier) representing a user that has been recently deleted. For
2527 # example, `[email protected]?uid=123456789012345678901`. If the user is
2528 # recovered, this value reverts to `user:{emailid}` and the recovered user
2529 # retains the role in the binding.
2530 #
2531 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2532 # unique identifier) representing a service account that has been recently
2533 # deleted. For example,
2534 # `[email protected]?uid=123456789012345678901`.
2535 # If the service account is undeleted, this value reverts to
2536 # `serviceAccount:{emailid}` and the undeleted service account retains the
2537 # role in the binding.
2538 #
2539 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2540 # identifier) representing a Google group that has been recently
2541 # deleted. For example, `[email protected]?uid=123456789012345678901`. If
2542 # the group is recovered, this value reverts to `group:{emailid}` and the
2543 # recovered group retains the role in the binding.
2544 #
2545 # * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
2546 # Deleted single identity in a workforce identity pool. For example,
2547 # `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
2548 &quot;A String&quot;,
2549 ],
2550 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals.
2551 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2552 #
2553 # For an overview of the IAM roles and permissions, see the
2554 # [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For
2555 # a list of the available pre-defined roles, see
2556 # [here](https://cloud.google.com/iam/docs/understanding-roles).
2557 },
2558 ],
2559 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format.
2560 # Deprecated. Use &#x27;policy&#x27; to specify the etag.
2561 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. The size of
2562 # the policy is limited to a few 10s of KB. An empty policy is in general a
2563 # valid policy but certain services (like Projects) might reject them.
2564 # controls for Google Cloud resources.
2565 #
2566 #
2567 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
2568 # `members`, or principals, to a single `role`. Principals can be user
2569 # accounts, service accounts, Google groups, and domains (such as G Suite). A
2570 # `role` is a named list of permissions; each `role` can be an IAM predefined
2571 # role or a user-created custom role.
2572 #
2573 # For some types of Google Cloud resources, a `binding` can also specify a
2574 # `condition`, which is a logical expression that allows access to a resource
2575 # only if the expression evaluates to `true`. A condition can add constraints
2576 # based on attributes of the request, the resource, or both. To learn which
2577 # resources support conditions in their IAM policies, see the
2578 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2579 #
2580 # **JSON example:**
2581 #
2582 # ```
2583 # {
2584 # &quot;bindings&quot;: [
2585 # {
2586 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
2587 # &quot;members&quot;: [
2588 # &quot;user:[email protected]&quot;,
2589 # &quot;group:[email protected]&quot;,
2590 # &quot;domain:google.com&quot;,
2591 # &quot;serviceAccount:[email protected]&quot;
2592 # ]
2593 # },
2594 # {
2595 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
2596 # &quot;members&quot;: [
2597 # &quot;user:[email protected]&quot;
2598 # ],
2599 # &quot;condition&quot;: {
2600 # &quot;title&quot;: &quot;expirable access&quot;,
2601 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
2602 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
2603 # }
2604 # }
2605 # ],
2606 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
2607 # &quot;version&quot;: 3
2608 # }
2609 # ```
2610 #
2611 # **YAML example:**
2612 #
2613 # ```
2614 # bindings:
2615 # - members:
2616 # - user:[email protected]
2617 # - group:[email protected]
2618 # - domain:google.com
2619 # - serviceAccount:[email protected]
2620 # role: roles/resourcemanager.organizationAdmin
2621 # - members:
2622 # - user:[email protected]
2623 # role: roles/resourcemanager.organizationViewer
2624 # condition:
2625 # title: expirable access
2626 # description: Does not grant access after Sep 2020
2627 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
2628 # etag: BwWWja0YfJA=
2629 # version: 3
2630 # ```
2631 #
2632 # For a description of IAM and its features, see the
2633 # [IAM documentation](https://cloud.google.com/iam/docs/).
2634 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2635 { # Specifies the audit configuration for a service.
2636 # The configuration determines which permission types are logged, and what
2637 # identities, if any, are exempted from logging.
2638 # An AuditConfig must have one or more AuditLogConfigs.
2639 #
2640 # If there are AuditConfigs for both `allServices` and a specific service,
2641 # the union of the two AuditConfigs is used for that service: the log_types
2642 # specified in each AuditConfig are enabled, and the exempted_members in each
2643 # AuditLogConfig are exempted.
2644 #
2645 # Example Policy with multiple AuditConfigs:
2646 #
2647 # {
2648 # &quot;audit_configs&quot;: [
2649 # {
2650 # &quot;service&quot;: &quot;allServices&quot;,
2651 # &quot;audit_log_configs&quot;: [
2652 # {
2653 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2654 # &quot;exempted_members&quot;: [
2655 # &quot;user:[email protected]&quot;
2656 # ]
2657 # },
2658 # {
2659 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
2660 # },
2661 # {
2662 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
2663 # }
2664 # ]
2665 # },
2666 # {
2667 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
2668 # &quot;audit_log_configs&quot;: [
2669 # {
2670 # &quot;log_type&quot;: &quot;DATA_READ&quot;
2671 # },
2672 # {
2673 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
2674 # &quot;exempted_members&quot;: [
2675 # &quot;user:[email protected]&quot;
2676 # ]
2677 # }
2678 # ]
2679 # }
2680 # ]
2681 # }
2682 #
2683 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
2684 # logging. It also exempts `[email protected]` from DATA_READ logging, and
2685 # `[email protected]` from DATA_WRITE logging.
2686 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
2687 { # Provides the configuration for logging a type of permissions.
2688 # Example:
2689 #
2690 # {
2691 # &quot;audit_log_configs&quot;: [
2692 # {
2693 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
2694 # &quot;exempted_members&quot;: [
2695 # &quot;user:[email protected]&quot;
2696 # ]
2697 # },
2698 # {
2699 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
2700 # }
2701 # ]
2702 # }
2703 #
2704 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
2705 # [email protected] from DATA_READ logging.
2706 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
2707 # permission.
2708 # Follows the same format of Binding.members.
2709 &quot;A String&quot;,
2710 ],
2711 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
2712 },
2713 ],
2714 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
2715 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
2716 # `allServices` is a special value that covers all services.
2717 },
2718 ],
2719 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally,
2720 # may specify a `condition` that determines how and when the `bindings` are
2721 # applied. Each of the `bindings` must contain at least one principal.
2722 #
2723 # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
2724 # of these principals can be Google groups. Each occurrence of a principal
2725 # counts towards these limits. For example, if the `bindings` grant 50
2726 # different roles to `user:[email protected]`, and not to any other
2727 # principal, then you can add another 1,450 principals to the `bindings` in
2728 # the `Policy`.
2729 { # Associates `members`, or principals, with a `role`.
2730 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
2731 #
2732 # If the condition evaluates to `true`, then this binding applies to the
2733 # current request.
2734 #
2735 # If the condition evaluates to `false`, then this binding does not apply to
2736 # the current request. However, a different role binding might grant the same
2737 # role to one or more of the principals in this binding.
2738 #
2739 # To learn which resources support conditions in their IAM policies, see the
2740 # [IAM
2741 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2742 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
2743 # are documented at https://github.com/google/cel-spec.
2744 #
2745 # Example (Comparison):
2746 #
2747 # title: &quot;Summary size limit&quot;
2748 # description: &quot;Determines if a summary is less than 100 chars&quot;
2749 # expression: &quot;document.summary.size() &lt; 100&quot;
2750 #
2751 # Example (Equality):
2752 #
2753 # title: &quot;Requestor is owner&quot;
2754 # description: &quot;Determines if requestor is the document owner&quot;
2755 # expression: &quot;document.owner == request.auth.claims.email&quot;
2756 #
2757 # Example (Logic):
2758 #
2759 # title: &quot;Public documents&quot;
2760 # description: &quot;Determine whether the document should be publicly visible&quot;
2761 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
2762 #
2763 # Example (Data Manipulation):
2764 #
2765 # title: &quot;Notification string&quot;
2766 # description: &quot;Create a notification string with a timestamp.&quot;
2767 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
2768 #
2769 # The exact variables and functions that may be referenced within an expression
2770 # are determined by the service that evaluates it. See the service
2771 # documentation for additional information.
2772 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
2773 # describes the expression, e.g. when hovered over it in a UI.
2774 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
2775 # syntax.
2776 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
2777 # reporting, e.g. a file name and a position in the file.
2778 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
2779 # its purpose. This can be used e.g. in UIs which allow to enter the
2780 # expression.
2781 },
2782 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource.
2783 # `members` can have the following values:
2784 #
2785 # * `allUsers`: A special identifier that represents anyone who is
2786 # on the internet; with or without a Google account.
2787 #
2788 # * `allAuthenticatedUsers`: A special identifier that represents anyone
2789 # who is authenticated with a Google account or a service account.
2790 # Does not include identities that come from external identity providers
2791 # (IdPs) through identity federation.
2792 #
2793 # * `user:{emailid}`: An email address that represents a specific Google
2794 # account. For example, `[email protected]` .
2795 #
2796 #
2797 # * `serviceAccount:{emailid}`: An email address that represents a Google
2798 # service account. For example,
2799 # `[email protected]`.
2800 #
2801 # * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
2802 # identifier for a
2803 # [Kubernetes service
2804 # account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
2805 # For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.
2806 #
2807 # * `group:{emailid}`: An email address that represents a Google group.
2808 # For example, `[email protected]`.
2809 #
2810 #
2811 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
2812 # users of that domain. For example, `google.com` or `example.com`.
2813 #
2814 #
2815 #
2816 #
2817 # * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
2818 # A single identity in a workforce identity pool.
2819 #
2820 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
2821 # All workforce identities in a group.
2822 #
2823 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
2824 # All workforce identities with a specific attribute value.
2825 #
2826 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:
2827 # All identities in a workforce identity pool.
2828 #
2829 # * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:
2830 # A single identity in a workload identity pool.
2831 #
2832 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:
2833 # A workload identity pool group.
2834 #
2835 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
2836 # All identities in a workload identity pool with a certain attribute.
2837 #
2838 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:
2839 # All identities in a workload identity pool.
2840 #
2841 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
2842 # identifier) representing a user that has been recently deleted. For
2843 # example, `[email protected]?uid=123456789012345678901`. If the user is
2844 # recovered, this value reverts to `user:{emailid}` and the recovered user
2845 # retains the role in the binding.
2846 #
2847 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
2848 # unique identifier) representing a service account that has been recently
2849 # deleted. For example,
2850 # `[email protected]?uid=123456789012345678901`.
2851 # If the service account is undeleted, this value reverts to
2852 # `serviceAccount:{emailid}` and the undeleted service account retains the
2853 # role in the binding.
2854 #
2855 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
2856 # identifier) representing a Google group that has been recently
2857 # deleted. For example, `[email protected]?uid=123456789012345678901`. If
2858 # the group is recovered, this value reverts to `group:{emailid}` and the
2859 # recovered group retains the role in the binding.
2860 #
2861 # * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
2862 # Deleted single identity in a workforce identity pool. For example,
2863 # `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
2864 &quot;A String&quot;,
2865 ],
2866 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals.
2867 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
2868 #
2869 # For an overview of the IAM roles and permissions, see the
2870 # [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For
2871 # a list of the available pre-defined roles, see
2872 # [here](https://cloud.google.com/iam/docs/understanding-roles).
2873 },
2874 ],
2875 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
2876 # prevent simultaneous updates of a policy from overwriting each other.
2877 # It is strongly suggested that systems make use of the `etag` in the
2878 # read-modify-write cycle to perform policy updates in order to avoid race
2879 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
2880 # systems are expected to put that etag in the request to `setIamPolicy` to
2881 # ensure that their change will be applied to the same version of the policy.
2882 #
2883 # **Important:** If you use IAM Conditions, you must include the `etag` field
2884 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2885 # you to overwrite a version `3` policy with a version `1` policy, and all of
2886 # the conditions in the version `3` policy are lost.
2887 &quot;version&quot;: 42, # Specifies the format of the policy.
2888 #
2889 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
2890 # are rejected.
2891 #
2892 # Any operation that affects conditional role bindings must specify version
2893 # `3`. This requirement applies to the following operations:
2894 #
2895 # * Getting a policy that includes a conditional role binding
2896 # * Adding a conditional role binding to a policy
2897 # * Changing a conditional role binding in a policy
2898 # * Removing any role binding, with or without a condition, from a policy
2899 # that includes conditions
2900 #
2901 # **Important:** If you use IAM Conditions, you must include the `etag` field
2902 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
2903 # you to overwrite a version `3` policy with a version `1` policy, and all of
2904 # the conditions in the version `3` policy are lost.
2905 #
2906 # If a policy does not include any conditions, operations on that policy may
2907 # specify any valid version or leave the field unset.
2908 #
2909 # To learn which resources support conditions in their IAM policies, see the
2910 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2911 },
2912 }
2913
2914 x__xgafv: string, V1 error format.
2915 Allowed values
2916 1 - v1 error format
2917 2 - v2 error format
2918
2919 Returns:
2920 An object of the form:
2921
2922 { # An Identity and Access Management (IAM) policy, which specifies access
2923 # controls for Google Cloud resources.
2924 #
2925 #
2926 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
2927 # `members`, or principals, to a single `role`. Principals can be user
2928 # accounts, service accounts, Google groups, and domains (such as G Suite). A
2929 # `role` is a named list of permissions; each `role` can be an IAM predefined
2930 # role or a user-created custom role.
2931 #
2932 # For some types of Google Cloud resources, a `binding` can also specify a
2933 # `condition`, which is a logical expression that allows access to a resource
2934 # only if the expression evaluates to `true`. A condition can add constraints
2935 # based on attributes of the request, the resource, or both. To learn which
2936 # resources support conditions in their IAM policies, see the
2937 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
2938 #
2939 # **JSON example:**
2940 #
2941 # ```
2942 # {
2943 # &quot;bindings&quot;: [
2944 # {
2945 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
2946 # &quot;members&quot;: [
2947 # &quot;user:[email protected]&quot;,
2948 # &quot;group:[email protected]&quot;,
2949 # &quot;domain:google.com&quot;,
2950 # &quot;serviceAccount:[email protected]&quot;
2951 # ]
2952 # },
2953 # {
2954 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
2955 # &quot;members&quot;: [
2956 # &quot;user:[email protected]&quot;
2957 # ],
2958 # &quot;condition&quot;: {
2959 # &quot;title&quot;: &quot;expirable access&quot;,
2960 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
2961 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
2962 # }
2963 # }
2964 # ],
2965 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
2966 # &quot;version&quot;: 3
2967 # }
2968 # ```
2969 #
2970 # **YAML example:**
2971 #
2972 # ```
2973 # bindings:
2974 # - members:
2975 # - user:[email protected]
2976 # - group:[email protected]
2977 # - domain:google.com
2978 # - serviceAccount:[email protected]
2979 # role: roles/resourcemanager.organizationAdmin
2980 # - members:
2981 # - user:[email protected]
2982 # role: roles/resourcemanager.organizationViewer
2983 # condition:
2984 # title: expirable access
2985 # description: Does not grant access after Sep 2020
2986 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
2987 # etag: BwWWja0YfJA=
2988 # version: 3
2989 # ```
2990 #
2991 # For a description of IAM and its features, see the
2992 # [IAM documentation](https://cloud.google.com/iam/docs/).
2993 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
2994 { # Specifies the audit configuration for a service.
2995 # The configuration determines which permission types are logged, and what
2996 # identities, if any, are exempted from logging.
2997 # An AuditConfig must have one or more AuditLogConfigs.
2998 #
2999 # If there are AuditConfigs for both `allServices` and a specific service,
3000 # the union of the two AuditConfigs is used for that service: the log_types
3001 # specified in each AuditConfig are enabled, and the exempted_members in each
3002 # AuditLogConfig are exempted.
3003 #
3004 # Example Policy with multiple AuditConfigs:
3005 #
3006 # {
3007 # &quot;audit_configs&quot;: [
3008 # {
3009 # &quot;service&quot;: &quot;allServices&quot;,
3010 # &quot;audit_log_configs&quot;: [
3011 # {
3012 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
3013 # &quot;exempted_members&quot;: [
3014 # &quot;user:[email protected]&quot;
3015 # ]
3016 # },
3017 # {
3018 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
3019 # },
3020 # {
3021 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
3022 # }
3023 # ]
3024 # },
3025 # {
3026 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
3027 # &quot;audit_log_configs&quot;: [
3028 # {
3029 # &quot;log_type&quot;: &quot;DATA_READ&quot;
3030 # },
3031 # {
3032 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
3033 # &quot;exempted_members&quot;: [
3034 # &quot;user:[email protected]&quot;
3035 # ]
3036 # }
3037 # ]
3038 # }
3039 # ]
3040 # }
3041 #
3042 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
3043 # logging. It also exempts `[email protected]` from DATA_READ logging, and
3044 # `[email protected]` from DATA_WRITE logging.
3045 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
3046 { # Provides the configuration for logging a type of permissions.
3047 # Example:
3048 #
3049 # {
3050 # &quot;audit_log_configs&quot;: [
3051 # {
3052 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
3053 # &quot;exempted_members&quot;: [
3054 # &quot;user:[email protected]&quot;
3055 # ]
3056 # },
3057 # {
3058 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
3059 # }
3060 # ]
3061 # }
3062 #
3063 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
3064 # [email protected] from DATA_READ logging.
3065 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
3066 # permission.
3067 # Follows the same format of Binding.members.
3068 &quot;A String&quot;,
3069 ],
3070 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
3071 },
3072 ],
3073 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
3074 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
3075 # `allServices` is a special value that covers all services.
3076 },
3077 ],
3078 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally,
3079 # may specify a `condition` that determines how and when the `bindings` are
3080 # applied. Each of the `bindings` must contain at least one principal.
3081 #
3082 # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
3083 # of these principals can be Google groups. Each occurrence of a principal
3084 # counts towards these limits. For example, if the `bindings` grant 50
3085 # different roles to `user:[email protected]`, and not to any other
3086 # principal, then you can add another 1,450 principals to the `bindings` in
3087 # the `Policy`.
3088 { # Associates `members`, or principals, with a `role`.
3089 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
3090 #
3091 # If the condition evaluates to `true`, then this binding applies to the
3092 # current request.
3093 #
3094 # If the condition evaluates to `false`, then this binding does not apply to
3095 # the current request. However, a different role binding might grant the same
3096 # role to one or more of the principals in this binding.
3097 #
3098 # To learn which resources support conditions in their IAM policies, see the
3099 # [IAM
3100 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3101 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3102 # are documented at https://github.com/google/cel-spec.
3103 #
3104 # Example (Comparison):
3105 #
3106 # title: &quot;Summary size limit&quot;
3107 # description: &quot;Determines if a summary is less than 100 chars&quot;
3108 # expression: &quot;document.summary.size() &lt; 100&quot;
3109 #
3110 # Example (Equality):
3111 #
3112 # title: &quot;Requestor is owner&quot;
3113 # description: &quot;Determines if requestor is the document owner&quot;
3114 # expression: &quot;document.owner == request.auth.claims.email&quot;
3115 #
3116 # Example (Logic):
3117 #
3118 # title: &quot;Public documents&quot;
3119 # description: &quot;Determine whether the document should be publicly visible&quot;
3120 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3121 #
3122 # Example (Data Manipulation):
3123 #
3124 # title: &quot;Notification string&quot;
3125 # description: &quot;Create a notification string with a timestamp.&quot;
3126 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3127 #
3128 # The exact variables and functions that may be referenced within an expression
3129 # are determined by the service that evaluates it. See the service
3130 # documentation for additional information.
3131 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3132 # describes the expression, e.g. when hovered over it in a UI.
3133 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
3134 # syntax.
3135 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3136 # reporting, e.g. a file name and a position in the file.
3137 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
3138 # its purpose. This can be used e.g. in UIs which allow to enter the
3139 # expression.
3140 },
3141 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource.
3142 # `members` can have the following values:
3143 #
3144 # * `allUsers`: A special identifier that represents anyone who is
3145 # on the internet; with or without a Google account.
3146 #
3147 # * `allAuthenticatedUsers`: A special identifier that represents anyone
3148 # who is authenticated with a Google account or a service account.
3149 # Does not include identities that come from external identity providers
3150 # (IdPs) through identity federation.
3151 #
3152 # * `user:{emailid}`: An email address that represents a specific Google
3153 # account. For example, `[email protected]` .
3154 #
3155 #
3156 # * `serviceAccount:{emailid}`: An email address that represents a Google
3157 # service account. For example,
3158 # `[email protected]`.
3159 #
3160 # * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
3161 # identifier for a
3162 # [Kubernetes service
3163 # account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
3164 # For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.
3165 #
3166 # * `group:{emailid}`: An email address that represents a Google group.
3167 # For example, `[email protected]`.
3168 #
3169 #
3170 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
3171 # users of that domain. For example, `google.com` or `example.com`.
3172 #
3173 #
3174 #
3175 #
3176 # * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
3177 # A single identity in a workforce identity pool.
3178 #
3179 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
3180 # All workforce identities in a group.
3181 #
3182 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
3183 # All workforce identities with a specific attribute value.
3184 #
3185 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:
3186 # All identities in a workforce identity pool.
3187 #
3188 # * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:
3189 # A single identity in a workload identity pool.
3190 #
3191 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:
3192 # A workload identity pool group.
3193 #
3194 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
3195 # All identities in a workload identity pool with a certain attribute.
3196 #
3197 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:
3198 # All identities in a workload identity pool.
3199 #
3200 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
3201 # identifier) representing a user that has been recently deleted. For
3202 # example, `[email protected]?uid=123456789012345678901`. If the user is
3203 # recovered, this value reverts to `user:{emailid}` and the recovered user
3204 # retains the role in the binding.
3205 #
3206 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
3207 # unique identifier) representing a service account that has been recently
3208 # deleted. For example,
3209 # `[email protected]?uid=123456789012345678901`.
3210 # If the service account is undeleted, this value reverts to
3211 # `serviceAccount:{emailid}` and the undeleted service account retains the
3212 # role in the binding.
3213 #
3214 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
3215 # identifier) representing a Google group that has been recently
3216 # deleted. For example, `[email protected]?uid=123456789012345678901`. If
3217 # the group is recovered, this value reverts to `group:{emailid}` and the
3218 # recovered group retains the role in the binding.
3219 #
3220 # * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
3221 # Deleted single identity in a workforce identity pool. For example,
3222 # `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
3223 &quot;A String&quot;,
3224 ],
3225 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals.
3226 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3227 #
3228 # For an overview of the IAM roles and permissions, see the
3229 # [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For
3230 # a list of the available pre-defined roles, see
3231 # [here](https://cloud.google.com/iam/docs/understanding-roles).
3232 },
3233 ],
3234 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
3235 # prevent simultaneous updates of a policy from overwriting each other.
3236 # It is strongly suggested that systems make use of the `etag` in the
3237 # read-modify-write cycle to perform policy updates in order to avoid race
3238 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
3239 # systems are expected to put that etag in the request to `setIamPolicy` to
3240 # ensure that their change will be applied to the same version of the policy.
3241 #
3242 # **Important:** If you use IAM Conditions, you must include the `etag` field
3243 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3244 # you to overwrite a version `3` policy with a version `1` policy, and all of
3245 # the conditions in the version `3` policy are lost.
3246 &quot;version&quot;: 42, # Specifies the format of the policy.
3247 #
3248 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3249 # are rejected.
3250 #
3251 # Any operation that affects conditional role bindings must specify version
3252 # `3`. This requirement applies to the following operations:
3253 #
3254 # * Getting a policy that includes a conditional role binding
3255 # * Adding a conditional role binding to a policy
3256 # * Changing a conditional role binding in a policy
3257 # * Removing any role binding, with or without a condition, from a policy
3258 # that includes conditions
3259 #
3260 # **Important:** If you use IAM Conditions, you must include the `etag` field
3261 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3262 # you to overwrite a version `3` policy with a version `1` policy, and all of
3263 # the conditions in the version `3` policy are lost.
3264 #
3265 # If a policy does not include any conditions, operations on that policy may
3266 # specify any valid version or leave the field unset.
3267 #
3268 # To learn which resources support conditions in their IAM policies, see the
3269 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3270 }</pre>
3271 </div>
3272
3273 <div class="method">
3274 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None, x__xgafv=None)</code>
3275 <pre>Returns permissions that a caller has on the specified resource.
3276
3277 Args:
3278 project: string, Project ID for this request. (required)
3279 region: string, The name of the region for this request. (required)
3280 resource: string, Name or id of the resource for this request. (required)
3281 body: object, The request body.
3282 The object takes the form of:
3283
3284 {
3285 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with
3286 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
3287 &quot;A String&quot;,
3288 ],
3289 }
3290
3291 x__xgafv: string, V1 error format.
3292 Allowed values
3293 1 - v1 error format
3294 2 - v2 error format
3295
3296 Returns:
3297 An object of the form:
3298
3299 {
3300 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
3301 # allowed.
3302 &quot;A String&quot;,
3303 ],
3304 }</pre>
3305 </div>
3306
3307 </body></html>