blob: 6ed91e1adb9c8321e0d5788912081ecef1221830 [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 Kim4ed7d3f2020-05-27 12:20:54 -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;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
205 # `condition` that determines how and when the `bindings` are applied. Each
206 # of the `bindings` must contain at least one member.
207 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700208 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
209 #
210 # If the condition evaluates to `true`, then this binding applies to the
211 # current request.
212 #
213 # If the condition evaluates to `false`, then this binding does not apply to
214 # the current request. However, a different role binding might grant the same
215 # role to one or more of the members in this binding.
216 #
217 # To learn which resources support conditions in their IAM policies, see the
218 # [IAM
219 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
220 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
221 # are documented at https://github.com/google/cel-spec.
222 #
223 # Example (Comparison):
224 #
225 # title: &quot;Summary size limit&quot;
226 # description: &quot;Determines if a summary is less than 100 chars&quot;
227 # expression: &quot;document.summary.size() &lt; 100&quot;
228 #
229 # Example (Equality):
230 #
231 # title: &quot;Requestor is owner&quot;
232 # description: &quot;Determines if requestor is the document owner&quot;
233 # expression: &quot;document.owner == request.auth.claims.email&quot;
234 #
235 # Example (Logic):
236 #
237 # title: &quot;Public documents&quot;
238 # description: &quot;Determine whether the document should be publicly visible&quot;
239 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
240 #
241 # Example (Data Manipulation):
242 #
243 # title: &quot;Notification string&quot;
244 # description: &quot;Create a notification string with a timestamp.&quot;
245 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
246 #
247 # The exact variables and functions that may be referenced within an expression
248 # are determined by the service that evaluates it. See the service
249 # documentation for additional information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700250 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
251 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700252 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
253 # reporting, e.g. a file name and a position in the file.
254 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
255 # its purpose. This can be used e.g. in UIs which allow to enter the
256 # expression.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700257 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
258 # syntax.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700259 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700260 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
261 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700262 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
263 # `members` can have the following values:
264 #
265 # * `allUsers`: A special identifier that represents anyone who is
266 # on the internet; with or without a Google account.
267 #
268 # * `allAuthenticatedUsers`: A special identifier that represents anyone
269 # who is authenticated with a Google account or a service account.
270 #
271 # * `user:{emailid}`: An email address that represents a specific Google
272 # account. For example, `alice@example.com` .
273 #
274 #
275 # * `serviceAccount:{emailid}`: An email address that represents a service
276 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
277 #
278 # * `group:{emailid}`: An email address that represents a Google group.
279 # For example, `admins@example.com`.
280 #
281 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
282 # identifier) representing a user that has been recently deleted. For
283 # example, `alice@example.com?uid=123456789012345678901`. If the user is
284 # recovered, this value reverts to `user:{emailid}` and the recovered user
285 # retains the role in the binding.
286 #
287 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
288 # unique identifier) representing a service account that has been recently
289 # deleted. For example,
290 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
291 # If the service account is undeleted, this value reverts to
292 # `serviceAccount:{emailid}` and the undeleted service account retains the
293 # role in the binding.
294 #
295 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
296 # identifier) representing a Google group that has been recently
297 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
298 # the group is recovered, this value reverts to `group:{emailid}` and the
299 # recovered group retains the role in the binding.
300 #
301 #
302 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
303 # users of that domain. For example, `google.com` or `example.com`.
304 #
305 &quot;A String&quot;,
306 ],
307 },
308 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700309 &quot;version&quot;: 42, # Specifies the format of the policy.
310 #
311 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
312 # are rejected.
313 #
314 # Any operation that affects conditional role bindings must specify version
315 # `3`. This requirement applies to the following operations:
316 #
317 # * Getting a policy that includes a conditional role binding
318 # * Adding a conditional role binding to a policy
319 # * Changing a conditional role binding in a policy
320 # * Removing any role binding, with or without a condition, from a policy
321 # that includes conditions
322 #
323 # **Important:** If you use IAM Conditions, you must include the `etag` field
324 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
325 # you to overwrite a version `3` policy with a version `1` policy, and all of
326 # the conditions in the version `3` policy are lost.
327 #
328 # If a policy does not include any conditions, operations on that policy may
329 # specify any valid version or leave the field unset.
330 #
331 # To learn which resources support conditions in their IAM policies, see the
332 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700333 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
334 { # Specifies the audit configuration for a service.
335 # The configuration determines which permission types are logged, and what
336 # identities, if any, are exempted from logging.
337 # An AuditConfig must have one or more AuditLogConfigs.
338 #
339 # If there are AuditConfigs for both `allServices` and a specific service,
340 # the union of the two AuditConfigs is used for that service: the log_types
341 # specified in each AuditConfig are enabled, and the exempted_members in each
342 # AuditLogConfig are exempted.
343 #
344 # Example Policy with multiple AuditConfigs:
345 #
346 # {
347 # &quot;audit_configs&quot;: [
348 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700349 # &quot;service&quot;: &quot;allServices&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 # &quot;audit_log_configs&quot;: [
351 # {
352 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
353 # &quot;exempted_members&quot;: [
354 # &quot;user:jose@example.com&quot;
355 # ]
356 # },
357 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700358 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 # },
360 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700361 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700362 # }
363 # ]
364 # },
365 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700366 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700367 # &quot;audit_log_configs&quot;: [
368 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700369 # &quot;log_type&quot;: &quot;DATA_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700370 # },
371 # {
372 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
373 # &quot;exempted_members&quot;: [
374 # &quot;user:aliya@example.com&quot;
375 # ]
376 # }
377 # ]
378 # }
379 # ]
380 # }
381 #
382 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
383 # logging. It also exempts jose@example.com from DATA_READ logging, and
384 # aliya@example.com from DATA_WRITE logging.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700385 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
386 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
387 # `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -0700388 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
389 { # Provides the configuration for logging a type of permissions.
390 # Example:
391 #
392 # {
393 # &quot;audit_log_configs&quot;: [
394 # {
395 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
396 # &quot;exempted_members&quot;: [
397 # &quot;user:jose@example.com&quot;
398 # ]
399 # },
400 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700401 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700402 # }
403 # ]
404 # }
405 #
406 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
407 # jose@example.com from DATA_READ logging.
408 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
409 # permission.
410 # Follows the same format of Binding.members.
411 &quot;A String&quot;,
412 ],
413 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
414 },
415 ],
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 Kimd059ad82020-07-22 17:02:09 -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;`
Bu Sun Kim65020912020-05-20 12:08:20 -0700440 &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 Kim4ed7d3f2020-05-27 12:20:54 -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;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
523 # `condition` that determines how and when the `bindings` are applied. Each
524 # of the `bindings` must contain at least one member.
525 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700526 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
527 #
528 # If the condition evaluates to `true`, then this binding applies to the
529 # current request.
530 #
531 # If the condition evaluates to `false`, then this binding does not apply to
532 # the current request. However, a different role binding might grant the same
533 # role to one or more of the members in this binding.
534 #
535 # To learn which resources support conditions in their IAM policies, see the
536 # [IAM
537 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
538 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
539 # are documented at https://github.com/google/cel-spec.
540 #
541 # Example (Comparison):
542 #
543 # title: &quot;Summary size limit&quot;
544 # description: &quot;Determines if a summary is less than 100 chars&quot;
545 # expression: &quot;document.summary.size() &lt; 100&quot;
546 #
547 # Example (Equality):
548 #
549 # title: &quot;Requestor is owner&quot;
550 # description: &quot;Determines if requestor is the document owner&quot;
551 # expression: &quot;document.owner == request.auth.claims.email&quot;
552 #
553 # Example (Logic):
554 #
555 # title: &quot;Public documents&quot;
556 # description: &quot;Determine whether the document should be publicly visible&quot;
557 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
558 #
559 # Example (Data Manipulation):
560 #
561 # title: &quot;Notification string&quot;
562 # description: &quot;Create a notification string with a timestamp.&quot;
563 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
564 #
565 # The exact variables and functions that may be referenced within an expression
566 # are determined by the service that evaluates it. See the service
567 # documentation for additional information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700568 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
569 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700570 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
571 # reporting, e.g. a file name and a position in the file.
572 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
573 # its purpose. This can be used e.g. in UIs which allow to enter the
574 # expression.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700575 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
576 # syntax.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700577 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700578 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
579 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700580 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
581 # `members` can have the following values:
582 #
583 # * `allUsers`: A special identifier that represents anyone who is
584 # on the internet; with or without a Google account.
585 #
586 # * `allAuthenticatedUsers`: A special identifier that represents anyone
587 # who is authenticated with a Google account or a service account.
588 #
589 # * `user:{emailid}`: An email address that represents a specific Google
590 # account. For example, `alice@example.com` .
591 #
592 #
593 # * `serviceAccount:{emailid}`: An email address that represents a service
594 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
595 #
596 # * `group:{emailid}`: An email address that represents a Google group.
597 # For example, `admins@example.com`.
598 #
599 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
600 # identifier) representing a user that has been recently deleted. For
601 # example, `alice@example.com?uid=123456789012345678901`. If the user is
602 # recovered, this value reverts to `user:{emailid}` and the recovered user
603 # retains the role in the binding.
604 #
605 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
606 # unique identifier) representing a service account that has been recently
607 # deleted. For example,
608 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
609 # If the service account is undeleted, this value reverts to
610 # `serviceAccount:{emailid}` and the undeleted service account retains the
611 # role in the binding.
612 #
613 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
614 # identifier) representing a Google group that has been recently
615 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
616 # the group is recovered, this value reverts to `group:{emailid}` and the
617 # recovered group retains the role in the binding.
618 #
619 #
620 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
621 # users of that domain. For example, `google.com` or `example.com`.
622 #
623 &quot;A String&quot;,
624 ],
625 },
626 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700627 &quot;version&quot;: 42, # Specifies the format of the policy.
628 #
629 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
630 # are rejected.
631 #
632 # Any operation that affects conditional role bindings must specify version
633 # `3`. This requirement applies to the following operations:
634 #
635 # * Getting a policy that includes a conditional role binding
636 # * Adding a conditional role binding to a policy
637 # * Changing a conditional role binding in a policy
638 # * Removing any role binding, with or without a condition, from a policy
639 # that includes conditions
640 #
641 # **Important:** If you use IAM Conditions, you must include the `etag` field
642 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
643 # you to overwrite a version `3` policy with a version `1` policy, and all of
644 # the conditions in the version `3` policy are lost.
645 #
646 # If a policy does not include any conditions, operations on that policy may
647 # specify any valid version or leave the field unset.
648 #
649 # To learn which resources support conditions in their IAM policies, see the
650 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700651 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
652 { # Specifies the audit configuration for a service.
653 # The configuration determines which permission types are logged, and what
654 # identities, if any, are exempted from logging.
655 # An AuditConfig must have one or more AuditLogConfigs.
656 #
657 # If there are AuditConfigs for both `allServices` and a specific service,
658 # the union of the two AuditConfigs is used for that service: the log_types
659 # specified in each AuditConfig are enabled, and the exempted_members in each
660 # AuditLogConfig are exempted.
661 #
662 # Example Policy with multiple AuditConfigs:
663 #
664 # {
665 # &quot;audit_configs&quot;: [
666 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700667 # &quot;service&quot;: &quot;allServices&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700668 # &quot;audit_log_configs&quot;: [
669 # {
670 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
671 # &quot;exempted_members&quot;: [
672 # &quot;user:jose@example.com&quot;
673 # ]
674 # },
675 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700676 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700677 # },
678 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700679 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700680 # }
681 # ]
682 # },
683 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700684 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700685 # &quot;audit_log_configs&quot;: [
686 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700687 # &quot;log_type&quot;: &quot;DATA_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 # },
689 # {
690 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
691 # &quot;exempted_members&quot;: [
692 # &quot;user:aliya@example.com&quot;
693 # ]
694 # }
695 # ]
696 # }
697 # ]
698 # }
699 #
700 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
701 # logging. It also exempts jose@example.com from DATA_READ logging, and
702 # aliya@example.com from DATA_WRITE logging.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700703 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
704 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
705 # `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -0700706 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
707 { # Provides the configuration for logging a type of permissions.
708 # Example:
709 #
710 # {
711 # &quot;audit_log_configs&quot;: [
712 # {
713 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
714 # &quot;exempted_members&quot;: [
715 # &quot;user:jose@example.com&quot;
716 # ]
717 # },
718 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700719 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 # }
721 # ]
722 # }
723 #
724 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
725 # jose@example.com from DATA_READ logging.
726 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
727 # permission.
728 # Follows the same format of Binding.members.
729 &quot;A String&quot;,
730 ],
731 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
732 },
733 ],
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 Kim4ed7d3f2020-05-27 12:20:54 -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;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
827 # `condition` that determines how and when the `bindings` are applied. Each
828 # of the `bindings` must contain at least one member.
829 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700830 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
831 #
832 # If the condition evaluates to `true`, then this binding applies to the
833 # current request.
834 #
835 # If the condition evaluates to `false`, then this binding does not apply to
836 # the current request. However, a different role binding might grant the same
837 # role to one or more of the members in this binding.
838 #
839 # To learn which resources support conditions in their IAM policies, see the
840 # [IAM
841 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
842 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
843 # are documented at https://github.com/google/cel-spec.
844 #
845 # Example (Comparison):
846 #
847 # title: &quot;Summary size limit&quot;
848 # description: &quot;Determines if a summary is less than 100 chars&quot;
849 # expression: &quot;document.summary.size() &lt; 100&quot;
850 #
851 # Example (Equality):
852 #
853 # title: &quot;Requestor is owner&quot;
854 # description: &quot;Determines if requestor is the document owner&quot;
855 # expression: &quot;document.owner == request.auth.claims.email&quot;
856 #
857 # Example (Logic):
858 #
859 # title: &quot;Public documents&quot;
860 # description: &quot;Determine whether the document should be publicly visible&quot;
861 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
862 #
863 # Example (Data Manipulation):
864 #
865 # title: &quot;Notification string&quot;
866 # description: &quot;Create a notification string with a timestamp.&quot;
867 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
868 #
869 # The exact variables and functions that may be referenced within an expression
870 # are determined by the service that evaluates it. See the service
871 # documentation for additional information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700872 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
873 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700874 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
875 # reporting, e.g. a file name and a position in the file.
876 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
877 # its purpose. This can be used e.g. in UIs which allow to enter the
878 # expression.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700879 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
880 # syntax.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700881 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700882 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
883 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700884 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
885 # `members` can have the following values:
886 #
887 # * `allUsers`: A special identifier that represents anyone who is
888 # on the internet; with or without a Google account.
889 #
890 # * `allAuthenticatedUsers`: A special identifier that represents anyone
891 # who is authenticated with a Google account or a service account.
892 #
893 # * `user:{emailid}`: An email address that represents a specific Google
894 # account. For example, `alice@example.com` .
895 #
896 #
897 # * `serviceAccount:{emailid}`: An email address that represents a service
898 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
899 #
900 # * `group:{emailid}`: An email address that represents a Google group.
901 # For example, `admins@example.com`.
902 #
903 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
904 # identifier) representing a user that has been recently deleted. For
905 # example, `alice@example.com?uid=123456789012345678901`. If the user is
906 # recovered, this value reverts to `user:{emailid}` and the recovered user
907 # retains the role in the binding.
908 #
909 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
910 # unique identifier) representing a service account that has been recently
911 # deleted. For example,
912 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
913 # If the service account is undeleted, this value reverts to
914 # `serviceAccount:{emailid}` and the undeleted service account retains the
915 # role in the binding.
916 #
917 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
918 # identifier) representing a Google group that has been recently
919 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
920 # the group is recovered, this value reverts to `group:{emailid}` and the
921 # recovered group retains the role in the binding.
922 #
923 #
924 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
925 # users of that domain. For example, `google.com` or `example.com`.
926 #
927 &quot;A String&quot;,
928 ],
929 },
930 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700931 &quot;version&quot;: 42, # Specifies the format of the policy.
932 #
933 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
934 # are rejected.
935 #
936 # Any operation that affects conditional role bindings must specify version
937 # `3`. This requirement applies to the following operations:
938 #
939 # * Getting a policy that includes a conditional role binding
940 # * Adding a conditional role binding to a policy
941 # * Changing a conditional role binding in a policy
942 # * Removing any role binding, with or without a condition, from a policy
943 # that includes conditions
944 #
945 # **Important:** If you use IAM Conditions, you must include the `etag` field
946 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
947 # you to overwrite a version `3` policy with a version `1` policy, and all of
948 # the conditions in the version `3` policy are lost.
949 #
950 # If a policy does not include any conditions, operations on that policy may
951 # specify any valid version or leave the field unset.
952 #
953 # To learn which resources support conditions in their IAM policies, see the
954 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700955 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
956 { # Specifies the audit configuration for a service.
957 # The configuration determines which permission types are logged, and what
958 # identities, if any, are exempted from logging.
959 # An AuditConfig must have one or more AuditLogConfigs.
960 #
961 # If there are AuditConfigs for both `allServices` and a specific service,
962 # the union of the two AuditConfigs is used for that service: the log_types
963 # specified in each AuditConfig are enabled, and the exempted_members in each
964 # AuditLogConfig are exempted.
965 #
966 # Example Policy with multiple AuditConfigs:
967 #
968 # {
969 # &quot;audit_configs&quot;: [
970 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700971 # &quot;service&quot;: &quot;allServices&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700972 # &quot;audit_log_configs&quot;: [
973 # {
974 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
975 # &quot;exempted_members&quot;: [
976 # &quot;user:jose@example.com&quot;
977 # ]
978 # },
979 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700980 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700981 # },
982 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700983 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700984 # }
985 # ]
986 # },
987 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700988 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700989 # &quot;audit_log_configs&quot;: [
990 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700991 # &quot;log_type&quot;: &quot;DATA_READ&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 # },
993 # {
994 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
995 # &quot;exempted_members&quot;: [
996 # &quot;user:aliya@example.com&quot;
997 # ]
998 # }
999 # ]
1000 # }
1001 # ]
1002 # }
1003 #
1004 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1005 # logging. It also exempts jose@example.com from DATA_READ logging, and
1006 # aliya@example.com from DATA_WRITE logging.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001007 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1008 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1009 # `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -07001010 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1011 { # Provides the configuration for logging a type of permissions.
1012 # Example:
1013 #
1014 # {
1015 # &quot;audit_log_configs&quot;: [
1016 # {
1017 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1018 # &quot;exempted_members&quot;: [
1019 # &quot;user:jose@example.com&quot;
1020 # ]
1021 # },
1022 # {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001023 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 # }
1025 # ]
1026 # }
1027 #
1028 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1029 # jose@example.com from DATA_READ logging.
1030 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1031 # permission.
1032 # Follows the same format of Binding.members.
1033 &quot;A String&quot;,
1034 ],
1035 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1036 },
1037 ],
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>