Debian Codegraph @

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