blob: 4b3e0686f82221f0b0ef4715b35e5f731347b32c [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_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">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Retrieves an aggregated list of resource policies.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(project, region, resourcePolicy, requestId=None)</a></code></p>
85<p class="firstline">Deletes the specified resource policy.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, region, resourcePolicy)</a></code></p>
88<p class="firstline">Retrieves all information of the specified resource policy.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Gets the access control policy for a resource. May be empty if no such policy or resource exists.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Creates a new resource policy.</p>
95<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">A list all the resource policies that have been configured for the specified project in specified region.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#setIamPolicy">setIamPolicy(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Sets the access control policy on the specified resource. Replaces any existing policy.</p>
104<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
107<h3>Method Details</h3>
108<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700109 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 <pre>Retrieves an aggregated list of resource policies.
111
112Args:
113 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115
Dan O'Mearadd494642020-05-01 07:42:23 -0700116For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117
Dan O'Mearadd494642020-05-01 07:42:23 -0700118You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119
Bu Sun Kim65020912020-05-20 12:08:20 -0700120To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700122 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
123 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
124
125You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
126
127Currently, only sorting by `name` or `creationTimestamp desc` is supported.
128 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
129 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130
131Returns:
132 An object of the form:
133
134 { # Contains a list of resourcePolicies.
Bu Sun Kim65020912020-05-20 12:08:20 -0700135 &quot;etag&quot;: &quot;A String&quot;,
136 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
137 &quot;items&quot;: { # A list of ResourcePolicy resources.
138 &quot;a_key&quot;: { # Name of the scope containing this set of resourcePolicies.
139 &quot;resourcePolicies&quot;: [ # A list of resourcePolicies contained in this scope.
Dan O'Mearadd494642020-05-01 07:42:23 -0700140 { # Represents a Resource Policy resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can use them to schedule persistent disk snapshots.
Bu Sun Kim65020912020-05-20 12:08:20 -0700141 #
142 # (== resource_for {$api_version}.resourcePolicies ==)
143 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
144 &quot;description&quot;: &quot;A String&quot;,
145 &quot;groupPlacementPolicy&quot;: { # A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation as well as network locality # Resource policy for instacnes for placement configuration.
146 &quot;availabilityDomainCount&quot;: 42, # The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network
147 &quot;collocation&quot;: &quot;A String&quot;, # Specifies network collocation
148 &quot;locality&quot;: &quot;A String&quot;, # Specifies network locality
149 &quot;style&quot;: &quot;A String&quot;, # Specifies instances to hosts placement relationship
150 &quot;vmCount&quot;: 42, # Number of vms in this placement group
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
153 &quot;kind&quot;: &quot;compute#resourcePolicy&quot;, # [Output Only] Type of the resource. Always compute#resource_policies for resource policies.
154 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
155 &quot;region&quot;: &quot;A String&quot;,
156 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
157 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
158 &quot;snapshotSchedulePolicy&quot;: { # A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained. # Resource policy for persistent disks for creating snapshots.
159 &quot;retentionPolicy&quot;: { # Policy for retention of scheduled snapshots. # Retention policy applied to snapshots created by this resource policy.
160 &quot;maxRetentionDays&quot;: 42, # Maximum age of the snapshot that is allowed to be kept.
161 &quot;onPolicySwitch&quot;: &quot;A String&quot;, # Specifies the behavior to apply to existing, scheduled snapshots snapshots if the policy is changed.
162 &quot;onSourceDiskDelete&quot;: &quot;A String&quot;, # Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.
163 },
164 &quot;schedule&quot;: { # A schedule for disks where the schedueled operations are performed. # A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy.
165 &quot;dailySchedule&quot;: { # Time window specified for daily operations.
166 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in months. The value determines how many months pass between the start of each cycle.
167 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
168 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
169 },
170 &quot;hourlySchedule&quot;: { # Time window specified for hourly operations.
171 &quot;duration&quot;: &quot;A String&quot;, # [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.
172 &quot;hoursInCycle&quot;: 42, # Defines a schedule with units measured in hours. The value determines how many hours pass between the start of each cycle.
173 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations. It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
174 },
175 &quot;weeklySchedule&quot;: { # Time window specified for weekly operations.
176 &quot;dayOfWeeks&quot;: [ # Up to 7 intervals/windows, one for each day of the week.
177 {
178 &quot;day&quot;: &quot;A String&quot;, # Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
179 &quot;duration&quot;: &quot;A String&quot;, # [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.
180 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations. It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
181 },
182 ],
183 },
184 },
185 &quot;snapshotProperties&quot;: { # Specified snapshot properties for scheduled snapshots created by this policy. # Properties with which snapshots are created such as labels, encryption keys.
186 &quot;guestFlush&quot;: True or False, # Indication to perform a &#x27;guest aware&#x27; snapshot.
187 &quot;labels&quot;: { # Labels to apply to scheduled snapshots. These can be later modified by the setLabels method. Label values may be empty.
188 &quot;a_key&quot;: &quot;A String&quot;,
189 },
190 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional).
191 &quot;A String&quot;,
192 ],
193 },
194 },
195 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of resource policy creation.
196 &quot;vmMaintenancePolicy&quot;: { # Resource policy applicable to VMs for infrastructure maintenance.
197 &quot;concurrencyControlGroup&quot;: { # A concurrency control configuration. Defines a group config that, when attached to an instance, recognizes that instance as part of a group of instances where only up the concurrency_limit of instances in that group can undergo simultaneous maintenance. For more information: go/concurrency-control-design-doc
198 &quot;concurrencyLimit&quot;: 42,
199 },
200 &quot;maintenanceWindow&quot;: { # A maintenance window for VMs. When set, we restrict our maintenance operations to this window. # Maintenance windows that are applied to VMs covered by this policy.
201 &quot;dailyMaintenanceWindow&quot;: { # Time window specified for daily operations.
202 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in months. The value determines how many months pass between the start of each cycle.
203 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
204 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
205 },
206 },
207 },
208 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700209 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 &quot;warning&quot;: { # Informational warning which replaces the list of resourcePolicies when the list is empty.
211 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
212 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
213 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700215 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
216 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 },
218 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 },
221 },
222 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700223 &quot;kind&quot;: &quot;compute#resourcePolicyAggregatedList&quot;, # Type of resource.
224 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
225 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
226 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
227 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 &quot;warning&quot;: { # [Output Only] Informational warning message.
230 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
231 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
232 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
235 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 },
237 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700238 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700240 }</pre>
241</div>
242
243<div class="method">
244 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
245 <pre>Retrieves the next page of results.
246
247Args:
248 previous_request: The request for the previous page. (required)
249 previous_response: The response from the request for the previous page. (required)
250
251Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700253 page. Returns None if there are no more items in the collection.
254 </pre>
255</div>
256
257<div class="method">
258 <code class="details" id="delete">delete(project, region, resourcePolicy, requestId=None)</code>
259 <pre>Deletes the specified resource policy.
260
261Args:
262 project: string, Project ID for this request. (required)
263 region: string, Name of the region for this request. (required)
264 resourcePolicy: string, Name of the resource policy to delete. (required)
265 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
266
267For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
268
269The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
270
271Returns:
272 An object of the form:
273
274 { # Represents an Operation resource.
275 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700276 # Google Compute Engine has three Operation resources:
277 #
278 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
279 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
281 #
282 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700283 # - For global operations, use the `globalOperations` resource.
284 # - For regional operations, use the `regionOperations` resource.
285 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700287 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
289 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
290 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
291 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
292 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
293 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
296 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
297 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 },
299 ],
300 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
302 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
303 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
304 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
305 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
306 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
307 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
308 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
309 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
310 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
311 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
312 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
313 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
314 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
315 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
316 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
317 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
318 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
319 {
320 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
321 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
322 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
323 {
324 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
325 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
326 },
327 ],
328 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
329 },
330 ],
331 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700332 }</pre>
333</div>
334
335<div class="method">
336 <code class="details" id="get">get(project, region, resourcePolicy)</code>
337 <pre>Retrieves all information of the specified resource policy.
338
339Args:
340 project: string, Project ID for this request. (required)
341 region: string, Name of the region for this request. (required)
342 resourcePolicy: string, Name of the resource policy to retrieve. (required)
343
344Returns:
345 An object of the form:
346
Dan O'Mearadd494642020-05-01 07:42:23 -0700347 { # Represents a Resource Policy resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can use them to schedule persistent disk snapshots.
Bu Sun Kim65020912020-05-20 12:08:20 -0700348 #
349 # (== resource_for {$api_version}.resourcePolicies ==)
350 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
351 &quot;description&quot;: &quot;A String&quot;,
352 &quot;groupPlacementPolicy&quot;: { # A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation as well as network locality # Resource policy for instacnes for placement configuration.
353 &quot;availabilityDomainCount&quot;: 42, # The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network
354 &quot;collocation&quot;: &quot;A String&quot;, # Specifies network collocation
355 &quot;locality&quot;: &quot;A String&quot;, # Specifies network locality
356 &quot;style&quot;: &quot;A String&quot;, # Specifies instances to hosts placement relationship
357 &quot;vmCount&quot;: 42, # Number of vms in this placement group
358 },
359 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
360 &quot;kind&quot;: &quot;compute#resourcePolicy&quot;, # [Output Only] Type of the resource. Always compute#resource_policies for resource policies.
361 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
362 &quot;region&quot;: &quot;A String&quot;,
363 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
364 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
365 &quot;snapshotSchedulePolicy&quot;: { # A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained. # Resource policy for persistent disks for creating snapshots.
366 &quot;retentionPolicy&quot;: { # Policy for retention of scheduled snapshots. # Retention policy applied to snapshots created by this resource policy.
367 &quot;maxRetentionDays&quot;: 42, # Maximum age of the snapshot that is allowed to be kept.
368 &quot;onPolicySwitch&quot;: &quot;A String&quot;, # Specifies the behavior to apply to existing, scheduled snapshots snapshots if the policy is changed.
369 &quot;onSourceDiskDelete&quot;: &quot;A String&quot;, # Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700370 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700371 &quot;schedule&quot;: { # A schedule for disks where the schedueled operations are performed. # A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy.
372 &quot;dailySchedule&quot;: { # Time window specified for daily operations.
373 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in months. The value determines how many months pass between the start of each cycle.
374 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
375 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 &quot;hourlySchedule&quot;: { # Time window specified for hourly operations.
378 &quot;duration&quot;: &quot;A String&quot;, # [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.
379 &quot;hoursInCycle&quot;: 42, # Defines a schedule with units measured in hours. The value determines how many hours pass between the start of each cycle.
380 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations. It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 &quot;weeklySchedule&quot;: { # Time window specified for weekly operations.
383 &quot;dayOfWeeks&quot;: [ # Up to 7 intervals/windows, one for each day of the week.
384 {
385 &quot;day&quot;: &quot;A String&quot;, # Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
386 &quot;duration&quot;: &quot;A String&quot;, # [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.
387 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations. It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
388 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700390 },
391 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700392 &quot;snapshotProperties&quot;: { # Specified snapshot properties for scheduled snapshots created by this policy. # Properties with which snapshots are created such as labels, encryption keys.
393 &quot;guestFlush&quot;: True or False, # Indication to perform a &#x27;guest aware&#x27; snapshot.
394 &quot;labels&quot;: { # Labels to apply to scheduled snapshots. These can be later modified by the setLabels method. Label values may be empty.
395 &quot;a_key&quot;: &quot;A String&quot;,
396 },
397 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional).
398 &quot;A String&quot;,
399 ],
400 },
401 },
402 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of resource policy creation.
403 &quot;vmMaintenancePolicy&quot;: { # Resource policy applicable to VMs for infrastructure maintenance.
404 &quot;concurrencyControlGroup&quot;: { # A concurrency control configuration. Defines a group config that, when attached to an instance, recognizes that instance as part of a group of instances where only up the concurrency_limit of instances in that group can undergo simultaneous maintenance. For more information: go/concurrency-control-design-doc
405 &quot;concurrencyLimit&quot;: 42,
406 },
407 &quot;maintenanceWindow&quot;: { # A maintenance window for VMs. When set, we restrict our maintenance operations to this window. # Maintenance windows that are applied to VMs covered by this policy.
408 &quot;dailyMaintenanceWindow&quot;: { # Time window specified for daily operations.
409 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in months. The value determines how many months pass between the start of each cycle.
410 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
411 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
412 },
413 },
414 },
415 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416</div>
417
418<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700419 <code class="details" id="getIamPolicy">getIamPolicy(project, region, resource, optionsRequestedPolicyVersion=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700420 <pre>Gets the access control policy for a resource. May be empty if no such policy or resource exists.
421
422Args:
423 project: string, Project ID for this request. (required)
424 region: string, The name of the region for this request. (required)
425 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700426 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427
428Returns:
429 An object of the form:
430
Dan O'Mearadd494642020-05-01 07:42:23 -0700431 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700432 #
433 #
434 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700435 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700437 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700439 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700440 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700441 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700443 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700444 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700445 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700446 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700447 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
450 #
451 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
452 #
453 # Example Policy with multiple AuditConfigs:
454 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot;, } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700458 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700459 { # Provides the configuration for logging a type of permissions. Example:
460 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
464 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
465 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700466 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &quot;ignoreChildExemptions&quot;: True or False,
468 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 },
470 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 &quot;exemptedMembers&quot;: [
472 &quot;A String&quot;,
473 ],
474 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700475 },
476 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700477 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700478 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
480 #
481 # If the condition evaluates to `true`, then this binding applies to the current request.
482 #
483 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
484 #
485 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
486 #
487 # Example (Comparison):
488 #
489 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
490 #
491 # Example (Equality):
492 #
493 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
494 #
495 # Example (Logic):
496 #
497 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
498 #
499 # Example (Data Manipulation):
500 #
501 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
502 #
503 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
504 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
505 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
506 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
507 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
508 },
509 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700510 #
511 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
512 #
513 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
514 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700515 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700516 #
517 #
518 #
519 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
520 #
521 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
522 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700523 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
524 #
525 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
526 #
527 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
528 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700529 #
530 #
531 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700535 },
536 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700537 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
538 #
539 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
540 &quot;iamOwned&quot;: True or False,
541 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
542 { # A rule to be applied in a Policy.
543 &quot;action&quot;: &quot;A String&quot;, # Required
544 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
545 { # A condition to be met.
546 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
547 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
548 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
549 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
550 &quot;values&quot;: [ # The objects of the condition.
551 &quot;A String&quot;,
552 ],
553 },
554 ],
555 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
556 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
557 &quot;A String&quot;,
558 ],
559 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
560 { # Specifies what kind of log the caller must write
561 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
562 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
563 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
564 },
565 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
566 },
567 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
568 #
569 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
570 #
571 # Field names correspond to IAM request parameters and field values are their respective values.
572 #
573 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
574 #
575 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
576 &quot;customFields&quot;: [ # Custom fields.
577 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
578 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
579 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
580 },
581 ],
582 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
583 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
584 },
585 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
586 &quot;logMode&quot;: &quot;A String&quot;,
587 },
588 },
589 ],
590 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
591 &quot;A String&quot;,
592 ],
593 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
594 &quot;A String&quot;,
595 ],
596 },
597 ],
598 &quot;version&quot;: 42, # Specifies the format of the policy.
599 #
600 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
601 #
602 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
603 #
604 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
605 #
606 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
607 #
608 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
609 #
610 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 }</pre>
612</div>
613
614<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700615 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700616 <pre>Creates a new resource policy.
617
618Args:
619 project: string, Project ID for this request. (required)
620 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700621 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 The object takes the form of:
623
Dan O'Mearadd494642020-05-01 07:42:23 -0700624{ # Represents a Resource Policy resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can use them to schedule persistent disk snapshots.
Bu Sun Kim65020912020-05-20 12:08:20 -0700625 #
626 # (== resource_for {$api_version}.resourcePolicies ==)
627 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
628 &quot;description&quot;: &quot;A String&quot;,
629 &quot;groupPlacementPolicy&quot;: { # A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation as well as network locality # Resource policy for instacnes for placement configuration.
630 &quot;availabilityDomainCount&quot;: 42, # The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network
631 &quot;collocation&quot;: &quot;A String&quot;, # Specifies network collocation
632 &quot;locality&quot;: &quot;A String&quot;, # Specifies network locality
633 &quot;style&quot;: &quot;A String&quot;, # Specifies instances to hosts placement relationship
634 &quot;vmCount&quot;: 42, # Number of vms in this placement group
635 },
636 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
637 &quot;kind&quot;: &quot;compute#resourcePolicy&quot;, # [Output Only] Type of the resource. Always compute#resource_policies for resource policies.
638 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
639 &quot;region&quot;: &quot;A String&quot;,
640 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
641 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
642 &quot;snapshotSchedulePolicy&quot;: { # A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained. # Resource policy for persistent disks for creating snapshots.
643 &quot;retentionPolicy&quot;: { # Policy for retention of scheduled snapshots. # Retention policy applied to snapshots created by this resource policy.
644 &quot;maxRetentionDays&quot;: 42, # Maximum age of the snapshot that is allowed to be kept.
645 &quot;onPolicySwitch&quot;: &quot;A String&quot;, # Specifies the behavior to apply to existing, scheduled snapshots snapshots if the policy is changed.
646 &quot;onSourceDiskDelete&quot;: &quot;A String&quot;, # Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700647 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700648 &quot;schedule&quot;: { # A schedule for disks where the schedueled operations are performed. # A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy.
649 &quot;dailySchedule&quot;: { # Time window specified for daily operations.
650 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in months. The value determines how many months pass between the start of each cycle.
651 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
652 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700653 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 &quot;hourlySchedule&quot;: { # Time window specified for hourly operations.
655 &quot;duration&quot;: &quot;A String&quot;, # [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.
656 &quot;hoursInCycle&quot;: 42, # Defines a schedule with units measured in hours. The value determines how many hours pass between the start of each cycle.
657 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations. It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
Dan O'Mearadd494642020-05-01 07:42:23 -0700658 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 &quot;weeklySchedule&quot;: { # Time window specified for weekly operations.
660 &quot;dayOfWeeks&quot;: [ # Up to 7 intervals/windows, one for each day of the week.
661 {
662 &quot;day&quot;: &quot;A String&quot;, # Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
663 &quot;duration&quot;: &quot;A String&quot;, # [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.
664 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations. It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
665 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700666 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700667 },
668 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 &quot;snapshotProperties&quot;: { # Specified snapshot properties for scheduled snapshots created by this policy. # Properties with which snapshots are created such as labels, encryption keys.
670 &quot;guestFlush&quot;: True or False, # Indication to perform a &#x27;guest aware&#x27; snapshot.
671 &quot;labels&quot;: { # Labels to apply to scheduled snapshots. These can be later modified by the setLabels method. Label values may be empty.
672 &quot;a_key&quot;: &quot;A String&quot;,
673 },
674 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional).
675 &quot;A String&quot;,
676 ],
677 },
678 },
679 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of resource policy creation.
680 &quot;vmMaintenancePolicy&quot;: { # Resource policy applicable to VMs for infrastructure maintenance.
681 &quot;concurrencyControlGroup&quot;: { # A concurrency control configuration. Defines a group config that, when attached to an instance, recognizes that instance as part of a group of instances where only up the concurrency_limit of instances in that group can undergo simultaneous maintenance. For more information: go/concurrency-control-design-doc
682 &quot;concurrencyLimit&quot;: 42,
683 },
684 &quot;maintenanceWindow&quot;: { # A maintenance window for VMs. When set, we restrict our maintenance operations to this window. # Maintenance windows that are applied to VMs covered by this policy.
685 &quot;dailyMaintenanceWindow&quot;: { # Time window specified for daily operations.
686 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in months. The value determines how many months pass between the start of each cycle.
687 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
688 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
689 },
690 },
691 },
692}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700693
694 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
695
696For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
697
698The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
699
700Returns:
701 An object of the form:
702
703 { # Represents an Operation resource.
704 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700705 # Google Compute Engine has three Operation resources:
706 #
707 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
708 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
710 #
711 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700712 # - For global operations, use the `globalOperations` resource.
713 # - For regional operations, use the `regionOperations` resource.
714 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700715 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700716 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
718 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
719 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
720 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
721 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
722 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700723 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700724 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
725 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
726 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700727 },
728 ],
729 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700730 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
731 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
732 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
733 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
734 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
735 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
736 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
737 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
738 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
739 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
740 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
741 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
742 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
743 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
744 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
745 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
746 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
747 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
748 {
749 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
750 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
751 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
752 {
753 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
754 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
755 },
756 ],
757 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
758 },
759 ],
760 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700761 }</pre>
762</div>
763
764<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700765 <code class="details" id="list">list(project, region, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 <pre>A list all the resource policies that have been configured for the specified project in specified region.
767
768Args:
769 project: string, Project ID for this request. (required)
770 region: string, Name of the region for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700771 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700772
Dan O'Mearadd494642020-05-01 07:42:23 -0700773For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700774
Dan O'Mearadd494642020-05-01 07:42:23 -0700775You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700776
Bu Sun Kim65020912020-05-20 12:08:20 -0700777To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
778 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
779 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
780
781You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
782
783Currently, only sorting by `name` or `creationTimestamp desc` is supported.
784 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
785 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786
787Returns:
788 An object of the form:
789
790 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700791 &quot;etag&quot;: &quot;A String&quot;,
792 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
793 &quot;items&quot;: [ # [Output Only] A list of ResourcePolicy resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700794 { # Represents a Resource Policy resource. You can use resource policies to schedule actions for some Compute Engine resources. For example, you can use them to schedule persistent disk snapshots.
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 #
796 # (== resource_for {$api_version}.resourcePolicies ==)
797 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
798 &quot;description&quot;: &quot;A String&quot;,
799 &quot;groupPlacementPolicy&quot;: { # A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation as well as network locality # Resource policy for instacnes for placement configuration.
800 &quot;availabilityDomainCount&quot;: 42, # The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network
801 &quot;collocation&quot;: &quot;A String&quot;, # Specifies network collocation
802 &quot;locality&quot;: &quot;A String&quot;, # Specifies network locality
803 &quot;style&quot;: &quot;A String&quot;, # Specifies instances to hosts placement relationship
804 &quot;vmCount&quot;: 42, # Number of vms in this placement group
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700805 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
807 &quot;kind&quot;: &quot;compute#resourcePolicy&quot;, # [Output Only] Type of the resource. Always compute#resource_policies for resource policies.
808 &quot;name&quot;: &quot;A String&quot;, # The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
809 &quot;region&quot;: &quot;A String&quot;,
810 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined fully-qualified URL for this resource.
811 &quot;selfLinkWithId&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource with the resource id.
812 &quot;snapshotSchedulePolicy&quot;: { # A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained. # Resource policy for persistent disks for creating snapshots.
813 &quot;retentionPolicy&quot;: { # Policy for retention of scheduled snapshots. # Retention policy applied to snapshots created by this resource policy.
814 &quot;maxRetentionDays&quot;: 42, # Maximum age of the snapshot that is allowed to be kept.
815 &quot;onPolicySwitch&quot;: &quot;A String&quot;, # Specifies the behavior to apply to existing, scheduled snapshots snapshots if the policy is changed.
816 &quot;onSourceDiskDelete&quot;: &quot;A String&quot;, # Specifies the behavior to apply to scheduled snapshots when the source disk is deleted.
817 },
818 &quot;schedule&quot;: { # A schedule for disks where the schedueled operations are performed. # A Vm Maintenance Policy specifies what kind of infrastructure maintenance we are allowed to perform on this VM and when. Schedule that is applied to disks covered by this policy.
819 &quot;dailySchedule&quot;: { # Time window specified for daily operations.
820 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in months. The value determines how many months pass between the start of each cycle.
821 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
822 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
823 },
824 &quot;hourlySchedule&quot;: { # Time window specified for hourly operations.
825 &quot;duration&quot;: &quot;A String&quot;, # [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.
826 &quot;hoursInCycle&quot;: 42, # Defines a schedule with units measured in hours. The value determines how many hours pass between the start of each cycle.
827 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations. It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
828 },
829 &quot;weeklySchedule&quot;: { # Time window specified for weekly operations.
830 &quot;dayOfWeeks&quot;: [ # Up to 7 intervals/windows, one for each day of the week.
831 {
832 &quot;day&quot;: &quot;A String&quot;, # Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
833 &quot;duration&quot;: &quot;A String&quot;, # [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.
834 &quot;startTime&quot;: &quot;A String&quot;, # Time within the window to start the operations. It must be in format &quot;HH:MM&quot;, where HH : [00-23] and MM : [00-00] GMT.
835 },
836 ],
837 },
838 },
839 &quot;snapshotProperties&quot;: { # Specified snapshot properties for scheduled snapshots created by this policy. # Properties with which snapshots are created such as labels, encryption keys.
840 &quot;guestFlush&quot;: True or False, # Indication to perform a &#x27;guest aware&#x27; snapshot.
841 &quot;labels&quot;: { # Labels to apply to scheduled snapshots. These can be later modified by the setLabels method. Label values may be empty.
842 &quot;a_key&quot;: &quot;A String&quot;,
843 },
844 &quot;storageLocations&quot;: [ # Cloud Storage bucket storage location of the auto snapshot (regional or multi-regional).
845 &quot;A String&quot;,
846 ],
847 },
848 },
849 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of resource policy creation.
850 &quot;vmMaintenancePolicy&quot;: { # Resource policy applicable to VMs for infrastructure maintenance.
851 &quot;concurrencyControlGroup&quot;: { # A concurrency control configuration. Defines a group config that, when attached to an instance, recognizes that instance as part of a group of instances where only up the concurrency_limit of instances in that group can undergo simultaneous maintenance. For more information: go/concurrency-control-design-doc
852 &quot;concurrencyLimit&quot;: 42,
853 },
854 &quot;maintenanceWindow&quot;: { # A maintenance window for VMs. When set, we restrict our maintenance operations to this window. # Maintenance windows that are applied to VMs covered by this policy.
855 &quot;dailyMaintenanceWindow&quot;: { # Time window specified for daily operations.
856 &quot;daysInCycle&quot;: 42, # Defines a schedule with units measured in months. The value determines how many months pass between the start of each cycle.
857 &quot;duration&quot;: &quot;A String&quot;, # [Output only] A predetermined duration for the window, automatically chosen to be the smallest possible in the given scenario.
858 &quot;startTime&quot;: &quot;A String&quot;, # Start time of the window. This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid.
859 },
860 },
861 },
862 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700863 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 &quot;kind&quot;: &quot;compute#resourcePolicyList&quot;, # [Output Only] Type of resource.Always compute#resourcePoliciesList for listsof resourcePolicies
865 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
866 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
867 &quot;warning&quot;: { # [Output Only] Informational warning message.
868 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
869 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
870 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700871 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700872 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
873 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700874 },
875 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700877 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700878 }</pre>
879</div>
880
881<div class="method">
882 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
883 <pre>Retrieves the next page of results.
884
885Args:
886 previous_request: The request for the previous page. (required)
887 previous_response: The response from the request for the previous page. (required)
888
889Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700890 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891 page. Returns None if there are no more items in the collection.
892 </pre>
893</div>
894
895<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700896 <code class="details" id="setIamPolicy">setIamPolicy(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700897 <pre>Sets the access control policy on the specified resource. Replaces any existing policy.
898
899Args:
900 project: string, Project ID for this request. (required)
901 region: string, The name of the region for this request. (required)
902 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 The object takes the form of:
905
906{
Bu Sun Kim65020912020-05-20 12:08:20 -0700907 &quot;bindings&quot;: [ # Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify bindings.
908 { # Associates `members` with a `role`.
909 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
910 #
911 # If the condition evaluates to `true`, then this binding applies to the current request.
912 #
913 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
914 #
915 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
916 #
917 # Example (Comparison):
918 #
919 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
920 #
921 # Example (Equality):
922 #
923 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
924 #
925 # Example (Logic):
926 #
927 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
928 #
929 # Example (Data Manipulation):
930 #
931 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
932 #
933 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
934 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
935 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
936 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
937 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
938 },
939 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
940 #
941 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
942 #
943 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
944 #
945 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
946 #
947 #
948 #
949 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
950 #
951 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
952 #
953 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
954 #
955 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
956 #
957 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
958 #
959 #
960 #
961 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
962 &quot;A String&quot;,
963 ],
964 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
965 },
966 ],
967 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format. Deprecated. Use &#x27;policy&#x27; to specify the etag.
968 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. The size of the policy is limited to a few 10s of KB. An empty policy is in general a valid policy but certain services (like Projects) might reject them.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700969 #
970 #
971 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700972 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700974 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700977 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700978 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700980 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700981 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700983 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700984 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700985 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700986 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
987 #
988 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
989 #
990 # Example Policy with multiple AuditConfigs:
991 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot;, } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700993 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700994 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -0700995 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700996 { # Provides the configuration for logging a type of permissions. Example:
997 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700998 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700999 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001000 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1001 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1002 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001003 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001004 &quot;ignoreChildExemptions&quot;: True or False,
1005 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001006 },
1007 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001008 &quot;exemptedMembers&quot;: [
1009 &quot;A String&quot;,
1010 ],
1011 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001012 },
1013 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001014 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001015 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001016 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1017 #
1018 # If the condition evaluates to `true`, then this binding applies to the current request.
1019 #
1020 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1021 #
1022 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1023 #
1024 # Example (Comparison):
1025 #
1026 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1027 #
1028 # Example (Equality):
1029 #
1030 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1031 #
1032 # Example (Logic):
1033 #
1034 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1035 #
1036 # Example (Data Manipulation):
1037 #
1038 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1039 #
1040 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1041 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1042 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1043 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1044 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1045 },
1046 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001047 #
1048 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1049 #
1050 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1051 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001052 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001053 #
1054 #
1055 #
1056 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1057 #
1058 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1059 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001060 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1061 #
1062 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1063 #
1064 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1065 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001066 #
1067 #
1068 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001070 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001071 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001072 },
1073 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001074 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1075 #
1076 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1077 &quot;iamOwned&quot;: True or False,
1078 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1079 { # A rule to be applied in a Policy.
1080 &quot;action&quot;: &quot;A String&quot;, # Required
1081 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1082 { # A condition to be met.
1083 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1084 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1085 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1086 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1087 &quot;values&quot;: [ # The objects of the condition.
1088 &quot;A String&quot;,
1089 ],
1090 },
1091 ],
1092 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1093 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1094 &quot;A String&quot;,
1095 ],
1096 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1097 { # Specifies what kind of log the caller must write
1098 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1099 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1100 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1101 },
1102 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1103 },
1104 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1105 #
1106 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1107 #
1108 # Field names correspond to IAM request parameters and field values are their respective values.
1109 #
1110 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1111 #
1112 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1113 &quot;customFields&quot;: [ # Custom fields.
1114 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1115 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1116 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1117 },
1118 ],
1119 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1120 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1121 },
1122 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1123 &quot;logMode&quot;: &quot;A String&quot;,
1124 },
1125 },
1126 ],
1127 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1128 &quot;A String&quot;,
1129 ],
1130 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1131 &quot;A String&quot;,
1132 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001133 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 ],
1135 &quot;version&quot;: 42, # Specifies the format of the policy.
1136 #
1137 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1138 #
1139 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1140 #
1141 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1142 #
1143 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1144 #
1145 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1146 #
1147 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1148 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001149 }
1150
1151
1152Returns:
1153 An object of the form:
1154
Dan O'Mearadd494642020-05-01 07:42:23 -07001155 { # An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001156 #
1157 #
1158 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001159 # A `Policy` is a collection of `bindings`. A `binding` binds one or more `members` to a single `role`. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001160 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001161 # For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001162 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001163 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001164 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001165 # { &quot;bindings&quot;: [ { &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;, &quot;members&quot;: [ &quot;user:mike@example.com&quot;, &quot;group:admins@example.com&quot;, &quot;domain:google.com&quot;, &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot; ] }, { &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;, &quot;members&quot;: [ &quot;user:eve@example.com&quot; ], &quot;condition&quot;: { &quot;title&quot;: &quot;expirable access&quot;, &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;, &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;, } } ], &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;, &quot;version&quot;: 3 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001166 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001167 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001168 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001169 # bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;) - etag: BwWWja0YfJA= - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001170 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001171 # For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001172 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001173 { # Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs.
1174 #
1175 # If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted.
1176 #
1177 # Example Policy with multiple AuditConfigs:
1178 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001179 # { &quot;audit_configs&quot;: [ { &quot;service&quot;: &quot;allServices&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, }, { &quot;log_type&quot;: &quot;ADMIN_READ&quot;, } ] }, { &quot;service&quot;: &quot;sampleservice.googleapis.com&quot; &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, &quot;exempted_members&quot;: [ &quot;user:aliya@example.com&quot; ] } ] } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001180 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001181 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts jose@example.com from DATA_READ logging, and aliya@example.com from DATA_WRITE logging.
Bu Sun Kim65020912020-05-20 12:08:20 -07001182 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001183 { # Provides the configuration for logging a type of permissions. Example:
1184 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001185 # { &quot;audit_log_configs&quot;: [ { &quot;log_type&quot;: &quot;DATA_READ&quot;, &quot;exempted_members&quot;: [ &quot;user:jose@example.com&quot; ] }, { &quot;log_type&quot;: &quot;DATA_WRITE&quot;, } ] }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001186 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001187 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting jose@example.com from DATA_READ logging.
1188 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of permission. Follows the same format of [Binding.members][].
1189 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001190 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001191 &quot;ignoreChildExemptions&quot;: True or False,
1192 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001193 },
1194 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001195 &quot;exemptedMembers&quot;: [
1196 &quot;A String&quot;,
1197 ],
1198 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001199 },
1200 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001201 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001202 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001203 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. # The condition that is associated with this binding.
1204 #
1205 # If the condition evaluates to `true`, then this binding applies to the current request.
1206 #
1207 # If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding.
1208 #
1209 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1210 #
1211 # Example (Comparison):
1212 #
1213 # title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot;
1214 #
1215 # Example (Equality):
1216 #
1217 # title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot;
1218 #
1219 # Example (Logic):
1220 #
1221 # title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1222 #
1223 # Example (Data Manipulation):
1224 #
1225 # title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1226 #
1227 # The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
1228 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1229 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
1230 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1231 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1232 },
1233 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource. `members` can have the following values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001234 #
1235 # * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account.
1236 #
1237 # * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account.
1238 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001239 # * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001240 #
1241 #
1242 #
1243 # * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`.
1244 #
1245 # * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
1246 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001247 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding.
1248 #
1249 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding.
1250 #
1251 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.
1252 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001253 #
1254 #
1255 # * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001256 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001257 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001258 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001259 },
1260 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001261 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
1262 #
1263 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1264 &quot;iamOwned&quot;: True or False,
1265 &quot;rules&quot;: [ # If more than one rule is specified, the rules are applied in the following manner: - All matching LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is granted. Logging will be applied if one or more matching rule requires logging. - Otherwise, if no rule applies, permission is denied.
1266 { # A rule to be applied in a Policy.
1267 &quot;action&quot;: &quot;A String&quot;, # Required
1268 &quot;conditions&quot;: [ # Additional restrictions that must be met. All conditions must pass for the rule to match.
1269 { # A condition to be met.
1270 &quot;iam&quot;: &quot;A String&quot;, # Trusted attributes supplied by the IAM system.
1271 &quot;op&quot;: &quot;A String&quot;, # An operator to apply the subject with.
1272 &quot;svc&quot;: &quot;A String&quot;, # Trusted attributes discharged by the service.
1273 &quot;sys&quot;: &quot;A String&quot;, # Trusted attributes supplied by any service that owns resources and uses the IAM system for access control.
1274 &quot;values&quot;: [ # The objects of the condition.
1275 &quot;A String&quot;,
1276 ],
1277 },
1278 ],
1279 &quot;description&quot;: &quot;A String&quot;, # Human-readable description of the rule.
1280 &quot;ins&quot;: [ # If one or more &#x27;in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1281 &quot;A String&quot;,
1282 ],
1283 &quot;logConfigs&quot;: [ # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1284 { # Specifies what kind of log the caller must write
1285 &quot;cloudAudit&quot;: { # Write a Cloud Audit log # Cloud audit options.
1286 &quot;authorizationLoggingOptions&quot;: { # Authorization-related information used by Cloud Audit Logging. # Information used by the Cloud Audit Logging pipeline.
1287 &quot;permissionType&quot;: &quot;A String&quot;, # The type of the permission that was checked.
1288 },
1289 &quot;logName&quot;: &quot;A String&quot;, # The log_name to populate in the Cloud Audit Record.
1290 },
1291 &quot;counter&quot;: { # Increment a streamz counter with the specified metric and field names. # Counter options.
1292 #
1293 # Metric names should start with a &#x27;/&#x27;, generally be lowercase-only, and end in &quot;_count&quot;. Field names should not contain an initial slash. The actual exported metric names will have &quot;/iam/policy&quot; prepended.
1294 #
1295 # Field names correspond to IAM request parameters and field values are their respective values.
1296 #
1297 # Supported field names: - &quot;authority&quot;, which is &quot;[token]&quot; if IAMContext.token is present, otherwise the value of IAMContext.authority_selector if present, and otherwise a representation of IAMContext.principal; or - &quot;iam_principal&quot;, a representation of IAMContext.principal even if a token or authority selector is present; or - &quot;&quot; (empty string), resulting in a counter with no fields.
1298 #
1299 # Examples: counter { metric: &quot;/debug_access_count&quot; field: &quot;iam_principal&quot; } ==&gt; increment counter /iam/policy/debug_access_count {iam_principal=[value of IAMContext.principal]}
1300 &quot;customFields&quot;: [ # Custom fields.
1301 { # Custom fields. These can be used to create a counter with arbitrary field/value pairs. See: go/rpcsp-custom-fields.
1302 &quot;name&quot;: &quot;A String&quot;, # Name is the field name.
1303 &quot;value&quot;: &quot;A String&quot;, # Value is the field value. It is important that in contrast to the CounterOptions.field, the value here is a constant that is not derived from the IAMContext.
1304 },
1305 ],
1306 &quot;field&quot;: &quot;A String&quot;, # The field value to attribute.
1307 &quot;metric&quot;: &quot;A String&quot;, # The metric to update.
1308 },
1309 &quot;dataAccess&quot;: { # Write a Data Access (Gin) log # Data access options.
1310 &quot;logMode&quot;: &quot;A String&quot;,
1311 },
1312 },
1313 ],
1314 &quot;notIns&quot;: [ # If one or more &#x27;not_in&#x27; clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
1315 &quot;A String&quot;,
1316 ],
1317 &quot;permissions&quot;: [ # A permission is a string of form &#x27;..&#x27; (e.g., &#x27;storage.buckets.list&#x27;). A value of &#x27;*&#x27; matches all permissions, and a verb part of &#x27;*&#x27; (e.g., &#x27;storage.buckets.*&#x27;) matches all verbs.
1318 &quot;A String&quot;,
1319 ],
1320 },
1321 ],
1322 &quot;version&quot;: 42, # Specifies the format of the policy.
1323 #
1324 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected.
1325 #
1326 # Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations:
1327 #
1328 # * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions
1329 #
1330 # **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.
1331 #
1332 # If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset.
1333 #
1334 # To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001335 }</pre>
1336</div>
1337
1338<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001339 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001340 <pre>Returns permissions that a caller has on the specified resource.
1341
1342Args:
1343 project: string, Project ID for this request. (required)
1344 region: string, The name of the region for this request. (required)
1345 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001346 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001347 The object takes the form of:
1348
1349{
Bu Sun Kim65020912020-05-20 12:08:20 -07001350 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
1351 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001352 ],
1353 }
1354
1355
1356Returns:
1357 An object of the form:
1358
1359 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001360 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1361 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001362 ],
1363 }</pre>
1364</div>
1365
1366</body></html>