blob: b3e80e3382b06ce27ba21d2b1b3ba6680001b17f [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;version&quot;: 42, # Specifies the format of the policy.
193 #
194 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
195 # are rejected.
196 #
197 # Any operation that affects conditional role bindings must specify version
198 # `3`. This requirement applies to the following operations:
199 #
200 # * Getting a policy that includes a conditional role binding
201 # * Adding a conditional role binding to a policy
202 # * Changing a conditional role binding in a policy
203 # * Removing any role binding, with or without a condition, from a policy
204 # that includes conditions
205 #
206 # **Important:** If you use IAM Conditions, you must include the `etag` field
207 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
208 # you to overwrite a version `3` policy with a version `1` policy, and all of
209 # the conditions in the version `3` policy are lost.
210 #
211 # If a policy does not include any conditions, operations on that policy may
212 # specify any valid version or leave the field unset.
213 #
214 # To learn which resources support conditions in their IAM policies, see the
215 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700216 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
217 # prevent simultaneous updates of a policy from overwriting each other.
218 # It is strongly suggested that systems make use of the `etag` in the
219 # read-modify-write cycle to perform policy updates in order to avoid race
220 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
221 # systems are expected to put that etag in the request to `setIamPolicy` to
222 # ensure that their change will be applied to the same version of the policy.
223 #
224 # **Important:** If you use IAM Conditions, you must include the `etag` field
225 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
226 # you to overwrite a version `3` policy with a version `1` policy, and all of
227 # the conditions in the version `3` policy are lost.
228 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
229 # `condition` that determines how and when the `bindings` are applied. Each
230 # of the `bindings` must contain at least one member.
231 { # Associates `members` with a `role`.
232 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
233 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
234 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
235 #
236 # If the condition evaluates to `true`, then this binding applies to the
237 # current request.
238 #
239 # If the condition evaluates to `false`, then this binding does not apply to
240 # the current request. However, a different role binding might grant the same
241 # role to one or more of the members in this binding.
242 #
243 # To learn which resources support conditions in their IAM policies, see the
244 # [IAM
245 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
246 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
247 # are documented at https://github.com/google/cel-spec.
248 #
249 # Example (Comparison):
250 #
251 # title: &quot;Summary size limit&quot;
252 # description: &quot;Determines if a summary is less than 100 chars&quot;
253 # expression: &quot;document.summary.size() &lt; 100&quot;
254 #
255 # Example (Equality):
256 #
257 # title: &quot;Requestor is owner&quot;
258 # description: &quot;Determines if requestor is the document owner&quot;
259 # expression: &quot;document.owner == request.auth.claims.email&quot;
260 #
261 # Example (Logic):
262 #
263 # title: &quot;Public documents&quot;
264 # description: &quot;Determine whether the document should be publicly visible&quot;
265 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
266 #
267 # Example (Data Manipulation):
268 #
269 # title: &quot;Notification string&quot;
270 # description: &quot;Create a notification string with a timestamp.&quot;
271 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
272 #
273 # The exact variables and functions that may be referenced within an expression
274 # are determined by the service that evaluates it. See the service
275 # documentation for additional information.
276 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
277 # syntax.
278 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
279 # reporting, e.g. a file name and a position in the file.
280 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
281 # its purpose. This can be used e.g. in UIs which allow to enter the
282 # expression.
283 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
284 # describes the expression, e.g. when hovered over it in a UI.
285 },
286 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
287 # `members` can have the following values:
288 #
289 # * `allUsers`: A special identifier that represents anyone who is
290 # on the internet; with or without a Google account.
291 #
292 # * `allAuthenticatedUsers`: A special identifier that represents anyone
293 # who is authenticated with a Google account or a service account.
294 #
295 # * `user:{emailid}`: An email address that represents a specific Google
296 # account. For example, `alice@example.com` .
297 #
298 #
299 # * `serviceAccount:{emailid}`: An email address that represents a service
300 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
301 #
302 # * `group:{emailid}`: An email address that represents a Google group.
303 # For example, `admins@example.com`.
304 #
305 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
306 # identifier) representing a user that has been recently deleted. For
307 # example, `alice@example.com?uid=123456789012345678901`. If the user is
308 # recovered, this value reverts to `user:{emailid}` and the recovered user
309 # retains the role in the binding.
310 #
311 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
312 # unique identifier) representing a service account that has been recently
313 # deleted. For example,
314 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
315 # If the service account is undeleted, this value reverts to
316 # `serviceAccount:{emailid}` and the undeleted service account retains the
317 # role in the binding.
318 #
319 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
320 # identifier) representing a Google group that has been recently
321 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
322 # the group is recovered, this value reverts to `group:{emailid}` and the
323 # recovered group retains the role in the binding.
324 #
325 #
326 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
327 # users of that domain. For example, `google.com` or `example.com`.
328 #
329 &quot;A String&quot;,
330 ],
331 },
332 ],
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 # {
349 # &quot;service&quot;: &quot;allServices&quot;
350 # &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 # {
358 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
359 # },
360 # {
361 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
362 # }
363 # ]
364 # },
365 # {
366 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
367 # &quot;audit_log_configs&quot;: [
368 # {
369 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
370 # },
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 # {
401 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
402 # }
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 Kim65020912020-05-20 12:08:20 -0700435 &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 -0400436 # the policy is limited to a few 10s of KB. An empty policy is a
437 # valid policy but certain Cloud Platform services (such as Projects)
438 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700439 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400440 #
441 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700442 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
443 # `members` to a single `role`. Members can be user accounts, service accounts,
444 # Google groups, and domains (such as G Suite). A `role` is a named list of
445 # permissions; each `role` can be an IAM predefined role or a user-created
446 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400447 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 # For some types of Google Cloud resources, a `binding` can also specify a
449 # `condition`, which is a logical expression that allows access to a resource
450 # only if the expression evaluates to `true`. A condition can add constraints
451 # based on attributes of the request, the resource, or both. To learn which
452 # resources support conditions in their IAM policies, see the
453 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700454 #
455 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400456 #
457 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700458 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400459 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
461 # &quot;members&quot;: [
462 # &quot;user:mike@example.com&quot;,
463 # &quot;group:admins@example.com&quot;,
464 # &quot;domain:google.com&quot;,
465 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400466 # ]
467 # },
468 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700469 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
470 # &quot;members&quot;: [
471 # &quot;user:eve@example.com&quot;
472 # ],
473 # &quot;condition&quot;: {
474 # &quot;title&quot;: &quot;expirable access&quot;,
475 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
476 # &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 -0700477 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400478 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700479 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700480 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
481 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400482 # }
483 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700484 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700485 #
486 # bindings:
487 # - members:
488 # - user:mike@example.com
489 # - group:admins@example.com
490 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700491 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
492 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700493 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 # - user:eve@example.com
495 # role: roles/resourcemanager.organizationViewer
496 # condition:
497 # title: expirable access
498 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700500 # - etag: BwWWja0YfJA=
501 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700502 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400503 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700504 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 &quot;version&quot;: 42, # Specifies the format of the policy.
506 #
507 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
508 # are rejected.
509 #
510 # Any operation that affects conditional role bindings must specify version
511 # `3`. This requirement applies to the following operations:
512 #
513 # * Getting a policy that includes a conditional role binding
514 # * Adding a conditional role binding to a policy
515 # * Changing a conditional role binding in a policy
516 # * Removing any role binding, with or without a condition, from a policy
517 # that includes conditions
518 #
519 # **Important:** If you use IAM Conditions, you must include the `etag` field
520 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
521 # you to overwrite a version `3` policy with a version `1` policy, and all of
522 # the conditions in the version `3` policy are lost.
523 #
524 # If a policy does not include any conditions, operations on that policy may
525 # specify any valid version or leave the field unset.
526 #
527 # To learn which resources support conditions in their IAM policies, see the
528 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700529 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
530 # prevent simultaneous updates of a policy from overwriting each other.
531 # It is strongly suggested that systems make use of the `etag` in the
532 # read-modify-write cycle to perform policy updates in order to avoid race
533 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
534 # systems are expected to put that etag in the request to `setIamPolicy` to
535 # ensure that their change will be applied to the same version of the policy.
536 #
537 # **Important:** If you use IAM Conditions, you must include the `etag` field
538 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
539 # you to overwrite a version `3` policy with a version `1` policy, and all of
540 # the conditions in the version `3` policy are lost.
541 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
542 # `condition` that determines how and when the `bindings` are applied. Each
543 # of the `bindings` must contain at least one member.
544 { # Associates `members` with a `role`.
545 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
546 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
547 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
548 #
549 # If the condition evaluates to `true`, then this binding applies to the
550 # current request.
551 #
552 # If the condition evaluates to `false`, then this binding does not apply to
553 # the current request. However, a different role binding might grant the same
554 # role to one or more of the members in this binding.
555 #
556 # To learn which resources support conditions in their IAM policies, see the
557 # [IAM
558 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
559 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
560 # are documented at https://github.com/google/cel-spec.
561 #
562 # Example (Comparison):
563 #
564 # title: &quot;Summary size limit&quot;
565 # description: &quot;Determines if a summary is less than 100 chars&quot;
566 # expression: &quot;document.summary.size() &lt; 100&quot;
567 #
568 # Example (Equality):
569 #
570 # title: &quot;Requestor is owner&quot;
571 # description: &quot;Determines if requestor is the document owner&quot;
572 # expression: &quot;document.owner == request.auth.claims.email&quot;
573 #
574 # Example (Logic):
575 #
576 # title: &quot;Public documents&quot;
577 # description: &quot;Determine whether the document should be publicly visible&quot;
578 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
579 #
580 # Example (Data Manipulation):
581 #
582 # title: &quot;Notification string&quot;
583 # description: &quot;Create a notification string with a timestamp.&quot;
584 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
585 #
586 # The exact variables and functions that may be referenced within an expression
587 # are determined by the service that evaluates it. See the service
588 # documentation for additional information.
589 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
590 # syntax.
591 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
592 # reporting, e.g. a file name and a position in the file.
593 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
594 # its purpose. This can be used e.g. in UIs which allow to enter the
595 # expression.
596 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
597 # describes the expression, e.g. when hovered over it in a UI.
598 },
599 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
600 # `members` can have the following values:
601 #
602 # * `allUsers`: A special identifier that represents anyone who is
603 # on the internet; with or without a Google account.
604 #
605 # * `allAuthenticatedUsers`: A special identifier that represents anyone
606 # who is authenticated with a Google account or a service account.
607 #
608 # * `user:{emailid}`: An email address that represents a specific Google
609 # account. For example, `alice@example.com` .
610 #
611 #
612 # * `serviceAccount:{emailid}`: An email address that represents a service
613 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
614 #
615 # * `group:{emailid}`: An email address that represents a Google group.
616 # For example, `admins@example.com`.
617 #
618 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
619 # identifier) representing a user that has been recently deleted. For
620 # example, `alice@example.com?uid=123456789012345678901`. If the user is
621 # recovered, this value reverts to `user:{emailid}` and the recovered user
622 # retains the role in the binding.
623 #
624 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
625 # unique identifier) representing a service account that has been recently
626 # deleted. For example,
627 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
628 # If the service account is undeleted, this value reverts to
629 # `serviceAccount:{emailid}` and the undeleted service account retains the
630 # role in the binding.
631 #
632 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
633 # identifier) representing a Google group that has been recently
634 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
635 # the group is recovered, this value reverts to `group:{emailid}` and the
636 # recovered group retains the role in the binding.
637 #
638 #
639 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
640 # users of that domain. For example, `google.com` or `example.com`.
641 #
642 &quot;A String&quot;,
643 ],
644 },
645 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
647 { # Specifies the audit configuration for a service.
648 # The configuration determines which permission types are logged, and what
649 # identities, if any, are exempted from logging.
650 # An AuditConfig must have one or more AuditLogConfigs.
651 #
652 # If there are AuditConfigs for both `allServices` and a specific service,
653 # the union of the two AuditConfigs is used for that service: the log_types
654 # specified in each AuditConfig are enabled, and the exempted_members in each
655 # AuditLogConfig are exempted.
656 #
657 # Example Policy with multiple AuditConfigs:
658 #
659 # {
660 # &quot;audit_configs&quot;: [
661 # {
662 # &quot;service&quot;: &quot;allServices&quot;
663 # &quot;audit_log_configs&quot;: [
664 # {
665 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
666 # &quot;exempted_members&quot;: [
667 # &quot;user:jose@example.com&quot;
668 # ]
669 # },
670 # {
671 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
672 # },
673 # {
674 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
675 # }
676 # ]
677 # },
678 # {
679 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
680 # &quot;audit_log_configs&quot;: [
681 # {
682 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
683 # },
684 # {
685 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
686 # &quot;exempted_members&quot;: [
687 # &quot;user:aliya@example.com&quot;
688 # ]
689 # }
690 # ]
691 # }
692 # ]
693 # }
694 #
695 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
696 # logging. It also exempts jose@example.com from DATA_READ logging, and
697 # aliya@example.com from DATA_WRITE logging.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700698 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
699 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
700 # `allServices` is a special value that covers all services.
Bu Sun Kim65020912020-05-20 12:08:20 -0700701 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
702 { # Provides the configuration for logging a type of permissions.
703 # Example:
704 #
705 # {
706 # &quot;audit_log_configs&quot;: [
707 # {
708 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
709 # &quot;exempted_members&quot;: [
710 # &quot;user:jose@example.com&quot;
711 # ]
712 # },
713 # {
714 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
715 # }
716 # ]
717 # }
718 #
719 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
720 # jose@example.com from DATA_READ logging.
721 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
722 # permission.
723 # Follows the same format of Binding.members.
724 &quot;A String&quot;,
725 ],
726 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
727 },
728 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700729 },
730 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400731 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700732 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
733 # the fields in the mask will be modified. If no mask is provided, the
734 # following default mask is used:
735 #
736 # `paths: &quot;bindings, etag&quot;`
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;version&quot;: 42, # Specifies the format of the policy.
815 #
816 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
817 # are rejected.
818 #
819 # Any operation that affects conditional role bindings must specify version
820 # `3`. This requirement applies to the following operations:
821 #
822 # * Getting a policy that includes a conditional role binding
823 # * Adding a conditional role binding to a policy
824 # * Changing a conditional role binding in a policy
825 # * Removing any role binding, with or without a condition, from a policy
826 # that includes conditions
827 #
828 # **Important:** If you use IAM Conditions, you must include the `etag` field
829 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
830 # you to overwrite a version `3` policy with a version `1` policy, and all of
831 # the conditions in the version `3` policy are lost.
832 #
833 # If a policy does not include any conditions, operations on that policy may
834 # specify any valid version or leave the field unset.
835 #
836 # To learn which resources support conditions in their IAM policies, see the
837 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700838 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
839 # prevent simultaneous updates of a policy from overwriting each other.
840 # It is strongly suggested that systems make use of the `etag` in the
841 # read-modify-write cycle to perform policy updates in order to avoid race
842 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
843 # systems are expected to put that etag in the request to `setIamPolicy` to
844 # ensure that their change will be applied to the same version of the policy.
845 #
846 # **Important:** If you use IAM Conditions, you must include the `etag` field
847 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
848 # you to overwrite a version `3` policy with a version `1` policy, and all of
849 # the conditions in the version `3` policy are lost.
850 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
851 # `condition` that determines how and when the `bindings` are applied. Each
852 # of the `bindings` must contain at least one member.
853 { # Associates `members` with a `role`.
854 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
855 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
856 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
857 #
858 # If the condition evaluates to `true`, then this binding applies to the
859 # current request.
860 #
861 # If the condition evaluates to `false`, then this binding does not apply to
862 # the current request. However, a different role binding might grant the same
863 # role to one or more of the members in this binding.
864 #
865 # To learn which resources support conditions in their IAM policies, see the
866 # [IAM
867 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
868 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
869 # are documented at https://github.com/google/cel-spec.
870 #
871 # Example (Comparison):
872 #
873 # title: &quot;Summary size limit&quot;
874 # description: &quot;Determines if a summary is less than 100 chars&quot;
875 # expression: &quot;document.summary.size() &lt; 100&quot;
876 #
877 # Example (Equality):
878 #
879 # title: &quot;Requestor is owner&quot;
880 # description: &quot;Determines if requestor is the document owner&quot;
881 # expression: &quot;document.owner == request.auth.claims.email&quot;
882 #
883 # Example (Logic):
884 #
885 # title: &quot;Public documents&quot;
886 # description: &quot;Determine whether the document should be publicly visible&quot;
887 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
888 #
889 # Example (Data Manipulation):
890 #
891 # title: &quot;Notification string&quot;
892 # description: &quot;Create a notification string with a timestamp.&quot;
893 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
894 #
895 # The exact variables and functions that may be referenced within an expression
896 # are determined by the service that evaluates it. See the service
897 # documentation for additional information.
898 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
899 # syntax.
900 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
901 # reporting, e.g. a file name and a position in the file.
902 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
903 # its purpose. This can be used e.g. in UIs which allow to enter the
904 # expression.
905 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
906 # describes the expression, e.g. when hovered over it in a UI.
907 },
908 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
909 # `members` can have the following values:
910 #
911 # * `allUsers`: A special identifier that represents anyone who is
912 # on the internet; with or without a Google account.
913 #
914 # * `allAuthenticatedUsers`: A special identifier that represents anyone
915 # who is authenticated with a Google account or a service account.
916 #
917 # * `user:{emailid}`: An email address that represents a specific Google
918 # account. For example, `alice@example.com` .
919 #
920 #
921 # * `serviceAccount:{emailid}`: An email address that represents a service
922 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
923 #
924 # * `group:{emailid}`: An email address that represents a Google group.
925 # For example, `admins@example.com`.
926 #
927 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
928 # identifier) representing a user that has been recently deleted. For
929 # example, `alice@example.com?uid=123456789012345678901`. If the user is
930 # recovered, this value reverts to `user:{emailid}` and the recovered user
931 # retains the role in the binding.
932 #
933 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
934 # unique identifier) representing a service account that has been recently
935 # deleted. For example,
936 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
937 # If the service account is undeleted, this value reverts to
938 # `serviceAccount:{emailid}` and the undeleted service account retains the
939 # role in the binding.
940 #
941 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
942 # identifier) representing a Google group that has been recently
943 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
944 # the group is recovered, this value reverts to `group:{emailid}` and the
945 # recovered group retains the role in the binding.
946 #
947 #
948 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
949 # users of that domain. For example, `google.com` or `example.com`.
950 #
951 &quot;A String&quot;,
952 ],
953 },
954 ],
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 # {
971 # &quot;service&quot;: &quot;allServices&quot;
972 # &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 # {
980 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
981 # },
982 # {
983 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
984 # }
985 # ]
986 # },
987 # {
988 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
989 # &quot;audit_log_configs&quot;: [
990 # {
991 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
992 # },
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 # {
1023 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1024 # }
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>