blob: 5a28e3795ec652d75b2afa66737d41ca0af109e5 [file] [log] [blame]
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001<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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="servicemanagement_v1.html">Service Management API</a> . <a href="servicemanagement_v1.services.html">services</a> . <a href="servicemanagement_v1.services.consumers.html">consumers</a></h1>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040079<p class="firstline">Gets the access control policy for a resource.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040082<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040085<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
86<h3>Method Details</h3>
87<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040089 <pre>Gets the access control policy for a resource.
90Returns an empty policy if the resource exists and does not have a policy
91set.
92
93Args:
94 resource: string, REQUIRED: The resource for which the policy is being requested.
95See the operation documentation for the appropriate value for this field. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 body: object, The request body.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040097 The object takes the form of:
98
99{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700100 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
101 # `GetIamPolicy`.
102 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 #
104 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
105 # rejected.
106 #
107 # Requests for policies with any conditional bindings must specify version 3.
108 # Policies without any conditional bindings may specify any valid value or
109 # leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700110 #
111 # To learn which resources support conditions in their IAM policies, see the
112 # [IAM
113 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 },
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400115 }
116
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400117 x__xgafv: string, V1 error format.
118 Allowed values
119 1 - v1 error format
120 2 - v2 error format
121
122Returns:
123 An object of the form:
124
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 { # An Identity and Access Management (IAM) policy, which specifies access
126 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400127 #
128 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
130 # `members` to a single `role`. Members can be user accounts, service accounts,
131 # Google groups, and domains (such as G Suite). A `role` is a named list of
132 # permissions; each `role` can be an IAM predefined role or a user-created
133 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400134 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700135 # For some types of Google Cloud resources, a `binding` can also specify a
136 # `condition`, which is a logical expression that allows access to a resource
137 # only if the expression evaluates to `true`. A condition can add constraints
138 # based on attributes of the request, the resource, or both. To learn which
139 # resources support conditions in their IAM policies, see the
140 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 #
142 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400143 #
144 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700145 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400146 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
148 # &quot;members&quot;: [
149 # &quot;user:mike@example.com&quot;,
150 # &quot;group:admins@example.com&quot;,
151 # &quot;domain:google.com&quot;,
152 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400153 # ]
154 # },
155 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
157 # &quot;members&quot;: [
158 # &quot;user:eve@example.com&quot;
159 # ],
160 # &quot;condition&quot;: {
161 # &quot;title&quot;: &quot;expirable access&quot;,
162 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
163 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700164 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400165 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700166 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
168 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400169 # }
170 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700171 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 #
173 # bindings:
174 # - members:
175 # - user:mike@example.com
176 # - group:admins@example.com
177 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700178 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
179 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700180 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 # - user:eve@example.com
182 # role: roles/resourcemanager.organizationViewer
183 # condition:
184 # title: expirable access
185 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700186 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700187 # - etag: BwWWja0YfJA=
188 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400190 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
193 # prevent simultaneous updates of a policy from overwriting each other.
194 # It is strongly suggested that systems make use of the `etag` in the
195 # read-modify-write cycle to perform policy updates in order to avoid race
196 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
197 # systems are expected to put that etag in the request to `setIamPolicy` to
198 # ensure that their change will be applied to the same version of the policy.
199 #
200 # **Important:** If you use IAM Conditions, you must include the `etag` field
201 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
202 # you to overwrite a version `3` policy with a version `1` policy, and all of
203 # the conditions in the version `3` policy are lost.
204 &quot;version&quot;: 42, # Specifies the format of the policy.
205 #
206 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
207 # are rejected.
208 #
209 # Any operation that affects conditional role bindings must specify version
210 # `3`. This requirement applies to the following operations:
211 #
212 # * Getting a policy that includes a conditional role binding
213 # * Adding a conditional role binding to a policy
214 # * Changing a conditional role binding in a policy
215 # * Removing any role binding, with or without a condition, from a policy
216 # that includes conditions
217 #
218 # **Important:** If you use IAM Conditions, you must include the `etag` field
219 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
220 # you to overwrite a version `3` policy with a version `1` policy, and all of
221 # the conditions in the version `3` policy are lost.
222 #
223 # If a policy does not include any conditions, operations on that policy may
224 # specify any valid version or leave the field unset.
225 #
226 # To learn which resources support conditions in their IAM policies, see the
227 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
228 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
229 { # Specifies the audit configuration for a service.
230 # The configuration determines which permission types are logged, and what
231 # identities, if any, are exempted from logging.
232 # An AuditConfig must have one or more AuditLogConfigs.
233 #
234 # If there are AuditConfigs for both `allServices` and a specific service,
235 # the union of the two AuditConfigs is used for that service: the log_types
236 # specified in each AuditConfig are enabled, and the exempted_members in each
237 # AuditLogConfig are exempted.
238 #
239 # Example Policy with multiple AuditConfigs:
240 #
241 # {
242 # &quot;audit_configs&quot;: [
243 # {
244 # &quot;service&quot;: &quot;allServices&quot;
245 # &quot;audit_log_configs&quot;: [
246 # {
247 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
248 # &quot;exempted_members&quot;: [
249 # &quot;user:jose@example.com&quot;
250 # ]
251 # },
252 # {
253 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
254 # },
255 # {
256 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
257 # }
258 # ]
259 # },
260 # {
261 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
262 # &quot;audit_log_configs&quot;: [
263 # {
264 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
265 # },
266 # {
267 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
268 # &quot;exempted_members&quot;: [
269 # &quot;user:aliya@example.com&quot;
270 # ]
271 # }
272 # ]
273 # }
274 # ]
275 # }
276 #
277 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
278 # logging. It also exempts jose@example.com from DATA_READ logging, and
279 # aliya@example.com from DATA_WRITE logging.
280 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
281 { # Provides the configuration for logging a type of permissions.
282 # Example:
283 #
284 # {
285 # &quot;audit_log_configs&quot;: [
286 # {
287 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
288 # &quot;exempted_members&quot;: [
289 # &quot;user:jose@example.com&quot;
290 # ]
291 # },
292 # {
293 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
294 # }
295 # ]
296 # }
297 #
298 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
299 # jose@example.com from DATA_READ logging.
300 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
301 # permission.
302 # Follows the same format of Binding.members.
303 &quot;A String&quot;,
304 ],
305 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
306 },
307 ],
308 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
309 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
310 # `allServices` is a special value that covers all services.
311 },
312 ],
313 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 # `condition` that determines how and when the `bindings` are applied. Each
315 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700317 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
318 #
319 # If the condition evaluates to `true`, then this binding applies to the
320 # current request.
321 #
322 # If the condition evaluates to `false`, then this binding does not apply to
323 # the current request. However, a different role binding might grant the same
324 # role to one or more of the members in this binding.
325 #
326 # To learn which resources support conditions in their IAM policies, see the
327 # [IAM
328 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700329 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
330 # are documented at https://github.com/google/cel-spec.
331 #
332 # Example (Comparison):
333 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 # title: &quot;Summary size limit&quot;
335 # description: &quot;Determines if a summary is less than 100 chars&quot;
336 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700337 #
338 # Example (Equality):
339 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700340 # title: &quot;Requestor is owner&quot;
341 # description: &quot;Determines if requestor is the document owner&quot;
342 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700343 #
344 # Example (Logic):
345 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700346 # title: &quot;Public documents&quot;
347 # description: &quot;Determine whether the document should be publicly visible&quot;
348 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 #
350 # Example (Data Manipulation):
351 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 # title: &quot;Notification string&quot;
353 # description: &quot;Create a notification string with a timestamp.&quot;
354 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700355 #
356 # The exact variables and functions that may be referenced within an expression
357 # are determined by the service that evaluates it. See the service
358 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Dan O'Mearadd494642020-05-01 07:42:23 -0700360 # its purpose. This can be used e.g. in UIs which allow to enter the
361 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700362 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
363 # reporting, e.g. a file name and a position in the file.
364 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
365 # describes the expression, e.g. when hovered over it in a UI.
366 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
367 # syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700368 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700370 # `members` can have the following values:
371 #
372 # * `allUsers`: A special identifier that represents anyone who is
373 # on the internet; with or without a Google account.
374 #
375 # * `allAuthenticatedUsers`: A special identifier that represents anyone
376 # who is authenticated with a Google account or a service account.
377 #
378 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700379 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700380 #
381 #
382 # * `serviceAccount:{emailid}`: An email address that represents a service
383 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
384 #
385 # * `group:{emailid}`: An email address that represents a Google group.
386 # For example, `admins@example.com`.
387 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700388 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
389 # identifier) representing a user that has been recently deleted. For
390 # example, `alice@example.com?uid=123456789012345678901`. If the user is
391 # recovered, this value reverts to `user:{emailid}` and the recovered user
392 # retains the role in the binding.
393 #
394 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
395 # unique identifier) representing a service account that has been recently
396 # deleted. For example,
397 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
398 # If the service account is undeleted, this value reverts to
399 # `serviceAccount:{emailid}` and the undeleted service account retains the
400 # role in the binding.
401 #
402 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
403 # identifier) representing a Google group that has been recently
404 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
405 # the group is recovered, this value reverts to `group:{emailid}` and the
406 # recovered group retains the role in the binding.
407 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 #
409 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
410 # users of that domain. For example, `google.com` or `example.com`.
411 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700412 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700414 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
415 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 },
417 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400418 }</pre>
419</div>
420
421<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700422 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400423 <pre>Sets the access control policy on the specified resource. Replaces any
424existing policy.
425
Bu Sun Kim65020912020-05-20 12:08:20 -0700426Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Dan O'Mearadd494642020-05-01 07:42:23 -0700427
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400428Args:
429 resource: string, REQUIRED: The resource for which the policy is being specified.
430See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700431 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400432 The object takes the form of:
433
434{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -0700435 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
436 # the fields in the mask will be modified. If no mask is provided, the
437 # following default mask is used:
438 #
439 # `paths: &quot;bindings, etag&quot;`
440 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400441 # the policy is limited to a few 10s of KB. An empty policy is a
442 # valid policy but certain Cloud Platform services (such as Projects)
443 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700444 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400445 #
446 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700447 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
448 # `members` to a single `role`. Members can be user accounts, service accounts,
449 # Google groups, and domains (such as G Suite). A `role` is a named list of
450 # permissions; each `role` can be an IAM predefined role or a user-created
451 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400452 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700453 # For some types of Google Cloud resources, a `binding` can also specify a
454 # `condition`, which is a logical expression that allows access to a resource
455 # only if the expression evaluates to `true`. A condition can add constraints
456 # based on attributes of the request, the resource, or both. To learn which
457 # resources support conditions in their IAM policies, see the
458 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 #
460 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400461 #
462 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400464 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
466 # &quot;members&quot;: [
467 # &quot;user:mike@example.com&quot;,
468 # &quot;group:admins@example.com&quot;,
469 # &quot;domain:google.com&quot;,
470 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400471 # ]
472 # },
473 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700474 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
475 # &quot;members&quot;: [
476 # &quot;user:eve@example.com&quot;
477 # ],
478 # &quot;condition&quot;: {
479 # &quot;title&quot;: &quot;expirable access&quot;,
480 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
481 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400483 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700484 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700485 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
486 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400487 # }
488 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700489 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 #
491 # bindings:
492 # - members:
493 # - user:mike@example.com
494 # - group:admins@example.com
495 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700496 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
497 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700498 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700499 # - user:eve@example.com
500 # role: roles/resourcemanager.organizationViewer
501 # condition:
502 # title: expirable access
503 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700504 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700505 # - etag: BwWWja0YfJA=
506 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400508 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700509 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
511 # prevent simultaneous updates of a policy from overwriting each other.
512 # It is strongly suggested that systems make use of the `etag` in the
513 # read-modify-write cycle to perform policy updates in order to avoid race
514 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
515 # systems are expected to put that etag in the request to `setIamPolicy` to
516 # ensure that their change will be applied to the same version of the policy.
517 #
518 # **Important:** If you use IAM Conditions, you must include the `etag` field
519 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
520 # you to overwrite a version `3` policy with a version `1` policy, and all of
521 # the conditions in the version `3` policy are lost.
522 &quot;version&quot;: 42, # Specifies the format of the policy.
523 #
524 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
525 # are rejected.
526 #
527 # Any operation that affects conditional role bindings must specify version
528 # `3`. This requirement applies to the following operations:
529 #
530 # * Getting a policy that includes a conditional role binding
531 # * Adding a conditional role binding to a policy
532 # * Changing a conditional role binding in a policy
533 # * Removing any role binding, with or without a condition, from a policy
534 # that includes conditions
535 #
536 # **Important:** If you use IAM Conditions, you must include the `etag` field
537 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
538 # you to overwrite a version `3` policy with a version `1` policy, and all of
539 # the conditions in the version `3` policy are lost.
540 #
541 # If a policy does not include any conditions, operations on that policy may
542 # specify any valid version or leave the field unset.
543 #
544 # To learn which resources support conditions in their IAM policies, see the
545 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
546 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
547 { # Specifies the audit configuration for a service.
548 # The configuration determines which permission types are logged, and what
549 # identities, if any, are exempted from logging.
550 # An AuditConfig must have one or more AuditLogConfigs.
551 #
552 # If there are AuditConfigs for both `allServices` and a specific service,
553 # the union of the two AuditConfigs is used for that service: the log_types
554 # specified in each AuditConfig are enabled, and the exempted_members in each
555 # AuditLogConfig are exempted.
556 #
557 # Example Policy with multiple AuditConfigs:
558 #
559 # {
560 # &quot;audit_configs&quot;: [
561 # {
562 # &quot;service&quot;: &quot;allServices&quot;
563 # &quot;audit_log_configs&quot;: [
564 # {
565 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
566 # &quot;exempted_members&quot;: [
567 # &quot;user:jose@example.com&quot;
568 # ]
569 # },
570 # {
571 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
572 # },
573 # {
574 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
575 # }
576 # ]
577 # },
578 # {
579 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
580 # &quot;audit_log_configs&quot;: [
581 # {
582 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
583 # },
584 # {
585 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
586 # &quot;exempted_members&quot;: [
587 # &quot;user:aliya@example.com&quot;
588 # ]
589 # }
590 # ]
591 # }
592 # ]
593 # }
594 #
595 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
596 # logging. It also exempts jose@example.com from DATA_READ logging, and
597 # aliya@example.com from DATA_WRITE logging.
598 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
599 { # Provides the configuration for logging a type of permissions.
600 # Example:
601 #
602 # {
603 # &quot;audit_log_configs&quot;: [
604 # {
605 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
606 # &quot;exempted_members&quot;: [
607 # &quot;user:jose@example.com&quot;
608 # ]
609 # },
610 # {
611 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
612 # }
613 # ]
614 # }
615 #
616 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
617 # jose@example.com from DATA_READ logging.
618 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
619 # permission.
620 # Follows the same format of Binding.members.
621 &quot;A String&quot;,
622 ],
623 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
624 },
625 ],
626 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
627 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
628 # `allServices` is a special value that covers all services.
629 },
630 ],
631 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700632 # `condition` that determines how and when the `bindings` are applied. Each
633 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700635 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
636 #
637 # If the condition evaluates to `true`, then this binding applies to the
638 # current request.
639 #
640 # If the condition evaluates to `false`, then this binding does not apply to
641 # the current request. However, a different role binding might grant the same
642 # role to one or more of the members in this binding.
643 #
644 # To learn which resources support conditions in their IAM policies, see the
645 # [IAM
646 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700647 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
648 # are documented at https://github.com/google/cel-spec.
649 #
650 # Example (Comparison):
651 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 # title: &quot;Summary size limit&quot;
653 # description: &quot;Determines if a summary is less than 100 chars&quot;
654 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700655 #
656 # Example (Equality):
657 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700658 # title: &quot;Requestor is owner&quot;
659 # description: &quot;Determines if requestor is the document owner&quot;
660 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700661 #
662 # Example (Logic):
663 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700664 # title: &quot;Public documents&quot;
665 # description: &quot;Determine whether the document should be publicly visible&quot;
666 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700667 #
668 # Example (Data Manipulation):
669 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 # title: &quot;Notification string&quot;
671 # description: &quot;Create a notification string with a timestamp.&quot;
672 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700673 #
674 # The exact variables and functions that may be referenced within an expression
675 # are determined by the service that evaluates it. See the service
676 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700677 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Dan O'Mearadd494642020-05-01 07:42:23 -0700678 # its purpose. This can be used e.g. in UIs which allow to enter the
679 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700680 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
681 # reporting, e.g. a file name and a position in the file.
682 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
683 # describes the expression, e.g. when hovered over it in a UI.
684 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
685 # syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700686 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700687 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700688 # `members` can have the following values:
689 #
690 # * `allUsers`: A special identifier that represents anyone who is
691 # on the internet; with or without a Google account.
692 #
693 # * `allAuthenticatedUsers`: A special identifier that represents anyone
694 # who is authenticated with a Google account or a service account.
695 #
696 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700697 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700698 #
699 #
700 # * `serviceAccount:{emailid}`: An email address that represents a service
701 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
702 #
703 # * `group:{emailid}`: An email address that represents a Google group.
704 # For example, `admins@example.com`.
705 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700706 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
707 # identifier) representing a user that has been recently deleted. For
708 # example, `alice@example.com?uid=123456789012345678901`. If the user is
709 # recovered, this value reverts to `user:{emailid}` and the recovered user
710 # retains the role in the binding.
711 #
712 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
713 # unique identifier) representing a service account that has been recently
714 # deleted. For example,
715 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
716 # If the service account is undeleted, this value reverts to
717 # `serviceAccount:{emailid}` and the undeleted service account retains the
718 # role in the binding.
719 #
720 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
721 # identifier) representing a Google group that has been recently
722 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
723 # the group is recovered, this value reverts to `group:{emailid}` and the
724 # recovered group retains the role in the binding.
725 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700726 #
727 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
728 # users of that domain. For example, `google.com` or `example.com`.
729 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700730 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700731 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700732 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
733 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 },
735 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400736 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400737 }
738
739 x__xgafv: string, V1 error format.
740 Allowed values
741 1 - v1 error format
742 2 - v2 error format
743
744Returns:
745 An object of the form:
746
Dan O'Mearadd494642020-05-01 07:42:23 -0700747 { # An Identity and Access Management (IAM) policy, which specifies access
748 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400749 #
750 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
752 # `members` to a single `role`. Members can be user accounts, service accounts,
753 # Google groups, and domains (such as G Suite). A `role` is a named list of
754 # permissions; each `role` can be an IAM predefined role or a user-created
755 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400756 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700757 # For some types of Google Cloud resources, a `binding` can also specify a
758 # `condition`, which is a logical expression that allows access to a resource
759 # only if the expression evaluates to `true`. A condition can add constraints
760 # based on attributes of the request, the resource, or both. To learn which
761 # resources support conditions in their IAM policies, see the
762 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700763 #
764 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400765 #
766 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700767 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400768 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
770 # &quot;members&quot;: [
771 # &quot;user:mike@example.com&quot;,
772 # &quot;group:admins@example.com&quot;,
773 # &quot;domain:google.com&quot;,
774 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400775 # ]
776 # },
777 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
779 # &quot;members&quot;: [
780 # &quot;user:eve@example.com&quot;
781 # ],
782 # &quot;condition&quot;: {
783 # &quot;title&quot;: &quot;expirable access&quot;,
784 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
785 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700786 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400787 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700788 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700789 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
790 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400791 # }
792 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700793 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700794 #
795 # bindings:
796 # - members:
797 # - user:mike@example.com
798 # - group:admins@example.com
799 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700800 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
801 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700802 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700803 # - user:eve@example.com
804 # role: roles/resourcemanager.organizationViewer
805 # condition:
806 # title: expirable access
807 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700808 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700809 # - etag: BwWWja0YfJA=
810 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700811 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400812 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700813 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700814 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
815 # prevent simultaneous updates of a policy from overwriting each other.
816 # It is strongly suggested that systems make use of the `etag` in the
817 # read-modify-write cycle to perform policy updates in order to avoid race
818 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
819 # systems are expected to put that etag in the request to `setIamPolicy` to
820 # ensure that their change will be applied to the same version of the policy.
821 #
822 # **Important:** If you use IAM Conditions, you must include the `etag` field
823 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
824 # you to overwrite a version `3` policy with a version `1` policy, and all of
825 # the conditions in the version `3` policy are lost.
826 &quot;version&quot;: 42, # Specifies the format of the policy.
827 #
828 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
829 # are rejected.
830 #
831 # Any operation that affects conditional role bindings must specify version
832 # `3`. This requirement applies to the following operations:
833 #
834 # * Getting a policy that includes a conditional role binding
835 # * Adding a conditional role binding to a policy
836 # * Changing a conditional role binding in a policy
837 # * Removing any role binding, with or without a condition, from a policy
838 # that includes conditions
839 #
840 # **Important:** If you use IAM Conditions, you must include the `etag` field
841 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
842 # you to overwrite a version `3` policy with a version `1` policy, and all of
843 # the conditions in the version `3` policy are lost.
844 #
845 # If a policy does not include any conditions, operations on that policy may
846 # specify any valid version or leave the field unset.
847 #
848 # To learn which resources support conditions in their IAM policies, see the
849 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
850 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
851 { # Specifies the audit configuration for a service.
852 # The configuration determines which permission types are logged, and what
853 # identities, if any, are exempted from logging.
854 # An AuditConfig must have one or more AuditLogConfigs.
855 #
856 # If there are AuditConfigs for both `allServices` and a specific service,
857 # the union of the two AuditConfigs is used for that service: the log_types
858 # specified in each AuditConfig are enabled, and the exempted_members in each
859 # AuditLogConfig are exempted.
860 #
861 # Example Policy with multiple AuditConfigs:
862 #
863 # {
864 # &quot;audit_configs&quot;: [
865 # {
866 # &quot;service&quot;: &quot;allServices&quot;
867 # &quot;audit_log_configs&quot;: [
868 # {
869 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
870 # &quot;exempted_members&quot;: [
871 # &quot;user:jose@example.com&quot;
872 # ]
873 # },
874 # {
875 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
876 # },
877 # {
878 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
879 # }
880 # ]
881 # },
882 # {
883 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
884 # &quot;audit_log_configs&quot;: [
885 # {
886 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
887 # },
888 # {
889 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
890 # &quot;exempted_members&quot;: [
891 # &quot;user:aliya@example.com&quot;
892 # ]
893 # }
894 # ]
895 # }
896 # ]
897 # }
898 #
899 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
900 # logging. It also exempts jose@example.com from DATA_READ logging, and
901 # aliya@example.com from DATA_WRITE logging.
902 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
903 { # Provides the configuration for logging a type of permissions.
904 # Example:
905 #
906 # {
907 # &quot;audit_log_configs&quot;: [
908 # {
909 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
910 # &quot;exempted_members&quot;: [
911 # &quot;user:jose@example.com&quot;
912 # ]
913 # },
914 # {
915 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
916 # }
917 # ]
918 # }
919 #
920 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
921 # jose@example.com from DATA_READ logging.
922 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
923 # permission.
924 # Follows the same format of Binding.members.
925 &quot;A String&quot;,
926 ],
927 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
928 },
929 ],
930 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
931 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
932 # `allServices` is a special value that covers all services.
933 },
934 ],
935 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700936 # `condition` that determines how and when the `bindings` are applied. Each
937 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700938 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
940 #
941 # If the condition evaluates to `true`, then this binding applies to the
942 # current request.
943 #
944 # If the condition evaluates to `false`, then this binding does not apply to
945 # the current request. However, a different role binding might grant the same
946 # role to one or more of the members in this binding.
947 #
948 # To learn which resources support conditions in their IAM policies, see the
949 # [IAM
950 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700951 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
952 # are documented at https://github.com/google/cel-spec.
953 #
954 # Example (Comparison):
955 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700956 # title: &quot;Summary size limit&quot;
957 # description: &quot;Determines if a summary is less than 100 chars&quot;
958 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700959 #
960 # Example (Equality):
961 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700962 # title: &quot;Requestor is owner&quot;
963 # description: &quot;Determines if requestor is the document owner&quot;
964 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700965 #
966 # Example (Logic):
967 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 # title: &quot;Public documents&quot;
969 # description: &quot;Determine whether the document should be publicly visible&quot;
970 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700971 #
972 # Example (Data Manipulation):
973 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700974 # title: &quot;Notification string&quot;
975 # description: &quot;Create a notification string with a timestamp.&quot;
976 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700977 #
978 # The exact variables and functions that may be referenced within an expression
979 # are determined by the service that evaluates it. See the service
980 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700981 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Dan O'Mearadd494642020-05-01 07:42:23 -0700982 # its purpose. This can be used e.g. in UIs which allow to enter the
983 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700984 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
985 # reporting, e.g. a file name and a position in the file.
986 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
987 # describes the expression, e.g. when hovered over it in a UI.
988 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
989 # syntax.
Dan O'Mearadd494642020-05-01 07:42:23 -0700990 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700991 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700992 # `members` can have the following values:
993 #
994 # * `allUsers`: A special identifier that represents anyone who is
995 # on the internet; with or without a Google account.
996 #
997 # * `allAuthenticatedUsers`: A special identifier that represents anyone
998 # who is authenticated with a Google account or a service account.
999 #
1000 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001001 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001002 #
1003 #
1004 # * `serviceAccount:{emailid}`: An email address that represents a service
1005 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1006 #
1007 # * `group:{emailid}`: An email address that represents a Google group.
1008 # For example, `admins@example.com`.
1009 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001010 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1011 # identifier) representing a user that has been recently deleted. For
1012 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1013 # recovered, this value reverts to `user:{emailid}` and the recovered user
1014 # retains the role in the binding.
1015 #
1016 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1017 # unique identifier) representing a service account that has been recently
1018 # deleted. For example,
1019 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1020 # If the service account is undeleted, this value reverts to
1021 # `serviceAccount:{emailid}` and the undeleted service account retains the
1022 # role in the binding.
1023 #
1024 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1025 # identifier) representing a Google group that has been recently
1026 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1027 # the group is recovered, this value reverts to `group:{emailid}` and the
1028 # recovered group retains the role in the binding.
1029 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001030 #
1031 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1032 # users of that domain. For example, `google.com` or `example.com`.
1033 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001035 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001036 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1037 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001038 },
1039 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001040 }</pre>
1041</div>
1042
1043<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001044 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001045 <pre>Returns permissions that a caller has on the specified resource.
1046If the resource does not exist, this will return an empty set of
Bu Sun Kim65020912020-05-20 12:08:20 -07001047permissions, not a `NOT_FOUND` error.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001048
1049Note: This operation is designed to be used for building permission-aware
1050UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07001051may &quot;fail open&quot; without warning.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001052
1053Args:
1054 resource: string, REQUIRED: The resource for which the policy detail is being requested.
1055See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001056 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001057 The object takes the form of:
1058
1059{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001060 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
1061 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001062 # information see
1063 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001065 ],
1066 }
1067
1068 x__xgafv: string, V1 error format.
1069 Allowed values
1070 1 - v1 error format
1071 2 - v2 error format
1072
1073Returns:
1074 An object of the form:
1075
1076 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001077 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001078 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001079 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001080 ],
1081 }</pre>
1082</div>
1083
1084</body></html>