blob: c50b1e1930308977c08167d90266e5bbf2cc9e5e [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 Kim65020912020-05-20 12:08:20 -070097 <code><a href="#list">list(parent, pageToken=None, orderBy=None, pageSize=None, filter=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 Kim65020912020-05-20 12:08:20 -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 Kim65020912020-05-20 12:08:20 -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 Kim65020912020-05-20 12:08:20 -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 Kim65020912020-05-20 12:08:20 -0700259 &quot;version&quot;: 42, # Specifies the format of the policy.
260 #
261 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
262 # are rejected.
263 #
264 # Any operation that affects conditional role bindings must specify version
265 # `3`. This requirement applies to the following operations:
266 #
267 # * Getting a policy that includes a conditional role binding
268 # * Adding a conditional role binding to a policy
269 # * Changing a conditional role binding in a policy
270 # * Removing any role binding, with or without a condition, from a policy
271 # that includes conditions
272 #
273 # **Important:** If you use IAM Conditions, you must include the `etag` field
274 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
275 # you to overwrite a version `3` policy with a version `1` policy, and all of
276 # the conditions in the version `3` policy are lost.
277 #
278 # If a policy does not include any conditions, operations on that policy may
279 # specify any valid version or leave the field unset.
280 #
281 # To learn which resources support conditions in their IAM policies, see the
282 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
283 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
284 { # Specifies the audit configuration for a service.
285 # The configuration determines which permission types are logged, and what
286 # identities, if any, are exempted from logging.
287 # An AuditConfig must have one or more AuditLogConfigs.
288 #
289 # If there are AuditConfigs for both `allServices` and a specific service,
290 # the union of the two AuditConfigs is used for that service: the log_types
291 # specified in each AuditConfig are enabled, and the exempted_members in each
292 # AuditLogConfig are exempted.
293 #
294 # Example Policy with multiple AuditConfigs:
295 #
296 # {
297 # &quot;audit_configs&quot;: [
298 # {
299 # &quot;service&quot;: &quot;allServices&quot;
300 # &quot;audit_log_configs&quot;: [
301 # {
302 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
303 # &quot;exempted_members&quot;: [
304 # &quot;user:jose@example.com&quot;
305 # ]
306 # },
307 # {
308 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
309 # },
310 # {
311 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
312 # }
313 # ]
314 # },
315 # {
316 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
317 # &quot;audit_log_configs&quot;: [
318 # {
319 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
320 # },
321 # {
322 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
323 # &quot;exempted_members&quot;: [
324 # &quot;user:aliya@example.com&quot;
325 # ]
326 # }
327 # ]
328 # }
329 # ]
330 # }
331 #
332 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
333 # logging. It also exempts jose@example.com from DATA_READ logging, and
334 # aliya@example.com from DATA_WRITE logging.
335 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
336 { # Provides the configuration for logging a type of permissions.
337 # Example:
338 #
339 # {
340 # &quot;audit_log_configs&quot;: [
341 # {
342 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
343 # &quot;exempted_members&quot;: [
344 # &quot;user:jose@example.com&quot;
345 # ]
346 # },
347 # {
348 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
349 # }
350 # ]
351 # }
352 #
353 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
354 # jose@example.com from DATA_READ logging.
355 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
356 # permission.
357 # Follows the same format of Binding.members.
358 &quot;A String&quot;,
359 ],
360 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
361 },
362 ],
363 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
364 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
365 # `allServices` is a special value that covers all services.
366 },
367 ],
368 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700369 # `condition` that determines how and when the `bindings` are applied. Each
370 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700371 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700373 # `members` can have the following values:
374 #
375 # * `allUsers`: A special identifier that represents anyone who is
376 # on the internet; with or without a Google account.
377 #
378 # * `allAuthenticatedUsers`: A special identifier that represents anyone
379 # who is authenticated with a Google account or a service account.
380 #
381 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 #
384 #
385 # * `serviceAccount:{emailid}`: An email address that represents a service
386 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
387 #
388 # * `group:{emailid}`: An email address that represents a Google group.
389 # For example, `admins@example.com`.
390 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
392 # identifier) representing a user that has been recently deleted. For
393 # example, `alice@example.com?uid=123456789012345678901`. If the user is
394 # recovered, this value reverts to `user:{emailid}` and the recovered user
395 # retains the role in the binding.
396 #
397 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
398 # unique identifier) representing a service account that has been recently
399 # deleted. For example,
400 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
401 # If the service account is undeleted, this value reverts to
402 # `serviceAccount:{emailid}` and the undeleted service account retains the
403 # role in the binding.
404 #
405 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
406 # identifier) representing a Google group that has been recently
407 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
408 # the group is recovered, this value reverts to `group:{emailid}` and the
409 # recovered group retains the role in the binding.
410 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 #
412 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
413 # users of that domain. For example, `google.com` or `example.com`.
414 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
418 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
419 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
420 #
421 # If the condition evaluates to `true`, then this binding applies to the
422 # current request.
423 #
424 # If the condition evaluates to `false`, then this binding does not apply to
425 # the current request. However, a different role binding might grant the same
426 # role to one or more of the members in this binding.
427 #
428 # To learn which resources support conditions in their IAM policies, see the
429 # [IAM
430 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
431 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
432 # are documented at https://github.com/google/cel-spec.
433 #
434 # Example (Comparison):
435 #
436 # title: &quot;Summary size limit&quot;
437 # description: &quot;Determines if a summary is less than 100 chars&quot;
438 # expression: &quot;document.summary.size() &lt; 100&quot;
439 #
440 # Example (Equality):
441 #
442 # title: &quot;Requestor is owner&quot;
443 # description: &quot;Determines if requestor is the document owner&quot;
444 # expression: &quot;document.owner == request.auth.claims.email&quot;
445 #
446 # Example (Logic):
447 #
448 # title: &quot;Public documents&quot;
449 # description: &quot;Determine whether the document should be publicly visible&quot;
450 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
451 #
452 # Example (Data Manipulation):
453 #
454 # title: &quot;Notification string&quot;
455 # description: &quot;Create a notification string with a timestamp.&quot;
456 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
457 #
458 # The exact variables and functions that may be referenced within an expression
459 # are determined by the service that evaluates it. See the service
460 # documentation for additional information.
461 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
462 # its purpose. This can be used e.g. in UIs which allow to enter the
463 # expression.
464 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
465 # reporting, e.g. a file name and a position in the file.
466 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
467 # describes the expression, e.g. when hovered over it in a UI.
468 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
469 # syntax.
470 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700471 },
472 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700473 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Dan O'Mearadd494642020-05-01 07:42:23 -0700474 # prevent simultaneous updates of a policy from overwriting each other.
475 # It is strongly suggested that systems make use of the `etag` in the
476 # read-modify-write cycle to perform policy updates in order to avoid race
477 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
478 # systems are expected to put that etag in the request to `setIamPolicy` to
479 # ensure that their change will be applied to the same version of the policy.
480 #
481 # **Important:** If you use IAM Conditions, you must include the `etag` field
482 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
483 # you to overwrite a version `3` policy with a version `1` policy, and all of
484 # the conditions in the version `3` policy are lost.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400485 }</pre>
486</div>
487
488<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 <code class="details" id="list">list(parent, pageToken=None, orderBy=None, pageSize=None, filter=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)
Bu Sun Kim65020912020-05-20 12:08:20 -0700495 pageToken: string, Optional. Optional pagination token, returned earlier via
496ListKeyRingsResponse.next_page_token.
Dan O'Mearadd494642020-05-01 07:42:23 -0700497 orderBy: string, Optional. Specify how the results should be sorted. If not specified, the
498results will be sorted in the default order. For more information, see
499[Sorting and filtering list
500results](https://cloud.google.com/kms/docs/sorting-and-filtering).
501 pageSize: integer, Optional. Optional limit on the number of KeyRings to include in the
502response. Further KeyRings can subsequently be obtained by
503including the ListKeyRingsResponse.next_page_token in a subsequent
504request. If unspecified, the server will pick an appropriate default.
Dan O'Mearadd494642020-05-01 07:42:23 -0700505 filter: string, Optional. Only include resources that match the filter in the response. For
506more information, see
507[Sorting and filtering list
508results](https://cloud.google.com/kms/docs/sorting-and-filtering).
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 Kim65020912020-05-20 12:08:20 -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 Kim65020912020-05-20 12:08:20 -0700525 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results. Pass this value in
526 # ListKeyRingsRequest.page_token to retrieve the next page of results.
527 &quot;totalSize&quot;: 42, # The total number of KeyRings that matched the query.
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 Kim65020912020-05-20 12:08:20 -0700559 &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 -0400560 # the policy is limited to a few 10s of KB. An empty policy is a
561 # valid policy but certain Cloud Platform services (such as Projects)
562 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400564 #
565 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700566 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
567 # `members` to a single `role`. Members can be user accounts, service accounts,
568 # Google groups, and domains (such as G Suite). A `role` is a named list of
569 # permissions; each `role` can be an IAM predefined role or a user-created
570 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400571 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 # For some types of Google Cloud resources, a `binding` can also specify a
573 # `condition`, which is a logical expression that allows access to a resource
574 # only if the expression evaluates to `true`. A condition can add constraints
575 # based on attributes of the request, the resource, or both. To learn which
576 # resources support conditions in their IAM policies, see the
577 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700578 #
579 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400580 #
581 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700582 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400583 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700584 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
585 # &quot;members&quot;: [
586 # &quot;user:mike@example.com&quot;,
587 # &quot;group:admins@example.com&quot;,
588 # &quot;domain:google.com&quot;,
589 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400590 # ]
591 # },
592 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
594 # &quot;members&quot;: [
595 # &quot;user:eve@example.com&quot;
596 # ],
597 # &quot;condition&quot;: {
598 # &quot;title&quot;: &quot;expirable access&quot;,
599 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
600 # &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 -0700601 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400602 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700603 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
605 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400606 # }
607 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 #
610 # bindings:
611 # - members:
612 # - user:mike@example.com
613 # - group:admins@example.com
614 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700615 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
616 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700617 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700618 # - user:eve@example.com
619 # role: roles/resourcemanager.organizationViewer
620 # condition:
621 # title: expirable access
622 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700623 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700624 # - etag: BwWWja0YfJA=
625 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700626 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400627 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700628 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 &quot;version&quot;: 42, # Specifies the format of the policy.
630 #
631 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
632 # are rejected.
633 #
634 # Any operation that affects conditional role bindings must specify version
635 # `3`. This requirement applies to the following operations:
636 #
637 # * Getting a policy that includes a conditional role binding
638 # * Adding a conditional role binding to a policy
639 # * Changing a conditional role binding in a policy
640 # * Removing any role binding, with or without a condition, from a policy
641 # that includes conditions
642 #
643 # **Important:** If you use IAM Conditions, you must include the `etag` field
644 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
645 # you to overwrite a version `3` policy with a version `1` policy, and all of
646 # the conditions in the version `3` policy are lost.
647 #
648 # If a policy does not include any conditions, operations on that policy may
649 # specify any valid version or leave the field unset.
650 #
651 # To learn which resources support conditions in their IAM policies, see the
652 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
653 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
654 { # Specifies the audit configuration for a service.
655 # The configuration determines which permission types are logged, and what
656 # identities, if any, are exempted from logging.
657 # An AuditConfig must have one or more AuditLogConfigs.
658 #
659 # If there are AuditConfigs for both `allServices` and a specific service,
660 # the union of the two AuditConfigs is used for that service: the log_types
661 # specified in each AuditConfig are enabled, and the exempted_members in each
662 # AuditLogConfig are exempted.
663 #
664 # Example Policy with multiple AuditConfigs:
665 #
666 # {
667 # &quot;audit_configs&quot;: [
668 # {
669 # &quot;service&quot;: &quot;allServices&quot;
670 # &quot;audit_log_configs&quot;: [
671 # {
672 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
673 # &quot;exempted_members&quot;: [
674 # &quot;user:jose@example.com&quot;
675 # ]
676 # },
677 # {
678 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
679 # },
680 # {
681 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
682 # }
683 # ]
684 # },
685 # {
686 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
687 # &quot;audit_log_configs&quot;: [
688 # {
689 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
690 # },
691 # {
692 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
693 # &quot;exempted_members&quot;: [
694 # &quot;user:aliya@example.com&quot;
695 # ]
696 # }
697 # ]
698 # }
699 # ]
700 # }
701 #
702 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
703 # logging. It also exempts jose@example.com from DATA_READ logging, and
704 # aliya@example.com from DATA_WRITE logging.
705 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
706 { # Provides the configuration for logging a type of permissions.
707 # Example:
708 #
709 # {
710 # &quot;audit_log_configs&quot;: [
711 # {
712 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
713 # &quot;exempted_members&quot;: [
714 # &quot;user:jose@example.com&quot;
715 # ]
716 # },
717 # {
718 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
719 # }
720 # ]
721 # }
722 #
723 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
724 # jose@example.com from DATA_READ logging.
725 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
726 # permission.
727 # Follows the same format of Binding.members.
728 &quot;A String&quot;,
729 ],
730 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
731 },
732 ],
733 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
734 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
735 # `allServices` is a special value that covers all services.
736 },
737 ],
738 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700739 # `condition` that determines how and when the `bindings` are applied. Each
740 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700741 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700742 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700743 # `members` can have the following values:
744 #
745 # * `allUsers`: A special identifier that represents anyone who is
746 # on the internet; with or without a Google account.
747 #
748 # * `allAuthenticatedUsers`: A special identifier that represents anyone
749 # who is authenticated with a Google account or a service account.
750 #
751 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700752 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700753 #
754 #
755 # * `serviceAccount:{emailid}`: An email address that represents a service
756 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
757 #
758 # * `group:{emailid}`: An email address that represents a Google group.
759 # For example, `admins@example.com`.
760 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
762 # identifier) representing a user that has been recently deleted. For
763 # example, `alice@example.com?uid=123456789012345678901`. If the user is
764 # recovered, this value reverts to `user:{emailid}` and the recovered user
765 # retains the role in the binding.
766 #
767 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
768 # unique identifier) representing a service account that has been recently
769 # deleted. For example,
770 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
771 # If the service account is undeleted, this value reverts to
772 # `serviceAccount:{emailid}` and the undeleted service account retains the
773 # role in the binding.
774 #
775 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
776 # identifier) representing a Google group that has been recently
777 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
778 # the group is recovered, this value reverts to `group:{emailid}` and the
779 # recovered group retains the role in the binding.
780 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700781 #
782 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
783 # users of that domain. For example, `google.com` or `example.com`.
784 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700785 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700787 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
788 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
789 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
790 #
791 # If the condition evaluates to `true`, then this binding applies to the
792 # current request.
793 #
794 # If the condition evaluates to `false`, then this binding does not apply to
795 # the current request. However, a different role binding might grant the same
796 # role to one or more of the members in this binding.
797 #
798 # To learn which resources support conditions in their IAM policies, see the
799 # [IAM
800 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
801 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
802 # are documented at https://github.com/google/cel-spec.
803 #
804 # Example (Comparison):
805 #
806 # title: &quot;Summary size limit&quot;
807 # description: &quot;Determines if a summary is less than 100 chars&quot;
808 # expression: &quot;document.summary.size() &lt; 100&quot;
809 #
810 # Example (Equality):
811 #
812 # title: &quot;Requestor is owner&quot;
813 # description: &quot;Determines if requestor is the document owner&quot;
814 # expression: &quot;document.owner == request.auth.claims.email&quot;
815 #
816 # Example (Logic):
817 #
818 # title: &quot;Public documents&quot;
819 # description: &quot;Determine whether the document should be publicly visible&quot;
820 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
821 #
822 # Example (Data Manipulation):
823 #
824 # title: &quot;Notification string&quot;
825 # description: &quot;Create a notification string with a timestamp.&quot;
826 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
827 #
828 # The exact variables and functions that may be referenced within an expression
829 # are determined by the service that evaluates it. See the service
830 # documentation for additional information.
831 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
832 # its purpose. This can be used e.g. in UIs which allow to enter the
833 # expression.
834 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
835 # reporting, e.g. a file name and a position in the file.
836 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
837 # describes the expression, e.g. when hovered over it in a UI.
838 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
839 # syntax.
840 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700841 },
842 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 # prevent simultaneous updates of a policy from overwriting each other.
845 # It is strongly suggested that systems make use of the `etag` in the
846 # read-modify-write cycle to perform policy updates in order to avoid race
847 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
848 # systems are expected to put that etag in the request to `setIamPolicy` to
849 # ensure that their change will be applied to the same version of the policy.
850 #
851 # **Important:** If you use IAM Conditions, you must include the `etag` field
852 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
853 # you to overwrite a version `3` policy with a version `1` policy, and all of
854 # the conditions in the version `3` policy are lost.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400855 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700857 # the fields in the mask will be modified. If no mask is provided, the
858 # following default mask is used:
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 #
860 # `paths: &quot;bindings, etag&quot;`
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 Kim65020912020-05-20 12:08:20 -0700938 &quot;version&quot;: 42, # Specifies the format of the policy.
939 #
940 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
941 # are rejected.
942 #
943 # Any operation that affects conditional role bindings must specify version
944 # `3`. This requirement applies to the following operations:
945 #
946 # * Getting a policy that includes a conditional role binding
947 # * Adding a conditional role binding to a policy
948 # * Changing a conditional role binding in a policy
949 # * Removing any role binding, with or without a condition, from a policy
950 # that includes conditions
951 #
952 # **Important:** If you use IAM Conditions, you must include the `etag` field
953 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
954 # you to overwrite a version `3` policy with a version `1` policy, and all of
955 # the conditions in the version `3` policy are lost.
956 #
957 # If a policy does not include any conditions, operations on that policy may
958 # specify any valid version or leave the field unset.
959 #
960 # To learn which resources support conditions in their IAM policies, see the
961 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
962 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
963 { # Specifies the audit configuration for a service.
964 # The configuration determines which permission types are logged, and what
965 # identities, if any, are exempted from logging.
966 # An AuditConfig must have one or more AuditLogConfigs.
967 #
968 # If there are AuditConfigs for both `allServices` and a specific service,
969 # the union of the two AuditConfigs is used for that service: the log_types
970 # specified in each AuditConfig are enabled, and the exempted_members in each
971 # AuditLogConfig are exempted.
972 #
973 # Example Policy with multiple AuditConfigs:
974 #
975 # {
976 # &quot;audit_configs&quot;: [
977 # {
978 # &quot;service&quot;: &quot;allServices&quot;
979 # &quot;audit_log_configs&quot;: [
980 # {
981 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
982 # &quot;exempted_members&quot;: [
983 # &quot;user:jose@example.com&quot;
984 # ]
985 # },
986 # {
987 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
988 # },
989 # {
990 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
991 # }
992 # ]
993 # },
994 # {
995 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
996 # &quot;audit_log_configs&quot;: [
997 # {
998 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
999 # },
1000 # {
1001 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1002 # &quot;exempted_members&quot;: [
1003 # &quot;user:aliya@example.com&quot;
1004 # ]
1005 # }
1006 # ]
1007 # }
1008 # ]
1009 # }
1010 #
1011 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1012 # logging. It also exempts jose@example.com from DATA_READ logging, and
1013 # aliya@example.com from DATA_WRITE logging.
1014 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1015 { # Provides the configuration for logging a type of permissions.
1016 # Example:
1017 #
1018 # {
1019 # &quot;audit_log_configs&quot;: [
1020 # {
1021 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1022 # &quot;exempted_members&quot;: [
1023 # &quot;user:jose@example.com&quot;
1024 # ]
1025 # },
1026 # {
1027 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1028 # }
1029 # ]
1030 # }
1031 #
1032 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1033 # jose@example.com from DATA_READ logging.
1034 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1035 # permission.
1036 # Follows the same format of Binding.members.
1037 &quot;A String&quot;,
1038 ],
1039 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1040 },
1041 ],
1042 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1043 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1044 # `allServices` is a special value that covers all services.
1045 },
1046 ],
1047 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001048 # `condition` that determines how and when the `bindings` are applied. Each
1049 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001050 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001051 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 # `members` can have the following values:
1053 #
1054 # * `allUsers`: A special identifier that represents anyone who is
1055 # on the internet; with or without a Google account.
1056 #
1057 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1058 # who is authenticated with a Google account or a service account.
1059 #
1060 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001061 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001062 #
1063 #
1064 # * `serviceAccount:{emailid}`: An email address that represents a service
1065 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1066 #
1067 # * `group:{emailid}`: An email address that represents a Google group.
1068 # For example, `admins@example.com`.
1069 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001070 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1071 # identifier) representing a user that has been recently deleted. For
1072 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1073 # recovered, this value reverts to `user:{emailid}` and the recovered user
1074 # retains the role in the binding.
1075 #
1076 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1077 # unique identifier) representing a service account that has been recently
1078 # deleted. For example,
1079 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1080 # If the service account is undeleted, this value reverts to
1081 # `serviceAccount:{emailid}` and the undeleted service account retains the
1082 # role in the binding.
1083 #
1084 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1085 # identifier) representing a Google group that has been recently
1086 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1087 # the group is recovered, this value reverts to `group:{emailid}` and the
1088 # recovered group retains the role in the binding.
1089 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001090 #
1091 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1092 # users of that domain. For example, `google.com` or `example.com`.
1093 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001096 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1097 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1098 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1099 #
1100 # If the condition evaluates to `true`, then this binding applies to the
1101 # current request.
1102 #
1103 # If the condition evaluates to `false`, then this binding does not apply to
1104 # the current request. However, a different role binding might grant the same
1105 # role to one or more of the members in this binding.
1106 #
1107 # To learn which resources support conditions in their IAM policies, see the
1108 # [IAM
1109 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1110 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1111 # are documented at https://github.com/google/cel-spec.
1112 #
1113 # Example (Comparison):
1114 #
1115 # title: &quot;Summary size limit&quot;
1116 # description: &quot;Determines if a summary is less than 100 chars&quot;
1117 # expression: &quot;document.summary.size() &lt; 100&quot;
1118 #
1119 # Example (Equality):
1120 #
1121 # title: &quot;Requestor is owner&quot;
1122 # description: &quot;Determines if requestor is the document owner&quot;
1123 # expression: &quot;document.owner == request.auth.claims.email&quot;
1124 #
1125 # Example (Logic):
1126 #
1127 # title: &quot;Public documents&quot;
1128 # description: &quot;Determine whether the document should be publicly visible&quot;
1129 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1130 #
1131 # Example (Data Manipulation):
1132 #
1133 # title: &quot;Notification string&quot;
1134 # description: &quot;Create a notification string with a timestamp.&quot;
1135 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1136 #
1137 # The exact variables and functions that may be referenced within an expression
1138 # are determined by the service that evaluates it. See the service
1139 # documentation for additional information.
1140 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1141 # its purpose. This can be used e.g. in UIs which allow to enter the
1142 # expression.
1143 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1144 # reporting, e.g. a file name and a position in the file.
1145 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1146 # describes the expression, e.g. when hovered over it in a UI.
1147 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1148 # syntax.
1149 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001150 },
1151 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001152 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Dan O'Mearadd494642020-05-01 07:42:23 -07001153 # prevent simultaneous updates of a policy from overwriting each other.
1154 # It is strongly suggested that systems make use of the `etag` in the
1155 # read-modify-write cycle to perform policy updates in order to avoid race
1156 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1157 # systems are expected to put that etag in the request to `setIamPolicy` to
1158 # ensure that their change will be applied to the same version of the policy.
1159 #
1160 # **Important:** If you use IAM Conditions, you must include the `etag` field
1161 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1162 # you to overwrite a version `3` policy with a version `1` policy, and all of
1163 # the conditions in the version `3` policy are lost.
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>