blob: 1f1c462a951e671c1713c1f7a7466fa7bdcad2f3 [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 Kim4ed7d3f2020-05-27 12:20:54 -070097 <code><a href="#list">list(parent, filter=None, pageToken=None, orderBy=None, pageSize=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 Kim4ed7d3f2020-05-27 12:20:54 -0700120 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this KeyRing was created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &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 -0400122 # `projects/*/locations/*/keyRings/*`.
123}
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 Kim4ed7d3f2020-05-27 12:20:54 -0700136 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this KeyRing was created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &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 -0400138 # `projects/*/locations/*/keyRings/*`.
139 }</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 Kim4ed7d3f2020-05-27 12:20:54 -0700157 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this KeyRing was created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 &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 -0400159 # `projects/*/locations/*/keyRings/*`.
160 }</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).
295 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
296 { # Specifies the audit configuration for a service.
297 # The configuration determines which permission types are logged, and what
298 # identities, if any, are exempted from logging.
299 # An AuditConfig must have one or more AuditLogConfigs.
300 #
301 # If there are AuditConfigs for both `allServices` and a specific service,
302 # the union of the two AuditConfigs is used for that service: the log_types
303 # specified in each AuditConfig are enabled, and the exempted_members in each
304 # AuditLogConfig are exempted.
305 #
306 # Example Policy with multiple AuditConfigs:
307 #
308 # {
309 # &quot;audit_configs&quot;: [
310 # {
311 # &quot;service&quot;: &quot;allServices&quot;
312 # &quot;audit_log_configs&quot;: [
313 # {
314 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
315 # &quot;exempted_members&quot;: [
316 # &quot;user:jose@example.com&quot;
317 # ]
318 # },
319 # {
320 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
321 # },
322 # {
323 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
324 # }
325 # ]
326 # },
327 # {
328 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
329 # &quot;audit_log_configs&quot;: [
330 # {
331 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
332 # },
333 # {
334 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
335 # &quot;exempted_members&quot;: [
336 # &quot;user:aliya@example.com&quot;
337 # ]
338 # }
339 # ]
340 # }
341 # ]
342 # }
343 #
344 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
345 # logging. It also exempts jose@example.com from DATA_READ logging, and
346 # aliya@example.com from DATA_WRITE logging.
347 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
348 { # Provides the configuration for logging a type of permissions.
349 # Example:
350 #
351 # {
352 # &quot;audit_log_configs&quot;: [
353 # {
354 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
355 # &quot;exempted_members&quot;: [
356 # &quot;user:jose@example.com&quot;
357 # ]
358 # },
359 # {
360 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
361 # }
362 # ]
363 # }
364 #
365 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
366 # jose@example.com from DATA_READ logging.
367 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
368 # permission.
369 # Follows the same format of Binding.members.
370 &quot;A String&quot;,
371 ],
372 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
373 },
374 ],
375 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
376 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
377 # `allServices` is a special value that covers all services.
378 },
379 ],
380 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 # `condition` that determines how and when the `bindings` are applied. Each
382 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
385 #
386 # If the condition evaluates to `true`, then this binding applies to the
387 # current request.
388 #
389 # If the condition evaluates to `false`, then this binding does not apply to
390 # the current request. However, a different role binding might grant the same
391 # role to one or more of the members in this binding.
392 #
393 # To learn which resources support conditions in their IAM policies, see the
394 # [IAM
395 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
396 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
397 # are documented at https://github.com/google/cel-spec.
398 #
399 # Example (Comparison):
400 #
401 # title: &quot;Summary size limit&quot;
402 # description: &quot;Determines if a summary is less than 100 chars&quot;
403 # expression: &quot;document.summary.size() &lt; 100&quot;
404 #
405 # Example (Equality):
406 #
407 # title: &quot;Requestor is owner&quot;
408 # description: &quot;Determines if requestor is the document owner&quot;
409 # expression: &quot;document.owner == request.auth.claims.email&quot;
410 #
411 # Example (Logic):
412 #
413 # title: &quot;Public documents&quot;
414 # description: &quot;Determine whether the document should be publicly visible&quot;
415 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
416 #
417 # Example (Data Manipulation):
418 #
419 # title: &quot;Notification string&quot;
420 # description: &quot;Create a notification string with a timestamp.&quot;
421 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
422 #
423 # The exact variables and functions that may be referenced within an expression
424 # are determined by the service that evaluates it. See the service
425 # documentation for additional information.
426 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
427 # its purpose. This can be used e.g. in UIs which allow to enter the
428 # expression.
429 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
430 # reporting, e.g. a file name and a position in the file.
431 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
432 # describes the expression, e.g. when hovered over it in a UI.
433 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
434 # syntax.
435 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700436 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
437 # `members` can have the following values:
438 #
439 # * `allUsers`: A special identifier that represents anyone who is
440 # on the internet; with or without a Google account.
441 #
442 # * `allAuthenticatedUsers`: A special identifier that represents anyone
443 # who is authenticated with a Google account or a service account.
444 #
445 # * `user:{emailid}`: An email address that represents a specific Google
446 # account. For example, `alice@example.com` .
447 #
448 #
449 # * `serviceAccount:{emailid}`: An email address that represents a service
450 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
451 #
452 # * `group:{emailid}`: An email address that represents a Google group.
453 # For example, `admins@example.com`.
454 #
455 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
456 # identifier) representing a user that has been recently deleted. For
457 # example, `alice@example.com?uid=123456789012345678901`. If the user is
458 # recovered, this value reverts to `user:{emailid}` and the recovered user
459 # retains the role in the binding.
460 #
461 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
462 # unique identifier) representing a service account that has been recently
463 # deleted. For example,
464 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
465 # If the service account is undeleted, this value reverts to
466 # `serviceAccount:{emailid}` and the undeleted service account retains the
467 # role in the binding.
468 #
469 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
470 # identifier) representing a Google group that has been recently
471 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
472 # the group is recovered, this value reverts to `group:{emailid}` and the
473 # recovered group retains the role in the binding.
474 #
475 #
476 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
477 # users of that domain. For example, `google.com` or `example.com`.
478 #
479 &quot;A String&quot;,
480 ],
481 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
482 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700489 <code class="details" id="list">list(parent, filter=None, pageToken=None, orderBy=None, pageSize=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 Kim4ed7d3f2020-05-27 12:20:54 -0700495 filter: string, Optional. Only include resources that match the filter in the response. For
496more information, see
497[Sorting and filtering list
498results](https://cloud.google.com/kms/docs/sorting-and-filtering).
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 pageToken: string, Optional. Optional pagination token, returned earlier via
500ListKeyRingsResponse.next_page_token.
Dan O'Mearadd494642020-05-01 07:42:23 -0700501 orderBy: string, Optional. Specify how the results should be sorted. If not specified, the
502results will be sorted in the default order. For more information, see
503[Sorting and filtering list
504results](https://cloud.google.com/kms/docs/sorting-and-filtering).
505 pageSize: integer, Optional. Optional limit on the number of KeyRings to include in the
506response. Further KeyRings can subsequently be obtained by
507including the ListKeyRingsResponse.next_page_token in a subsequent
508request. If unspecified, the server will pick an appropriate default.
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 Kim4ed7d3f2020-05-27 12:20:54 -0700518 &quot;totalSize&quot;: 42, # The total number of KeyRings that matched the query.
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;keyRings&quot;: [ # The list of KeyRings.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400520 { # A KeyRing is a toplevel logical grouping of CryptoKeys.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700521 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which this KeyRing was created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 &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 -0400523 # `projects/*/locations/*/keyRings/*`.
524 },
525 ],
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 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 Kim4ed7d3f2020-05-27 12:20:54 -0700629 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
630 # prevent simultaneous updates of a policy from overwriting each other.
631 # It is strongly suggested that systems make use of the `etag` in the
632 # read-modify-write cycle to perform policy updates in order to avoid race
633 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
634 # systems are expected to put that etag in the request to `setIamPolicy` to
635 # ensure that their change will be applied to the same version of the policy.
636 #
637 # **Important:** If you use IAM Conditions, you must include the `etag` field
638 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
639 # you to overwrite a version `3` policy with a version `1` policy, and all of
640 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -0700641 &quot;version&quot;: 42, # Specifies the format of the policy.
642 #
643 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
644 # are rejected.
645 #
646 # Any operation that affects conditional role bindings must specify version
647 # `3`. This requirement applies to the following operations:
648 #
649 # * Getting a policy that includes a conditional role binding
650 # * Adding a conditional role binding to a policy
651 # * Changing a conditional role binding in a policy
652 # * Removing any role binding, with or without a condition, from a policy
653 # that includes conditions
654 #
655 # **Important:** If you use IAM Conditions, you must include the `etag` field
656 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
657 # you to overwrite a version `3` policy with a version `1` policy, and all of
658 # the conditions in the version `3` policy are lost.
659 #
660 # If a policy does not include any conditions, operations on that policy may
661 # specify any valid version or leave the field unset.
662 #
663 # To learn which resources support conditions in their IAM policies, see the
664 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
665 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
666 { # Specifies the audit configuration for a service.
667 # The configuration determines which permission types are logged, and what
668 # identities, if any, are exempted from logging.
669 # An AuditConfig must have one or more AuditLogConfigs.
670 #
671 # If there are AuditConfigs for both `allServices` and a specific service,
672 # the union of the two AuditConfigs is used for that service: the log_types
673 # specified in each AuditConfig are enabled, and the exempted_members in each
674 # AuditLogConfig are exempted.
675 #
676 # Example Policy with multiple AuditConfigs:
677 #
678 # {
679 # &quot;audit_configs&quot;: [
680 # {
681 # &quot;service&quot;: &quot;allServices&quot;
682 # &quot;audit_log_configs&quot;: [
683 # {
684 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
685 # &quot;exempted_members&quot;: [
686 # &quot;user:jose@example.com&quot;
687 # ]
688 # },
689 # {
690 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
691 # },
692 # {
693 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
694 # }
695 # ]
696 # },
697 # {
698 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
699 # &quot;audit_log_configs&quot;: [
700 # {
701 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
702 # },
703 # {
704 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
705 # &quot;exempted_members&quot;: [
706 # &quot;user:aliya@example.com&quot;
707 # ]
708 # }
709 # ]
710 # }
711 # ]
712 # }
713 #
714 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
715 # logging. It also exempts jose@example.com from DATA_READ logging, and
716 # aliya@example.com from DATA_WRITE logging.
717 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
718 { # Provides the configuration for logging a type of permissions.
719 # Example:
720 #
721 # {
722 # &quot;audit_log_configs&quot;: [
723 # {
724 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
725 # &quot;exempted_members&quot;: [
726 # &quot;user:jose@example.com&quot;
727 # ]
728 # },
729 # {
730 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
731 # }
732 # ]
733 # }
734 #
735 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
736 # jose@example.com from DATA_READ logging.
737 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
738 # permission.
739 # Follows the same format of Binding.members.
740 &quot;A String&quot;,
741 ],
742 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
743 },
744 ],
745 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
746 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
747 # `allServices` is a special value that covers all services.
748 },
749 ],
750 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700751 # `condition` that determines how and when the `bindings` are applied. Each
752 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700753 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
755 #
756 # If the condition evaluates to `true`, then this binding applies to the
757 # current request.
758 #
759 # If the condition evaluates to `false`, then this binding does not apply to
760 # the current request. However, a different role binding might grant the same
761 # role to one or more of the members in this binding.
762 #
763 # To learn which resources support conditions in their IAM policies, see the
764 # [IAM
765 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
766 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
767 # are documented at https://github.com/google/cel-spec.
768 #
769 # Example (Comparison):
770 #
771 # title: &quot;Summary size limit&quot;
772 # description: &quot;Determines if a summary is less than 100 chars&quot;
773 # expression: &quot;document.summary.size() &lt; 100&quot;
774 #
775 # Example (Equality):
776 #
777 # title: &quot;Requestor is owner&quot;
778 # description: &quot;Determines if requestor is the document owner&quot;
779 # expression: &quot;document.owner == request.auth.claims.email&quot;
780 #
781 # Example (Logic):
782 #
783 # title: &quot;Public documents&quot;
784 # description: &quot;Determine whether the document should be publicly visible&quot;
785 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
786 #
787 # Example (Data Manipulation):
788 #
789 # title: &quot;Notification string&quot;
790 # description: &quot;Create a notification string with a timestamp.&quot;
791 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
792 #
793 # The exact variables and functions that may be referenced within an expression
794 # are determined by the service that evaluates it. See the service
795 # documentation for additional information.
796 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
797 # its purpose. This can be used e.g. in UIs which allow to enter the
798 # expression.
799 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
800 # reporting, e.g. a file name and a position in the file.
801 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
802 # describes the expression, e.g. when hovered over it in a UI.
803 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
804 # syntax.
805 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700806 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
807 # `members` can have the following values:
808 #
809 # * `allUsers`: A special identifier that represents anyone who is
810 # on the internet; with or without a Google account.
811 #
812 # * `allAuthenticatedUsers`: A special identifier that represents anyone
813 # who is authenticated with a Google account or a service account.
814 #
815 # * `user:{emailid}`: An email address that represents a specific Google
816 # account. For example, `alice@example.com` .
817 #
818 #
819 # * `serviceAccount:{emailid}`: An email address that represents a service
820 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
821 #
822 # * `group:{emailid}`: An email address that represents a Google group.
823 # For example, `admins@example.com`.
824 #
825 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
826 # identifier) representing a user that has been recently deleted. For
827 # example, `alice@example.com?uid=123456789012345678901`. If the user is
828 # recovered, this value reverts to `user:{emailid}` and the recovered user
829 # retains the role in the binding.
830 #
831 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
832 # unique identifier) representing a service account that has been recently
833 # deleted. For example,
834 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
835 # If the service account is undeleted, this value reverts to
836 # `serviceAccount:{emailid}` and the undeleted service account retains the
837 # role in the binding.
838 #
839 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
840 # identifier) representing a Google group that has been recently
841 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
842 # the group is recovered, this value reverts to `group:{emailid}` and the
843 # recovered group retains the role in the binding.
844 #
845 #
846 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
847 # users of that domain. For example, `google.com` or `example.com`.
848 #
849 &quot;A String&quot;,
850 ],
851 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
852 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700853 },
854 ],
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 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).
974 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
975 { # Specifies the audit configuration for a service.
976 # The configuration determines which permission types are logged, and what
977 # identities, if any, are exempted from logging.
978 # An AuditConfig must have one or more AuditLogConfigs.
979 #
980 # If there are AuditConfigs for both `allServices` and a specific service,
981 # the union of the two AuditConfigs is used for that service: the log_types
982 # specified in each AuditConfig are enabled, and the exempted_members in each
983 # AuditLogConfig are exempted.
984 #
985 # Example Policy with multiple AuditConfigs:
986 #
987 # {
988 # &quot;audit_configs&quot;: [
989 # {
990 # &quot;service&quot;: &quot;allServices&quot;
991 # &quot;audit_log_configs&quot;: [
992 # {
993 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
994 # &quot;exempted_members&quot;: [
995 # &quot;user:jose@example.com&quot;
996 # ]
997 # },
998 # {
999 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1000 # },
1001 # {
1002 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;,
1003 # }
1004 # ]
1005 # },
1006 # {
1007 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;
1008 # &quot;audit_log_configs&quot;: [
1009 # {
1010 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1011 # },
1012 # {
1013 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1014 # &quot;exempted_members&quot;: [
1015 # &quot;user:aliya@example.com&quot;
1016 # ]
1017 # }
1018 # ]
1019 # }
1020 # ]
1021 # }
1022 #
1023 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1024 # logging. It also exempts jose@example.com from DATA_READ logging, and
1025 # aliya@example.com from DATA_WRITE logging.
1026 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1027 { # Provides the configuration for logging a type of permissions.
1028 # Example:
1029 #
1030 # {
1031 # &quot;audit_log_configs&quot;: [
1032 # {
1033 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1034 # &quot;exempted_members&quot;: [
1035 # &quot;user:jose@example.com&quot;
1036 # ]
1037 # },
1038 # {
1039 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1040 # }
1041 # ]
1042 # }
1043 #
1044 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1045 # jose@example.com from DATA_READ logging.
1046 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1047 # permission.
1048 # Follows the same format of Binding.members.
1049 &quot;A String&quot;,
1050 ],
1051 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1052 },
1053 ],
1054 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1055 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1056 # `allServices` is a special value that covers all services.
1057 },
1058 ],
1059 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001060 # `condition` that determines how and when the `bindings` are applied. Each
1061 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001062 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001063 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1064 #
1065 # If the condition evaluates to `true`, then this binding applies to the
1066 # current request.
1067 #
1068 # If the condition evaluates to `false`, then this binding does not apply to
1069 # the current request. However, a different role binding might grant the same
1070 # role to one or more of the members in this binding.
1071 #
1072 # To learn which resources support conditions in their IAM policies, see the
1073 # [IAM
1074 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1075 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1076 # are documented at https://github.com/google/cel-spec.
1077 #
1078 # Example (Comparison):
1079 #
1080 # title: &quot;Summary size limit&quot;
1081 # description: &quot;Determines if a summary is less than 100 chars&quot;
1082 # expression: &quot;document.summary.size() &lt; 100&quot;
1083 #
1084 # Example (Equality):
1085 #
1086 # title: &quot;Requestor is owner&quot;
1087 # description: &quot;Determines if requestor is the document owner&quot;
1088 # expression: &quot;document.owner == request.auth.claims.email&quot;
1089 #
1090 # Example (Logic):
1091 #
1092 # title: &quot;Public documents&quot;
1093 # description: &quot;Determine whether the document should be publicly visible&quot;
1094 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1095 #
1096 # Example (Data Manipulation):
1097 #
1098 # title: &quot;Notification string&quot;
1099 # description: &quot;Create a notification string with a timestamp.&quot;
1100 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1101 #
1102 # The exact variables and functions that may be referenced within an expression
1103 # are determined by the service that evaluates it. See the service
1104 # documentation for additional information.
1105 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1106 # its purpose. This can be used e.g. in UIs which allow to enter the
1107 # expression.
1108 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1109 # reporting, e.g. a file name and a position in the file.
1110 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1111 # describes the expression, e.g. when hovered over it in a UI.
1112 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1113 # syntax.
1114 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001115 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
1116 # `members` can have the following values:
1117 #
1118 # * `allUsers`: A special identifier that represents anyone who is
1119 # on the internet; with or without a Google account.
1120 #
1121 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1122 # who is authenticated with a Google account or a service account.
1123 #
1124 # * `user:{emailid}`: An email address that represents a specific Google
1125 # account. For example, `alice@example.com` .
1126 #
1127 #
1128 # * `serviceAccount:{emailid}`: An email address that represents a service
1129 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1130 #
1131 # * `group:{emailid}`: An email address that represents a Google group.
1132 # For example, `admins@example.com`.
1133 #
1134 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1135 # identifier) representing a user that has been recently deleted. For
1136 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1137 # recovered, this value reverts to `user:{emailid}` and the recovered user
1138 # retains the role in the binding.
1139 #
1140 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1141 # unique identifier) representing a service account that has been recently
1142 # deleted. For example,
1143 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1144 # If the service account is undeleted, this value reverts to
1145 # `serviceAccount:{emailid}` and the undeleted service account retains the
1146 # role in the binding.
1147 #
1148 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1149 # identifier) representing a Google group that has been recently
1150 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1151 # the group is recovered, this value reverts to `group:{emailid}` and the
1152 # recovered group retains the role in the binding.
1153 #
1154 #
1155 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1156 # users of that domain. For example, `google.com` or `example.com`.
1157 #
1158 &quot;A String&quot;,
1159 ],
1160 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1161 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
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>