Debian Codegraph @

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