blob: c08688f36c31b5c5df2c130731cc94d6a3276376 [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="cloudkms_v1.html">Cloud Key Management Service (KMS) API</a> . <a href="cloudkms_v1.projects.html">projects</a> . <a href="cloudkms_v1.projects.locations.html">locations</a> . <a href="cloudkms_v1.projects.locations.keyRings.html">keyRings</a></h1>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040076<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudkms_v1.projects.locations.keyRings.cryptoKeys.html">cryptoKeys()</a></code>
79</p>
80<p class="firstline">Returns the cryptoKeys Resource.</p>
81
82<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083 <code><a href="cloudkms_v1.projects.locations.keyRings.importJobs.html">importJobs()</a></code>
84</p>
85<p class="firstline">Returns the importJobs Resource.</p>
86
87<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070088 <code><a href="#create">create(parent, body=None, keyRingId=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040089<p class="firstline">Create a new KeyRing in a given Project and Location.</p>
90<p class="toc_element">
91 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
92<p class="firstline">Returns metadata for a given KeyRing.</p>
93<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070094 <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040095<p class="firstline">Gets the access control policy for a resource.</p>
96<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070097 <code><a href="#list">list(parent, orderBy=None, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040098<p class="firstline">Lists KeyRings.</p>
99<p class="toc_element">
100 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
101<p class="firstline">Retrieves the next page of results.</p>
102<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400104<p class="firstline">Sets the access control policy on the specified resource. Replaces any</p>
105<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700106 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400107<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
108<h3>Method Details</h3>
109<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700110 <code class="details" id="create">create(parent, body=None, keyRingId=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400111 <pre>Create a new KeyRing in a given Project and Location.
112
113Args:
114 parent: string, Required. The resource name of the location associated with the
115KeyRings, in the format `projects/*/locations/*`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700116 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400117 The object takes the form of:
118
119{ # A KeyRing is a toplevel logical grouping of CryptoKeys.
Bu Sun Kim65020912020-05-20 12:08:20 -0700120 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for the KeyRing in the format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400121 # `projects/*/locations/*/keyRings/*`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700122 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this KeyRing was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400123}
124
125 keyRingId: string, Required. It must be unique within a location and match the regular
126expression `[a-zA-Z0-9_-]{1,63}`
127 x__xgafv: string, V1 error format.
128 Allowed values
129 1 - v1 error format
130 2 - v2 error format
131
132Returns:
133 An object of the form:
134
135 { # A KeyRing is a toplevel logical grouping of CryptoKeys.
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for the KeyRing in the format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400137 # `projects/*/locations/*/keyRings/*`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700138 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this KeyRing was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400139 }</pre>
140</div>
141
142<div class="method">
143 <code class="details" id="get">get(name, x__xgafv=None)</code>
144 <pre>Returns metadata for a given KeyRing.
145
146Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 name: string, Required. The name of the KeyRing to get. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400148 x__xgafv: string, V1 error format.
149 Allowed values
150 1 - v1 error format
151 2 - v2 error format
152
153Returns:
154 An object of the form:
155
156 { # A KeyRing is a toplevel logical grouping of CryptoKeys.
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for the KeyRing in the format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400158 # `projects/*/locations/*/keyRings/*`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700159 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this KeyRing was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400160 }</pre>
161</div>
162
163<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700164 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400165 <pre>Gets the access control policy for a resource.
166Returns an empty policy if the resource exists and does not have a policy
167set.
168
169Args:
170 resource: string, REQUIRED: The resource for which the policy is being requested.
171See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700172 options_requestedPolicyVersion: integer, Optional. The policy format version to be returned.
173
174Valid values are 0, 1, and 3. Requests specifying an invalid value will be
175rejected.
176
177Requests for policies with any conditional bindings must specify version 3.
178Policies without any conditional bindings may specify any valid value or
179leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -0700180
181To learn which resources support conditions in their IAM policies, see the
182[IAM
183documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400184 x__xgafv: string, V1 error format.
185 Allowed values
186 1 - v1 error format
187 2 - v2 error format
188
189Returns:
190 An object of the form:
191
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 { # An Identity and Access Management (IAM) policy, which specifies access
193 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400194 #
195 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700196 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
197 # `members` to a single `role`. Members can be user accounts, service accounts,
198 # Google groups, and domains (such as G Suite). A `role` is a named list of
199 # permissions; each `role` can be an IAM predefined role or a user-created
200 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400201 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700202 # For some types of Google Cloud resources, a `binding` can also specify a
203 # `condition`, which is a logical expression that allows access to a resource
204 # only if the expression evaluates to `true`. A condition can add constraints
205 # based on attributes of the request, the resource, or both. To learn which
206 # resources support conditions in their IAM policies, see the
207 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700208 #
209 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400210 #
211 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400213 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
215 # &quot;members&quot;: [
216 # &quot;user:mike@example.com&quot;,
217 # &quot;group:admins@example.com&quot;,
218 # &quot;domain:google.com&quot;,
219 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400220 # ]
221 # },
222 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700223 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
224 # &quot;members&quot;: [
225 # &quot;user:eve@example.com&quot;
226 # ],
227 # &quot;condition&quot;: {
228 # &quot;title&quot;: &quot;expirable access&quot;,
229 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
230 # &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 -0700231 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400232 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
235 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400236 # }
237 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700238 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 #
240 # bindings:
241 # - members:
242 # - user:mike@example.com
243 # - group:admins@example.com
244 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700245 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
246 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700248 # - user:eve@example.com
249 # role: roles/resourcemanager.organizationViewer
250 # condition:
251 # title: expirable access
252 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700254 # - etag: BwWWja0YfJA=
255 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700256 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400257 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700259 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
260 # prevent simultaneous updates of a policy from overwriting each other.
261 # It is strongly suggested that systems make use of the `etag` in the
262 # read-modify-write cycle to perform policy updates in order to avoid race
263 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
264 # systems are expected to put that etag in the request to `setIamPolicy` to
265 # ensure that their change will be applied to the same version of the policy.
266 #
267 # **Important:** If you use IAM Conditions, you must include the `etag` field
268 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
269 # you to overwrite a version `3` policy with a version `1` policy, and all of
270 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 &quot;version&quot;: 42, # Specifies the format of the policy.
272 #
273 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
274 # are rejected.
275 #
276 # Any operation that affects conditional role bindings must specify version
277 # `3`. This requirement applies to the following operations:
278 #
279 # * Getting a policy that includes a conditional role binding
280 # * Adding a conditional role binding to a policy
281 # * Changing a conditional role binding in a policy
282 # * Removing any role binding, with or without a condition, from a policy
283 # that includes conditions
284 #
285 # **Important:** If you use IAM Conditions, you must include the `etag` field
286 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
287 # you to overwrite a version `3` policy with a version `1` policy, and all of
288 # the conditions in the version `3` policy are lost.
289 #
290 # If a policy does not include any conditions, operations on that policy may
291 # specify any valid version or leave the field unset.
292 #
293 # To learn which resources support conditions in their IAM policies, see the
294 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700296 # `condition` that determines how and when the `bindings` are applied. Each
297 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700299 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
300 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
302 #
303 # If the condition evaluates to `true`, then this binding applies to the
304 # current request.
305 #
306 # If the condition evaluates to `false`, then this binding does not apply to
307 # the current request. However, a different role binding might grant the same
308 # role to one or more of the members in this binding.
309 #
310 # To learn which resources support conditions in their IAM policies, see the
311 # [IAM
312 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
313 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
314 # are documented at https://github.com/google/cel-spec.
315 #
316 # Example (Comparison):
317 #
318 # title: &quot;Summary size limit&quot;
319 # description: &quot;Determines if a summary is less than 100 chars&quot;
320 # expression: &quot;document.summary.size() &lt; 100&quot;
321 #
322 # Example (Equality):
323 #
324 # title: &quot;Requestor is owner&quot;
325 # description: &quot;Determines if requestor is the document owner&quot;
326 # expression: &quot;document.owner == request.auth.claims.email&quot;
327 #
328 # Example (Logic):
329 #
330 # title: &quot;Public documents&quot;
331 # description: &quot;Determine whether the document should be publicly visible&quot;
332 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
333 #
334 # Example (Data Manipulation):
335 #
336 # title: &quot;Notification string&quot;
337 # description: &quot;Create a notification string with a timestamp.&quot;
338 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
339 #
340 # The exact variables and functions that may be referenced within an expression
341 # are determined by the service that evaluates it. See the service
342 # documentation for additional information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700343 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
344 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
346 # its purpose. This can be used e.g. in UIs which allow to enter the
347 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700348 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
349 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700350 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
351 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700353 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
354 # `members` can have the following values:
355 #
356 # * `allUsers`: A special identifier that represents anyone who is
357 # on the internet; with or without a Google account.
358 #
359 # * `allAuthenticatedUsers`: A special identifier that represents anyone
360 # who is authenticated with a Google account or a service account.
361 #
362 # * `user:{emailid}`: An email address that represents a specific Google
363 # account. For example, `alice@example.com` .
364 #
365 #
366 # * `serviceAccount:{emailid}`: An email address that represents a service
367 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
368 #
369 # * `group:{emailid}`: An email address that represents a Google group.
370 # For example, `admins@example.com`.
371 #
372 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
373 # identifier) representing a user that has been recently deleted. For
374 # example, `alice@example.com?uid=123456789012345678901`. If the user is
375 # recovered, this value reverts to `user:{emailid}` and the recovered user
376 # retains the role in the binding.
377 #
378 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
379 # unique identifier) representing a service account that has been recently
380 # deleted. For example,
381 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
382 # If the service account is undeleted, this value reverts to
383 # `serviceAccount:{emailid}` and the undeleted service account retains the
384 # role in the binding.
385 #
386 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
387 # identifier) representing a Google group that has been recently
388 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
389 # the group is recovered, this value reverts to `group:{emailid}` and the
390 # recovered group retains the role in the binding.
391 #
392 #
393 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
394 # users of that domain. For example, `google.com` or `example.com`.
395 #
396 &quot;A String&quot;,
397 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700398 },
399 ],
400 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
401 { # Specifies the audit configuration for a service.
402 # The configuration determines which permission types are logged, and what
403 # identities, if any, are exempted from logging.
404 # An AuditConfig must have one or more AuditLogConfigs.
405 #
406 # If there are AuditConfigs for both `allServices` and a specific service,
407 # the union of the two AuditConfigs is used for that service: the log_types
408 # specified in each AuditConfig are enabled, and the exempted_members in each
409 # AuditLogConfig are exempted.
410 #
411 # Example Policy with multiple AuditConfigs:
412 #
413 # {
414 # &quot;audit_configs&quot;: [
415 # {
416 # &quot;service&quot;: &quot;allServices&quot;,
417 # &quot;audit_log_configs&quot;: [
418 # {
419 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
420 # &quot;exempted_members&quot;: [
421 # &quot;user:jose@example.com&quot;
422 # ]
423 # },
424 # {
425 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
426 # },
427 # {
428 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
429 # }
430 # ]
431 # },
432 # {
433 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
434 # &quot;audit_log_configs&quot;: [
435 # {
436 # &quot;log_type&quot;: &quot;DATA_READ&quot;
437 # },
438 # {
439 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
440 # &quot;exempted_members&quot;: [
441 # &quot;user:aliya@example.com&quot;
442 # ]
443 # }
444 # ]
445 # }
446 # ]
447 # }
448 #
449 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
450 # logging. It also exempts jose@example.com from DATA_READ logging, and
451 # aliya@example.com from DATA_WRITE logging.
452 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
453 { # Provides the configuration for logging a type of permissions.
454 # Example:
455 #
456 # {
457 # &quot;audit_log_configs&quot;: [
458 # {
459 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
460 # &quot;exempted_members&quot;: [
461 # &quot;user:jose@example.com&quot;
462 # ]
463 # },
464 # {
465 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
466 # }
467 # ]
468 # }
469 #
470 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
471 # jose@example.com from DATA_READ logging.
472 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
473 # permission.
474 # Follows the same format of Binding.members.
475 &quot;A String&quot;,
476 ],
477 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
478 },
479 ],
480 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
481 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
482 # `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700483 },
484 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400485 }</pre>
486</div>
487
488<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700489 <code class="details" id="list">list(parent, orderBy=None, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400490 <pre>Lists KeyRings.
491
492Args:
493 parent: string, Required. The resource name of the location associated with the
494KeyRings, in the format `projects/*/locations/*`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700495 orderBy: string, Optional. Specify how the results should be sorted. If not specified, the
496results will be sorted in the default order. For more information, see
497[Sorting and filtering list
498results](https://cloud.google.com/kms/docs/sorting-and-filtering).
499 pageSize: integer, Optional. Optional limit on the number of KeyRings to include in the
500response. Further KeyRings can subsequently be obtained by
501including the ListKeyRingsResponse.next_page_token in a subsequent
502request. If unspecified, the server will pick an appropriate default.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700503 filter: string, Optional. Only include resources that match the filter in the response. For
504more information, see
505[Sorting and filtering list
506results](https://cloud.google.com/kms/docs/sorting-and-filtering).
507 pageToken: string, Optional. Optional pagination token, returned earlier via
508ListKeyRingsResponse.next_page_token.
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 x__xgafv: string, V1 error format.
510 Allowed values
511 1 - v1 error format
512 2 - v2 error format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400513
514Returns:
515 An object of the form:
516
517 { # Response message for KeyManagementService.ListKeyRings.
Bu Sun Kim65020912020-05-20 12:08:20 -0700518 &quot;keyRings&quot;: [ # The list of KeyRings.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400519 { # A KeyRing is a toplevel logical grouping of CryptoKeys.
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name for the KeyRing in the format
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400521 # `projects/*/locations/*/keyRings/*`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700522 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this KeyRing was created.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400523 },
524 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700525 &quot;totalSize&quot;: 42, # The total number of KeyRings that matched the query.
Bu Sun Kim65020912020-05-20 12:08:20 -0700526 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results. Pass this value in
527 # ListKeyRingsRequest.page_token to retrieve the next page of results.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400528 }</pre>
529</div>
530
531<div class="method">
532 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
533 <pre>Retrieves the next page of results.
534
535Args:
536 previous_request: The request for the previous page. (required)
537 previous_response: The response from the request for the previous page. (required)
538
539Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400541 page. Returns None if there are no more items in the collection.
542 </pre>
543</div>
544
545<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700546 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400547 <pre>Sets the access control policy on the specified resource. Replaces any
548existing policy.
549
Bu Sun Kim65020912020-05-20 12:08:20 -0700550Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
Dan O'Mearadd494642020-05-01 07:42:23 -0700551
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400552Args:
553 resource: string, REQUIRED: The resource for which the policy is being specified.
554See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400556 The object takes the form of:
557
558{ # Request message for `SetIamPolicy` method.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700559 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
560 # the fields in the mask will be modified. If no mask is provided, the
561 # following default mask is used:
562 #
563 # `paths: &quot;bindings, etag&quot;`
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 &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 -0400565 # the policy is limited to a few 10s of KB. An empty policy is a
566 # valid policy but certain Cloud Platform services (such as Projects)
567 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700568 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400569 #
570 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700571 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
572 # `members` to a single `role`. Members can be user accounts, service accounts,
573 # Google groups, and domains (such as G Suite). A `role` is a named list of
574 # permissions; each `role` can be an IAM predefined role or a user-created
575 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400576 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700577 # For some types of Google Cloud resources, a `binding` can also specify a
578 # `condition`, which is a logical expression that allows access to a resource
579 # only if the expression evaluates to `true`. A condition can add constraints
580 # based on attributes of the request, the resource, or both. To learn which
581 # resources support conditions in their IAM policies, see the
582 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700583 #
584 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400585 #
586 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400588 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
590 # &quot;members&quot;: [
591 # &quot;user:mike@example.com&quot;,
592 # &quot;group:admins@example.com&quot;,
593 # &quot;domain:google.com&quot;,
594 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400595 # ]
596 # },
597 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
599 # &quot;members&quot;: [
600 # &quot;user:eve@example.com&quot;
601 # ],
602 # &quot;condition&quot;: {
603 # &quot;title&quot;: &quot;expirable access&quot;,
604 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
605 # &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 -0700606 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400607 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700609 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
610 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400611 # }
612 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700613 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700614 #
615 # bindings:
616 # - members:
617 # - user:mike@example.com
618 # - group:admins@example.com
619 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700620 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
621 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700623 # - user:eve@example.com
624 # role: roles/resourcemanager.organizationViewer
625 # condition:
626 # title: expirable access
627 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700628 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700629 # - etag: BwWWja0YfJA=
630 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400632 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700633 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700634 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
635 # prevent simultaneous updates of a policy from overwriting each other.
636 # It is strongly suggested that systems make use of the `etag` in the
637 # read-modify-write cycle to perform policy updates in order to avoid race
638 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
639 # systems are expected to put that etag in the request to `setIamPolicy` to
640 # ensure that their change will be applied to the same version of the policy.
641 #
642 # **Important:** If you use IAM Conditions, you must include the `etag` field
643 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
644 # you to overwrite a version `3` policy with a version `1` policy, and all of
645 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 &quot;version&quot;: 42, # Specifies the format of the policy.
647 #
648 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
649 # are rejected.
650 #
651 # Any operation that affects conditional role bindings must specify version
652 # `3`. This requirement applies to the following operations:
653 #
654 # * Getting a policy that includes a conditional role binding
655 # * Adding a conditional role binding to a policy
656 # * Changing a conditional role binding in a policy
657 # * Removing any role binding, with or without a condition, from a policy
658 # that includes conditions
659 #
660 # **Important:** If you use IAM Conditions, you must include the `etag` field
661 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
662 # you to overwrite a version `3` policy with a version `1` policy, and all of
663 # the conditions in the version `3` policy are lost.
664 #
665 # If a policy does not include any conditions, operations on that policy may
666 # specify any valid version or leave the field unset.
667 #
668 # To learn which resources support conditions in their IAM policies, see the
669 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700671 # `condition` that determines how and when the `bindings` are applied. Each
672 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700673 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700674 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
675 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700676 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
677 #
678 # If the condition evaluates to `true`, then this binding applies to the
679 # current request.
680 #
681 # If the condition evaluates to `false`, then this binding does not apply to
682 # the current request. However, a different role binding might grant the same
683 # role to one or more of the members in this binding.
684 #
685 # To learn which resources support conditions in their IAM policies, see the
686 # [IAM
687 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
688 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
689 # are documented at https://github.com/google/cel-spec.
690 #
691 # Example (Comparison):
692 #
693 # title: &quot;Summary size limit&quot;
694 # description: &quot;Determines if a summary is less than 100 chars&quot;
695 # expression: &quot;document.summary.size() &lt; 100&quot;
696 #
697 # Example (Equality):
698 #
699 # title: &quot;Requestor is owner&quot;
700 # description: &quot;Determines if requestor is the document owner&quot;
701 # expression: &quot;document.owner == request.auth.claims.email&quot;
702 #
703 # Example (Logic):
704 #
705 # title: &quot;Public documents&quot;
706 # description: &quot;Determine whether the document should be publicly visible&quot;
707 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
708 #
709 # Example (Data Manipulation):
710 #
711 # title: &quot;Notification string&quot;
712 # description: &quot;Create a notification string with a timestamp.&quot;
713 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
714 #
715 # The exact variables and functions that may be referenced within an expression
716 # are determined by the service that evaluates it. See the service
717 # documentation for additional information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700718 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
719 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
721 # its purpose. This can be used e.g. in UIs which allow to enter the
722 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
724 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700725 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
726 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700727 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700728 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
729 # `members` can have the following values:
730 #
731 # * `allUsers`: A special identifier that represents anyone who is
732 # on the internet; with or without a Google account.
733 #
734 # * `allAuthenticatedUsers`: A special identifier that represents anyone
735 # who is authenticated with a Google account or a service account.
736 #
737 # * `user:{emailid}`: An email address that represents a specific Google
738 # account. For example, `alice@example.com` .
739 #
740 #
741 # * `serviceAccount:{emailid}`: An email address that represents a service
742 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
743 #
744 # * `group:{emailid}`: An email address that represents a Google group.
745 # For example, `admins@example.com`.
746 #
747 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
748 # identifier) representing a user that has been recently deleted. For
749 # example, `alice@example.com?uid=123456789012345678901`. If the user is
750 # recovered, this value reverts to `user:{emailid}` and the recovered user
751 # retains the role in the binding.
752 #
753 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
754 # unique identifier) representing a service account that has been recently
755 # deleted. For example,
756 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
757 # If the service account is undeleted, this value reverts to
758 # `serviceAccount:{emailid}` and the undeleted service account retains the
759 # role in the binding.
760 #
761 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
762 # identifier) representing a Google group that has been recently
763 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
764 # the group is recovered, this value reverts to `group:{emailid}` and the
765 # recovered group retains the role in the binding.
766 #
767 #
768 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
769 # users of that domain. For example, `google.com` or `example.com`.
770 #
771 &quot;A String&quot;,
772 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700773 },
774 ],
775 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
776 { # Specifies the audit configuration for a service.
777 # The configuration determines which permission types are logged, and what
778 # identities, if any, are exempted from logging.
779 # An AuditConfig must have one or more AuditLogConfigs.
780 #
781 # If there are AuditConfigs for both `allServices` and a specific service,
782 # the union of the two AuditConfigs is used for that service: the log_types
783 # specified in each AuditConfig are enabled, and the exempted_members in each
784 # AuditLogConfig are exempted.
785 #
786 # Example Policy with multiple AuditConfigs:
787 #
788 # {
789 # &quot;audit_configs&quot;: [
790 # {
791 # &quot;service&quot;: &quot;allServices&quot;,
792 # &quot;audit_log_configs&quot;: [
793 # {
794 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
795 # &quot;exempted_members&quot;: [
796 # &quot;user:jose@example.com&quot;
797 # ]
798 # },
799 # {
800 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
801 # },
802 # {
803 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
804 # }
805 # ]
806 # },
807 # {
808 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
809 # &quot;audit_log_configs&quot;: [
810 # {
811 # &quot;log_type&quot;: &quot;DATA_READ&quot;
812 # },
813 # {
814 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
815 # &quot;exempted_members&quot;: [
816 # &quot;user:aliya@example.com&quot;
817 # ]
818 # }
819 # ]
820 # }
821 # ]
822 # }
823 #
824 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
825 # logging. It also exempts jose@example.com from DATA_READ logging, and
826 # aliya@example.com from DATA_WRITE logging.
827 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
828 { # Provides the configuration for logging a type of permissions.
829 # Example:
830 #
831 # {
832 # &quot;audit_log_configs&quot;: [
833 # {
834 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
835 # &quot;exempted_members&quot;: [
836 # &quot;user:jose@example.com&quot;
837 # ]
838 # },
839 # {
840 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
841 # }
842 # ]
843 # }
844 #
845 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
846 # jose@example.com from DATA_READ logging.
847 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
848 # permission.
849 # Follows the same format of Binding.members.
850 &quot;A String&quot;,
851 ],
852 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
853 },
854 ],
855 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
856 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
857 # `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700858 },
859 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400860 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400861 }
862
863 x__xgafv: string, V1 error format.
864 Allowed values
865 1 - v1 error format
866 2 - v2 error format
867
868Returns:
869 An object of the form:
870
Dan O'Mearadd494642020-05-01 07:42:23 -0700871 { # An Identity and Access Management (IAM) policy, which specifies access
872 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400873 #
874 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
876 # `members` to a single `role`. Members can be user accounts, service accounts,
877 # Google groups, and domains (such as G Suite). A `role` is a named list of
878 # permissions; each `role` can be an IAM predefined role or a user-created
879 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400880 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 # For some types of Google Cloud resources, a `binding` can also specify a
882 # `condition`, which is a logical expression that allows access to a resource
883 # only if the expression evaluates to `true`. A condition can add constraints
884 # based on attributes of the request, the resource, or both. To learn which
885 # resources support conditions in their IAM policies, see the
886 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700887 #
888 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400889 #
890 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700891 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400892 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700893 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
894 # &quot;members&quot;: [
895 # &quot;user:mike@example.com&quot;,
896 # &quot;group:admins@example.com&quot;,
897 # &quot;domain:google.com&quot;,
898 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400899 # ]
900 # },
901 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700902 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
903 # &quot;members&quot;: [
904 # &quot;user:eve@example.com&quot;
905 # ],
906 # &quot;condition&quot;: {
907 # &quot;title&quot;: &quot;expirable access&quot;,
908 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
909 # &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 -0700910 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400911 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700912 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700913 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
914 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400915 # }
916 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700917 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 #
919 # bindings:
920 # - members:
921 # - user:mike@example.com
922 # - group:admins@example.com
923 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700924 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
925 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700926 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700927 # - user:eve@example.com
928 # role: roles/resourcemanager.organizationViewer
929 # condition:
930 # title: expirable access
931 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700932 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700933 # - etag: BwWWja0YfJA=
934 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400936 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700937 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700938 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
939 # prevent simultaneous updates of a policy from overwriting each other.
940 # It is strongly suggested that systems make use of the `etag` in the
941 # read-modify-write cycle to perform policy updates in order to avoid race
942 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
943 # systems are expected to put that etag in the request to `setIamPolicy` to
944 # ensure that their change will be applied to the same version of the policy.
945 #
946 # **Important:** If you use IAM Conditions, you must include the `etag` field
947 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
948 # you to overwrite a version `3` policy with a version `1` policy, and all of
949 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700950 &quot;version&quot;: 42, # Specifies the format of the policy.
951 #
952 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
953 # are rejected.
954 #
955 # Any operation that affects conditional role bindings must specify version
956 # `3`. This requirement applies to the following operations:
957 #
958 # * Getting a policy that includes a conditional role binding
959 # * Adding a conditional role binding to a policy
960 # * Changing a conditional role binding in a policy
961 # * Removing any role binding, with or without a condition, from a policy
962 # that includes conditions
963 #
964 # **Important:** If you use IAM Conditions, you must include the `etag` field
965 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
966 # you to overwrite a version `3` policy with a version `1` policy, and all of
967 # the conditions in the version `3` policy are lost.
968 #
969 # If a policy does not include any conditions, operations on that policy may
970 # specify any valid version or leave the field unset.
971 #
972 # To learn which resources support conditions in their IAM policies, see the
973 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700974 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700975 # `condition` that determines how and when the `bindings` are applied. Each
976 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700977 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700978 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
979 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
981 #
982 # If the condition evaluates to `true`, then this binding applies to the
983 # current request.
984 #
985 # If the condition evaluates to `false`, then this binding does not apply to
986 # the current request. However, a different role binding might grant the same
987 # role to one or more of the members in this binding.
988 #
989 # To learn which resources support conditions in their IAM policies, see the
990 # [IAM
991 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
992 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
993 # are documented at https://github.com/google/cel-spec.
994 #
995 # Example (Comparison):
996 #
997 # title: &quot;Summary size limit&quot;
998 # description: &quot;Determines if a summary is less than 100 chars&quot;
999 # expression: &quot;document.summary.size() &lt; 100&quot;
1000 #
1001 # Example (Equality):
1002 #
1003 # title: &quot;Requestor is owner&quot;
1004 # description: &quot;Determines if requestor is the document owner&quot;
1005 # expression: &quot;document.owner == request.auth.claims.email&quot;
1006 #
1007 # Example (Logic):
1008 #
1009 # title: &quot;Public documents&quot;
1010 # description: &quot;Determine whether the document should be publicly visible&quot;
1011 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1012 #
1013 # Example (Data Manipulation):
1014 #
1015 # title: &quot;Notification string&quot;
1016 # description: &quot;Create a notification string with a timestamp.&quot;
1017 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1018 #
1019 # The exact variables and functions that may be referenced within an expression
1020 # are determined by the service that evaluates it. See the service
1021 # documentation for additional information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001022 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1023 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1025 # its purpose. This can be used e.g. in UIs which allow to enter the
1026 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07001027 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1028 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001029 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1030 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001031 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001032 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
1033 # `members` can have the following values:
1034 #
1035 # * `allUsers`: A special identifier that represents anyone who is
1036 # on the internet; with or without a Google account.
1037 #
1038 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1039 # who is authenticated with a Google account or a service account.
1040 #
1041 # * `user:{emailid}`: An email address that represents a specific Google
1042 # account. For example, `alice@example.com` .
1043 #
1044 #
1045 # * `serviceAccount:{emailid}`: An email address that represents a service
1046 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1047 #
1048 # * `group:{emailid}`: An email address that represents a Google group.
1049 # For example, `admins@example.com`.
1050 #
1051 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1052 # identifier) representing a user that has been recently deleted. For
1053 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1054 # recovered, this value reverts to `user:{emailid}` and the recovered user
1055 # retains the role in the binding.
1056 #
1057 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1058 # unique identifier) representing a service account that has been recently
1059 # deleted. For example,
1060 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1061 # If the service account is undeleted, this value reverts to
1062 # `serviceAccount:{emailid}` and the undeleted service account retains the
1063 # role in the binding.
1064 #
1065 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1066 # identifier) representing a Google group that has been recently
1067 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1068 # the group is recovered, this value reverts to `group:{emailid}` and the
1069 # recovered group retains the role in the binding.
1070 #
1071 #
1072 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1073 # users of that domain. For example, `google.com` or `example.com`.
1074 #
1075 &quot;A String&quot;,
1076 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001077 },
1078 ],
1079 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1080 { # Specifies the audit configuration for a service.
1081 # The configuration determines which permission types are logged, and what
1082 # identities, if any, are exempted from logging.
1083 # An AuditConfig must have one or more AuditLogConfigs.
1084 #
1085 # If there are AuditConfigs for both `allServices` and a specific service,
1086 # the union of the two AuditConfigs is used for that service: the log_types
1087 # specified in each AuditConfig are enabled, and the exempted_members in each
1088 # AuditLogConfig are exempted.
1089 #
1090 # Example Policy with multiple AuditConfigs:
1091 #
1092 # {
1093 # &quot;audit_configs&quot;: [
1094 # {
1095 # &quot;service&quot;: &quot;allServices&quot;,
1096 # &quot;audit_log_configs&quot;: [
1097 # {
1098 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1099 # &quot;exempted_members&quot;: [
1100 # &quot;user:jose@example.com&quot;
1101 # ]
1102 # },
1103 # {
1104 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1105 # },
1106 # {
1107 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
1108 # }
1109 # ]
1110 # },
1111 # {
1112 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
1113 # &quot;audit_log_configs&quot;: [
1114 # {
1115 # &quot;log_type&quot;: &quot;DATA_READ&quot;
1116 # },
1117 # {
1118 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1119 # &quot;exempted_members&quot;: [
1120 # &quot;user:aliya@example.com&quot;
1121 # ]
1122 # }
1123 # ]
1124 # }
1125 # ]
1126 # }
1127 #
1128 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1129 # logging. It also exempts jose@example.com from DATA_READ logging, and
1130 # aliya@example.com from DATA_WRITE logging.
1131 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1132 { # Provides the configuration for logging a type of permissions.
1133 # Example:
1134 #
1135 # {
1136 # &quot;audit_log_configs&quot;: [
1137 # {
1138 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1139 # &quot;exempted_members&quot;: [
1140 # &quot;user:jose@example.com&quot;
1141 # ]
1142 # },
1143 # {
1144 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1145 # }
1146 # ]
1147 # }
1148 #
1149 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1150 # jose@example.com from DATA_READ logging.
1151 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1152 # permission.
1153 # Follows the same format of Binding.members.
1154 &quot;A String&quot;,
1155 ],
1156 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1157 },
1158 ],
1159 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1160 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1161 # `allServices` is a special value that covers all services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001162 },
1163 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001164 }</pre>
1165</div>
1166
1167<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001168 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001169 <pre>Returns permissions that a caller has on the specified resource.
1170If the resource does not exist, this will return an empty set of
Bu Sun Kim65020912020-05-20 12:08:20 -07001171permissions, not a `NOT_FOUND` error.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001172
1173Note: This operation is designed to be used for building permission-aware
1174UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07001175may &quot;fail open&quot; without warning.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001176
1177Args:
1178 resource: string, REQUIRED: The resource for which the policy detail is being requested.
1179See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001180 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001181 The object takes the form of:
1182
1183{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001184 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
1185 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001186 # information see
1187 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07001188 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001189 ],
1190 }
1191
1192 x__xgafv: string, V1 error format.
1193 Allowed values
1194 1 - v1 error format
1195 2 - v2 error format
1196
1197Returns:
1198 An object of the form:
1199
1200 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001201 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001202 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001203 &quot;A String&quot;,
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001204 ],
1205 }</pre>
1206</div>
1207
1208</body></html>