Debian Codegraph @

docs/dyn/compute_beta.licenseCodes.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, 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
75 <h1><a href="compute_beta.html">Compute Engine API</a> . <a href="compute_beta.licenseCodes.html">licenseCodes</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#get">get(project, licenseCode, x__xgafv=None)</a></code></p>
82 <p class="firstline">Return a specified license code. License codes are mirrored across</p>
83 <p class="toc_element">
84 <code><a href="#getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Gets the access control policy for a resource. May be empty if no such</p>
86 <p class="toc_element">
87 <code><a href="#setIamPolicy">setIamPolicy(project, resource, body=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Sets the access control policy on the specified resource.</p>
89 <p class="toc_element">
90 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Returns permissions that a caller has on the specified resource.</p>
92 <h3>Method Details</h3>
93 <div class="method">
94 <code class="details" id="close">close()</code>
95 <pre>Close httplib2 connections.</pre>
96 </div>
97
98 <div class="method">
99 <code class="details" id="get">get(project, licenseCode, x__xgafv=None)</code>
100 <pre>Return a specified license code. License codes are mirrored across
101 all projects that have permissions to read the License Code.
102 *Caution* This resource is intended
103 for use only by third-party partners who are creatingCloud Marketplace
104 images.
105
106 Args:
107 project: string, Project ID for this request. (required)
108 licenseCode: string, Number corresponding to the License code resource to return. (required)
109 x__xgafv: string, V1 error format.
110 Allowed values
111 1 - v1 error format
112 2 - v2 error format
113
114 Returns:
115 An object of the form:
116
117 { # Represents a License Code resource.
118 #
119 # A License Code is a unique identifier used to represent alicense
120 # resource.
121 # *Caution* This resource is intended for
122 # use only by third-party partners who are creatingCloud Marketplace
123 # images.
124 &quot;allowedReplacementLicenses&quot;: [ # Specifies licenseCodes of licenses that can replace this license. Note:
125 # such replacements are allowed even if removable_from_disk is false.
126 &quot;A String&quot;,
127 ],
128 &quot;appendableToDisk&quot;: True or False, # If true, this license can be appended to an existing disk&#x27;s set of
129 # licenses.
130 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
131 # text format.
132 &quot;description&quot;: &quot;A String&quot;, # Output only. [Output Only] Description of this License Code.
133 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
134 # defined by the server.
135 &quot;incompatibleLicenses&quot;: [ # Specifies licenseCodes of licenses that are incompatible with this license.
136 # If a license is incompatible with this license, it cannot be attached to
137 # the same disk or image.
138 &quot;A String&quot;,
139 ],
140 &quot;kind&quot;: &quot;compute#licenseCode&quot;, # Output only. [Output Only] Type of resource. Always compute#licenseCode for
141 # licenses.
142 &quot;licenseAlias&quot;: [ # [Output Only] URL and description aliases of Licenses with the same
143 # License Code.
144 {
145 &quot;description&quot;: &quot;A String&quot;, # Output only. [Output Only] Description of this License Code.
146 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of license corresponding to this License Code.
147 },
148 ],
149 &quot;minimumRetention&quot;: { # A Duration represents a fixed-length span of time represented # If set, this license will be unable to be removed or replaced once attached
150 # to a disk until the minimum_retention period has passed.
151 # as a count of seconds and fractions of seconds at nanosecond
152 # resolution. It is independent of any calendar and concepts like &quot;day&quot;
153 # or &quot;month&quot;. Range is approximately 10,000 years.
154 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution.
155 # Durations less than one second are represented with a 0
156 # `seconds` field and a positive `nanos` field. Must be from 0
157 # to 999,999,999 inclusive.
158 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0
159 # to 315,576,000,000 inclusive. Note: these bounds are computed from:
160 # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
161 },
162 &quot;multiTenantOnly&quot;: True or False, # If true, this license can only be used on VMs on multi tenant nodes.
163 &quot;name&quot;: &quot;A String&quot;, # Output only. [Output Only] Name of the resource. The name is 1-20 characters long and
164 # must be a valid 64 bit integer.
165 &quot;osLicense&quot;: True or False, # If true, indicates this is an OS license. Only one OS license can be
166 # attached to a disk or image at a time.
167 &quot;removableFromDisk&quot;: True or False, # If true, this license can be removed from a disk&#x27;s set of licenses, with no
168 # replacement license needed.
169 &quot;requiredCoattachedLicenses&quot;: [ # Specifies the set of permissible coattached licenseCodes of licenses that
170 # satisfy the coattachment requirement of this license. At least one license
171 # from the set must be attached to the same disk or image as this license.
172 &quot;A String&quot;,
173 ],
174 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for the resource.
175 &quot;soleTenantOnly&quot;: True or False, # If true, this license can only be used on VMs on sole tenant nodes.
176 &quot;state&quot;: &quot;A String&quot;, # Output only. [Output Only] Current state of this License Code.
177 &quot;transferable&quot;: True or False, # Output only. [Output Only] If true, the license will remain attached when creating
178 # images or snapshots from disks. Otherwise, the license is not transferred.
179 &quot;updateTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Last update timestamp inRFC3339
180 # text format.
181 }</pre>
182 </div>
183
184 <div class="method">
185 <code class="details" id="getIamPolicy">getIamPolicy(project, resource, optionsRequestedPolicyVersion=None, x__xgafv=None)</code>
186 <pre>Gets the access control policy for a resource. May be empty if no such
187 policy or resource exists.
188 *Caution* This resource is intended
189 for use only by third-party partners who are creatingCloud Marketplace
190 images.
191
192 Args:
193 project: string, Project ID for this request. (required)
194 resource: string, Name or id of the resource for this request. (required)
195 optionsRequestedPolicyVersion: integer, Requested IAM Policy version.
196 x__xgafv: string, V1 error format.
197 Allowed values
198 1 - v1 error format
199 2 - v2 error format
200
201 Returns:
202 An object of the form:
203
204 { # An Identity and Access Management (IAM) policy, which specifies access
205 # controls for Google Cloud resources.
206 #
207 #
208 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
209 # `members`, or principals, to a single `role`. Principals can be user
210 # accounts, service accounts, Google groups, and domains (such as G Suite). A
211 # `role` is a named list of permissions; each `role` can be an IAM predefined
212 # role or a user-created custom role.
213 #
214 # For some types of Google Cloud resources, a `binding` can also specify a
215 # `condition`, which is a logical expression that allows access to a resource
216 # only if the expression evaluates to `true`. A condition can add constraints
217 # based on attributes of the request, the resource, or both. To learn which
218 # resources support conditions in their IAM policies, see the
219 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
220 #
221 # **JSON example:**
222 #
223 # ```
224 # {
225 # &quot;bindings&quot;: [
226 # {
227 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
228 # &quot;members&quot;: [
229 # &quot;user:[email protected]&quot;,
230 # &quot;group:[email protected]&quot;,
231 # &quot;domain:google.com&quot;,
232 # &quot;serviceAccount:[email protected]&quot;
233 # ]
234 # },
235 # {
236 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
237 # &quot;members&quot;: [
238 # &quot;user:[email protected]&quot;
239 # ],
240 # &quot;condition&quot;: {
241 # &quot;title&quot;: &quot;expirable access&quot;,
242 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
243 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
244 # }
245 # }
246 # ],
247 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
248 # &quot;version&quot;: 3
249 # }
250 # ```
251 #
252 # **YAML example:**
253 #
254 # ```
255 # bindings:
256 # - members:
257 # - user:[email protected]
258 # - group:[email protected]
259 # - domain:google.com
260 # - serviceAccount:[email protected]
261 # role: roles/resourcemanager.organizationAdmin
262 # - members:
263 # - user:[email protected]
264 # role: roles/resourcemanager.organizationViewer
265 # condition:
266 # title: expirable access
267 # description: Does not grant access after Sep 2020
268 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
269 # etag: BwWWja0YfJA=
270 # version: 3
271 # ```
272 #
273 # For a description of IAM and its features, see the
274 # [IAM documentation](https://cloud.google.com/iam/docs/).
275 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
276 { # Specifies the audit configuration for a service.
277 # The configuration determines which permission types are logged, and what
278 # identities, if any, are exempted from logging.
279 # An AuditConfig must have one or more AuditLogConfigs.
280 #
281 # If there are AuditConfigs for both `allServices` and a specific service,
282 # the union of the two AuditConfigs is used for that service: the log_types
283 # specified in each AuditConfig are enabled, and the exempted_members in each
284 # AuditLogConfig are exempted.
285 #
286 # Example Policy with multiple AuditConfigs:
287 #
288 # {
289 # &quot;audit_configs&quot;: [
290 # {
291 # &quot;service&quot;: &quot;allServices&quot;,
292 # &quot;audit_log_configs&quot;: [
293 # {
294 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
295 # &quot;exempted_members&quot;: [
296 # &quot;user:[email protected]&quot;
297 # ]
298 # },
299 # {
300 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
301 # },
302 # {
303 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
304 # }
305 # ]
306 # },
307 # {
308 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
309 # &quot;audit_log_configs&quot;: [
310 # {
311 # &quot;log_type&quot;: &quot;DATA_READ&quot;
312 # },
313 # {
314 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
315 # &quot;exempted_members&quot;: [
316 # &quot;user:[email protected]&quot;
317 # ]
318 # }
319 # ]
320 # }
321 # ]
322 # }
323 #
324 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
325 # logging. It also exempts `[email protected]` from DATA_READ logging, and
326 # `[email protected]` from DATA_WRITE logging.
327 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
328 { # Provides the configuration for logging a type of permissions.
329 # Example:
330 #
331 # {
332 # &quot;audit_log_configs&quot;: [
333 # {
334 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
335 # &quot;exempted_members&quot;: [
336 # &quot;user:[email protected]&quot;
337 # ]
338 # },
339 # {
340 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
341 # }
342 # ]
343 # }
344 #
345 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
346 # [email protected] from DATA_READ logging.
347 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
348 # permission.
349 # Follows the same format of Binding.members.
350 &quot;A String&quot;,
351 ],
352 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
353 },
354 ],
355 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
356 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
357 # `allServices` is a special value that covers all services.
358 },
359 ],
360 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally,
361 # may specify a `condition` that determines how and when the `bindings` are
362 # applied. Each of the `bindings` must contain at least one principal.
363 #
364 # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
365 # of these principals can be Google groups. Each occurrence of a principal
366 # counts towards these limits. For example, if the `bindings` grant 50
367 # different roles to `user:[email protected]`, and not to any other
368 # principal, then you can add another 1,450 principals to the `bindings` in
369 # the `Policy`.
370 { # Associates `members`, or principals, with a `role`.
371 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
372 #
373 # If the condition evaluates to `true`, then this binding applies to the
374 # current request.
375 #
376 # If the condition evaluates to `false`, then this binding does not apply to
377 # the current request. However, a different role binding might grant the same
378 # role to one or more of the principals in this binding.
379 #
380 # To learn which resources support conditions in their IAM policies, see the
381 # [IAM
382 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
383 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
384 # are documented at https://github.com/google/cel-spec.
385 #
386 # Example (Comparison):
387 #
388 # title: &quot;Summary size limit&quot;
389 # description: &quot;Determines if a summary is less than 100 chars&quot;
390 # expression: &quot;document.summary.size() &lt; 100&quot;
391 #
392 # Example (Equality):
393 #
394 # title: &quot;Requestor is owner&quot;
395 # description: &quot;Determines if requestor is the document owner&quot;
396 # expression: &quot;document.owner == request.auth.claims.email&quot;
397 #
398 # Example (Logic):
399 #
400 # title: &quot;Public documents&quot;
401 # description: &quot;Determine whether the document should be publicly visible&quot;
402 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
403 #
404 # Example (Data Manipulation):
405 #
406 # title: &quot;Notification string&quot;
407 # description: &quot;Create a notification string with a timestamp.&quot;
408 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
409 #
410 # The exact variables and functions that may be referenced within an expression
411 # are determined by the service that evaluates it. See the service
412 # documentation for additional information.
413 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
414 # describes the expression, e.g. when hovered over it in a UI.
415 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
416 # syntax.
417 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
418 # reporting, e.g. a file name and a position in the file.
419 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
420 # its purpose. This can be used e.g. in UIs which allow to enter the
421 # expression.
422 },
423 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource.
424 # `members` can have the following values:
425 #
426 # * `allUsers`: A special identifier that represents anyone who is
427 # on the internet; with or without a Google account.
428 #
429 # * `allAuthenticatedUsers`: A special identifier that represents anyone
430 # who is authenticated with a Google account or a service account.
431 # Does not include identities that come from external identity providers
432 # (IdPs) through identity federation.
433 #
434 # * `user:{emailid}`: An email address that represents a specific Google
435 # account. For example, `[email protected]` .
436 #
437 #
438 # * `serviceAccount:{emailid}`: An email address that represents a Google
439 # service account. For example,
440 # `[email protected]`.
441 #
442 # * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
443 # identifier for a
444 # [Kubernetes service
445 # account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
446 # For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.
447 #
448 # * `group:{emailid}`: An email address that represents a Google group.
449 # For example, `[email protected]`.
450 #
451 #
452 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
453 # users of that domain. For example, `google.com` or `example.com`.
454 #
455 #
456 #
457 #
458 # * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
459 # A single identity in a workforce identity pool.
460 #
461 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
462 # All workforce identities in a group.
463 #
464 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
465 # All workforce identities with a specific attribute value.
466 #
467 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:
468 # All identities in a workforce identity pool.
469 #
470 # * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:
471 # A single identity in a workload identity pool.
472 #
473 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:
474 # A workload identity pool group.
475 #
476 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
477 # All identities in a workload identity pool with a certain attribute.
478 #
479 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:
480 # All identities in a workload identity pool.
481 #
482 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
483 # identifier) representing a user that has been recently deleted. For
484 # example, `[email protected]?uid=123456789012345678901`. If the user is
485 # recovered, this value reverts to `user:{emailid}` and the recovered user
486 # retains the role in the binding.
487 #
488 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
489 # unique identifier) representing a service account that has been recently
490 # deleted. For example,
491 # `[email protected]?uid=123456789012345678901`.
492 # If the service account is undeleted, this value reverts to
493 # `serviceAccount:{emailid}` and the undeleted service account retains the
494 # role in the binding.
495 #
496 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
497 # identifier) representing a Google group that has been recently
498 # deleted. For example, `[email protected]?uid=123456789012345678901`. If
499 # the group is recovered, this value reverts to `group:{emailid}` and the
500 # recovered group retains the role in the binding.
501 #
502 # * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
503 # Deleted single identity in a workforce identity pool. For example,
504 # `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
505 &quot;A String&quot;,
506 ],
507 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals.
508 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
509 #
510 # For an overview of the IAM roles and permissions, see the
511 # [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For
512 # a list of the available pre-defined roles, see
513 # [here](https://cloud.google.com/iam/docs/understanding-roles).
514 },
515 ],
516 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
517 # prevent simultaneous updates of a policy from overwriting each other.
518 # It is strongly suggested that systems make use of the `etag` in the
519 # read-modify-write cycle to perform policy updates in order to avoid race
520 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
521 # systems are expected to put that etag in the request to `setIamPolicy` to
522 # ensure that their change will be applied to the same version of the policy.
523 #
524 # **Important:** If you use IAM Conditions, you must include the `etag` field
525 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
526 # you to overwrite a version `3` policy with a version `1` policy, and all of
527 # the conditions in the version `3` policy are lost.
528 &quot;version&quot;: 42, # Specifies the format of the policy.
529 #
530 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
531 # are rejected.
532 #
533 # Any operation that affects conditional role bindings must specify version
534 # `3`. This requirement applies to the following operations:
535 #
536 # * Getting a policy that includes a conditional role binding
537 # * Adding a conditional role binding to a policy
538 # * Changing a conditional role binding in a policy
539 # * Removing any role binding, with or without a condition, from a policy
540 # that includes conditions
541 #
542 # **Important:** If you use IAM Conditions, you must include the `etag` field
543 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
544 # you to overwrite a version `3` policy with a version `1` policy, and all of
545 # the conditions in the version `3` policy are lost.
546 #
547 # If a policy does not include any conditions, operations on that policy may
548 # specify any valid version or leave the field unset.
549 #
550 # To learn which resources support conditions in their IAM policies, see the
551 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
552 }</pre>
553 </div>
554
555 <div class="method">
556 <code class="details" id="setIamPolicy">setIamPolicy(project, resource, body=None, x__xgafv=None)</code>
557 <pre>Sets the access control policy on the specified resource.
558 Replaces any existing policy.
559 *Caution* This resource is intended
560 for use only by third-party partners who are creatingCloud Marketplace
561 images.
562
563 Args:
564 project: string, Project ID for this request. (required)
565 resource: string, Name or id of the resource for this request. (required)
566 body: object, The request body.
567 The object takes the form of:
568
569 {
570 &quot;bindings&quot;: [ # Flatten Policy to create a backward compatible wire-format.
571 # Deprecated. Use &#x27;policy&#x27; to specify bindings.
572 { # Associates `members`, or principals, with a `role`.
573 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
574 #
575 # If the condition evaluates to `true`, then this binding applies to the
576 # current request.
577 #
578 # If the condition evaluates to `false`, then this binding does not apply to
579 # the current request. However, a different role binding might grant the same
580 # role to one or more of the principals in this binding.
581 #
582 # To learn which resources support conditions in their IAM policies, see the
583 # [IAM
584 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
585 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
586 # are documented at https://github.com/google/cel-spec.
587 #
588 # Example (Comparison):
589 #
590 # title: &quot;Summary size limit&quot;
591 # description: &quot;Determines if a summary is less than 100 chars&quot;
592 # expression: &quot;document.summary.size() &lt; 100&quot;
593 #
594 # Example (Equality):
595 #
596 # title: &quot;Requestor is owner&quot;
597 # description: &quot;Determines if requestor is the document owner&quot;
598 # expression: &quot;document.owner == request.auth.claims.email&quot;
599 #
600 # Example (Logic):
601 #
602 # title: &quot;Public documents&quot;
603 # description: &quot;Determine whether the document should be publicly visible&quot;
604 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
605 #
606 # Example (Data Manipulation):
607 #
608 # title: &quot;Notification string&quot;
609 # description: &quot;Create a notification string with a timestamp.&quot;
610 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
611 #
612 # The exact variables and functions that may be referenced within an expression
613 # are determined by the service that evaluates it. See the service
614 # documentation for additional information.
615 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
616 # describes the expression, e.g. when hovered over it in a UI.
617 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
618 # syntax.
619 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
620 # reporting, e.g. a file name and a position in the file.
621 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
622 # its purpose. This can be used e.g. in UIs which allow to enter the
623 # expression.
624 },
625 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource.
626 # `members` can have the following values:
627 #
628 # * `allUsers`: A special identifier that represents anyone who is
629 # on the internet; with or without a Google account.
630 #
631 # * `allAuthenticatedUsers`: A special identifier that represents anyone
632 # who is authenticated with a Google account or a service account.
633 # Does not include identities that come from external identity providers
634 # (IdPs) through identity federation.
635 #
636 # * `user:{emailid}`: An email address that represents a specific Google
637 # account. For example, `[email protected]` .
638 #
639 #
640 # * `serviceAccount:{emailid}`: An email address that represents a Google
641 # service account. For example,
642 # `[email protected]`.
643 #
644 # * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
645 # identifier for a
646 # [Kubernetes service
647 # account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
648 # For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.
649 #
650 # * `group:{emailid}`: An email address that represents a Google group.
651 # For example, `[email protected]`.
652 #
653 #
654 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
655 # users of that domain. For example, `google.com` or `example.com`.
656 #
657 #
658 #
659 #
660 # * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
661 # A single identity in a workforce identity pool.
662 #
663 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
664 # All workforce identities in a group.
665 #
666 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
667 # All workforce identities with a specific attribute value.
668 #
669 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:
670 # All identities in a workforce identity pool.
671 #
672 # * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:
673 # A single identity in a workload identity pool.
674 #
675 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:
676 # A workload identity pool group.
677 #
678 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
679 # All identities in a workload identity pool with a certain attribute.
680 #
681 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:
682 # All identities in a workload identity pool.
683 #
684 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
685 # identifier) representing a user that has been recently deleted. For
686 # example, `[email protected]?uid=123456789012345678901`. If the user is
687 # recovered, this value reverts to `user:{emailid}` and the recovered user
688 # retains the role in the binding.
689 #
690 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
691 # unique identifier) representing a service account that has been recently
692 # deleted. For example,
693 # `[email protected]?uid=123456789012345678901`.
694 # If the service account is undeleted, this value reverts to
695 # `serviceAccount:{emailid}` and the undeleted service account retains the
696 # role in the binding.
697 #
698 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
699 # identifier) representing a Google group that has been recently
700 # deleted. For example, `[email protected]?uid=123456789012345678901`. If
701 # the group is recovered, this value reverts to `group:{emailid}` and the
702 # recovered group retains the role in the binding.
703 #
704 # * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
705 # Deleted single identity in a workforce identity pool. For example,
706 # `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
707 &quot;A String&quot;,
708 ],
709 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals.
710 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
711 #
712 # For an overview of the IAM roles and permissions, see the
713 # [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For
714 # a list of the available pre-defined roles, see
715 # [here](https://cloud.google.com/iam/docs/understanding-roles).
716 },
717 ],
718 &quot;etag&quot;: &quot;A String&quot;, # Flatten Policy to create a backward compatible wire-format.
719 # Deprecated. Use &#x27;policy&#x27; to specify the etag.
720 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the &#x27;resource&#x27;. The size of
721 # the policy is limited to a few 10s of KB. An empty policy is in general a
722 # valid policy but certain services (like Projects) might reject them.
723 # controls for Google Cloud resources.
724 #
725 #
726 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
727 # `members`, or principals, to a single `role`. Principals can be user
728 # accounts, service accounts, Google groups, and domains (such as G Suite). A
729 # `role` is a named list of permissions; each `role` can be an IAM predefined
730 # role or a user-created custom role.
731 #
732 # For some types of Google Cloud resources, a `binding` can also specify a
733 # `condition`, which is a logical expression that allows access to a resource
734 # only if the expression evaluates to `true`. A condition can add constraints
735 # based on attributes of the request, the resource, or both. To learn which
736 # resources support conditions in their IAM policies, see the
737 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
738 #
739 # **JSON example:**
740 #
741 # ```
742 # {
743 # &quot;bindings&quot;: [
744 # {
745 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
746 # &quot;members&quot;: [
747 # &quot;user:[email protected]&quot;,
748 # &quot;group:[email protected]&quot;,
749 # &quot;domain:google.com&quot;,
750 # &quot;serviceAccount:[email protected]&quot;
751 # ]
752 # },
753 # {
754 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
755 # &quot;members&quot;: [
756 # &quot;user:[email protected]&quot;
757 # ],
758 # &quot;condition&quot;: {
759 # &quot;title&quot;: &quot;expirable access&quot;,
760 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
761 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
762 # }
763 # }
764 # ],
765 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
766 # &quot;version&quot;: 3
767 # }
768 # ```
769 #
770 # **YAML example:**
771 #
772 # ```
773 # bindings:
774 # - members:
775 # - user:[email protected]
776 # - group:[email protected]
777 # - domain:google.com
778 # - serviceAccount:[email protected]
779 # role: roles/resourcemanager.organizationAdmin
780 # - members:
781 # - user:[email protected]
782 # role: roles/resourcemanager.organizationViewer
783 # condition:
784 # title: expirable access
785 # description: Does not grant access after Sep 2020
786 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
787 # etag: BwWWja0YfJA=
788 # version: 3
789 # ```
790 #
791 # For a description of IAM and its features, see the
792 # [IAM documentation](https://cloud.google.com/iam/docs/).
793 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
794 { # Specifies the audit configuration for a service.
795 # The configuration determines which permission types are logged, and what
796 # identities, if any, are exempted from logging.
797 # An AuditConfig must have one or more AuditLogConfigs.
798 #
799 # If there are AuditConfigs for both `allServices` and a specific service,
800 # the union of the two AuditConfigs is used for that service: the log_types
801 # specified in each AuditConfig are enabled, and the exempted_members in each
802 # AuditLogConfig are exempted.
803 #
804 # Example Policy with multiple AuditConfigs:
805 #
806 # {
807 # &quot;audit_configs&quot;: [
808 # {
809 # &quot;service&quot;: &quot;allServices&quot;,
810 # &quot;audit_log_configs&quot;: [
811 # {
812 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
813 # &quot;exempted_members&quot;: [
814 # &quot;user:[email protected]&quot;
815 # ]
816 # },
817 # {
818 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
819 # },
820 # {
821 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
822 # }
823 # ]
824 # },
825 # {
826 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
827 # &quot;audit_log_configs&quot;: [
828 # {
829 # &quot;log_type&quot;: &quot;DATA_READ&quot;
830 # },
831 # {
832 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
833 # &quot;exempted_members&quot;: [
834 # &quot;user:[email protected]&quot;
835 # ]
836 # }
837 # ]
838 # }
839 # ]
840 # }
841 #
842 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
843 # logging. It also exempts `[email protected]` from DATA_READ logging, and
844 # `[email protected]` from DATA_WRITE logging.
845 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
846 { # Provides the configuration for logging a type of permissions.
847 # Example:
848 #
849 # {
850 # &quot;audit_log_configs&quot;: [
851 # {
852 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
853 # &quot;exempted_members&quot;: [
854 # &quot;user:[email protected]&quot;
855 # ]
856 # },
857 # {
858 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
859 # }
860 # ]
861 # }
862 #
863 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
864 # [email protected] from DATA_READ logging.
865 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
866 # permission.
867 # Follows the same format of Binding.members.
868 &quot;A String&quot;,
869 ],
870 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
871 },
872 ],
873 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
874 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
875 # `allServices` is a special value that covers all services.
876 },
877 ],
878 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally,
879 # may specify a `condition` that determines how and when the `bindings` are
880 # applied. Each of the `bindings` must contain at least one principal.
881 #
882 # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
883 # of these principals can be Google groups. Each occurrence of a principal
884 # counts towards these limits. For example, if the `bindings` grant 50
885 # different roles to `user:[email protected]`, and not to any other
886 # principal, then you can add another 1,450 principals to the `bindings` in
887 # the `Policy`.
888 { # Associates `members`, or principals, with a `role`.
889 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
890 #
891 # If the condition evaluates to `true`, then this binding applies to the
892 # current request.
893 #
894 # If the condition evaluates to `false`, then this binding does not apply to
895 # the current request. However, a different role binding might grant the same
896 # role to one or more of the principals in this binding.
897 #
898 # To learn which resources support conditions in their IAM policies, see the
899 # [IAM
900 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
901 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
902 # are documented at https://github.com/google/cel-spec.
903 #
904 # Example (Comparison):
905 #
906 # title: &quot;Summary size limit&quot;
907 # description: &quot;Determines if a summary is less than 100 chars&quot;
908 # expression: &quot;document.summary.size() &lt; 100&quot;
909 #
910 # Example (Equality):
911 #
912 # title: &quot;Requestor is owner&quot;
913 # description: &quot;Determines if requestor is the document owner&quot;
914 # expression: &quot;document.owner == request.auth.claims.email&quot;
915 #
916 # Example (Logic):
917 #
918 # title: &quot;Public documents&quot;
919 # description: &quot;Determine whether the document should be publicly visible&quot;
920 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
921 #
922 # Example (Data Manipulation):
923 #
924 # title: &quot;Notification string&quot;
925 # description: &quot;Create a notification string with a timestamp.&quot;
926 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
927 #
928 # The exact variables and functions that may be referenced within an expression
929 # are determined by the service that evaluates it. See the service
930 # documentation for additional information.
931 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
932 # describes the expression, e.g. when hovered over it in a UI.
933 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
934 # syntax.
935 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
936 # reporting, e.g. a file name and a position in the file.
937 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
938 # its purpose. This can be used e.g. in UIs which allow to enter the
939 # expression.
940 },
941 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource.
942 # `members` can have the following values:
943 #
944 # * `allUsers`: A special identifier that represents anyone who is
945 # on the internet; with or without a Google account.
946 #
947 # * `allAuthenticatedUsers`: A special identifier that represents anyone
948 # who is authenticated with a Google account or a service account.
949 # Does not include identities that come from external identity providers
950 # (IdPs) through identity federation.
951 #
952 # * `user:{emailid}`: An email address that represents a specific Google
953 # account. For example, `[email protected]` .
954 #
955 #
956 # * `serviceAccount:{emailid}`: An email address that represents a Google
957 # service account. For example,
958 # `[email protected]`.
959 #
960 # * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
961 # identifier for a
962 # [Kubernetes service
963 # account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
964 # For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.
965 #
966 # * `group:{emailid}`: An email address that represents a Google group.
967 # For example, `[email protected]`.
968 #
969 #
970 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
971 # users of that domain. For example, `google.com` or `example.com`.
972 #
973 #
974 #
975 #
976 # * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
977 # A single identity in a workforce identity pool.
978 #
979 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
980 # All workforce identities in a group.
981 #
982 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
983 # All workforce identities with a specific attribute value.
984 #
985 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:
986 # All identities in a workforce identity pool.
987 #
988 # * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:
989 # A single identity in a workload identity pool.
990 #
991 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:
992 # A workload identity pool group.
993 #
994 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
995 # All identities in a workload identity pool with a certain attribute.
996 #
997 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:
998 # All identities in a workload identity pool.
999 #
1000 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1001 # identifier) representing a user that has been recently deleted. For
1002 # example, `[email protected]?uid=123456789012345678901`. If the user is
1003 # recovered, this value reverts to `user:{emailid}` and the recovered user
1004 # retains the role in the binding.
1005 #
1006 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1007 # unique identifier) representing a service account that has been recently
1008 # deleted. For example,
1009 # `[email protected]?uid=123456789012345678901`.
1010 # If the service account is undeleted, this value reverts to
1011 # `serviceAccount:{emailid}` and the undeleted service account retains the
1012 # role in the binding.
1013 #
1014 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1015 # identifier) representing a Google group that has been recently
1016 # deleted. For example, `[email protected]?uid=123456789012345678901`. If
1017 # the group is recovered, this value reverts to `group:{emailid}` and the
1018 # recovered group retains the role in the binding.
1019 #
1020 # * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
1021 # Deleted single identity in a workforce identity pool. For example,
1022 # `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
1023 &quot;A String&quot;,
1024 ],
1025 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals.
1026 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1027 #
1028 # For an overview of the IAM roles and permissions, see the
1029 # [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For
1030 # a list of the available pre-defined roles, see
1031 # [here](https://cloud.google.com/iam/docs/understanding-roles).
1032 },
1033 ],
1034 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1035 # prevent simultaneous updates of a policy from overwriting each other.
1036 # It is strongly suggested that systems make use of the `etag` in the
1037 # read-modify-write cycle to perform policy updates in order to avoid race
1038 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1039 # systems are expected to put that etag in the request to `setIamPolicy` to
1040 # ensure that their change will be applied to the same version of the policy.
1041 #
1042 # **Important:** If you use IAM Conditions, you must include the `etag` field
1043 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1044 # you to overwrite a version `3` policy with a version `1` policy, and all of
1045 # the conditions in the version `3` policy are lost.
1046 &quot;version&quot;: 42, # Specifies the format of the policy.
1047 #
1048 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1049 # are rejected.
1050 #
1051 # Any operation that affects conditional role bindings must specify version
1052 # `3`. This requirement applies to the following operations:
1053 #
1054 # * Getting a policy that includes a conditional role binding
1055 # * Adding a conditional role binding to a policy
1056 # * Changing a conditional role binding in a policy
1057 # * Removing any role binding, with or without a condition, from a policy
1058 # that includes conditions
1059 #
1060 # **Important:** If you use IAM Conditions, you must include the `etag` field
1061 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1062 # you to overwrite a version `3` policy with a version `1` policy, and all of
1063 # the conditions in the version `3` policy are lost.
1064 #
1065 # If a policy does not include any conditions, operations on that policy may
1066 # specify any valid version or leave the field unset.
1067 #
1068 # To learn which resources support conditions in their IAM policies, see the
1069 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1070 },
1071 }
1072
1073 x__xgafv: string, V1 error format.
1074 Allowed values
1075 1 - v1 error format
1076 2 - v2 error format
1077
1078 Returns:
1079 An object of the form:
1080
1081 { # An Identity and Access Management (IAM) policy, which specifies access
1082 # controls for Google Cloud resources.
1083 #
1084 #
1085 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1086 # `members`, or principals, to a single `role`. Principals can be user
1087 # accounts, service accounts, Google groups, and domains (such as G Suite). A
1088 # `role` is a named list of permissions; each `role` can be an IAM predefined
1089 # role or a user-created custom role.
1090 #
1091 # For some types of Google Cloud resources, a `binding` can also specify a
1092 # `condition`, which is a logical expression that allows access to a resource
1093 # only if the expression evaluates to `true`. A condition can add constraints
1094 # based on attributes of the request, the resource, or both. To learn which
1095 # resources support conditions in their IAM policies, see the
1096 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1097 #
1098 # **JSON example:**
1099 #
1100 # ```
1101 # {
1102 # &quot;bindings&quot;: [
1103 # {
1104 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1105 # &quot;members&quot;: [
1106 # &quot;user:[email protected]&quot;,
1107 # &quot;group:[email protected]&quot;,
1108 # &quot;domain:google.com&quot;,
1109 # &quot;serviceAccount:[email protected]&quot;
1110 # ]
1111 # },
1112 # {
1113 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1114 # &quot;members&quot;: [
1115 # &quot;user:[email protected]&quot;
1116 # ],
1117 # &quot;condition&quot;: {
1118 # &quot;title&quot;: &quot;expirable access&quot;,
1119 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1120 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
1121 # }
1122 # }
1123 # ],
1124 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1125 # &quot;version&quot;: 3
1126 # }
1127 # ```
1128 #
1129 # **YAML example:**
1130 #
1131 # ```
1132 # bindings:
1133 # - members:
1134 # - user:[email protected]
1135 # - group:[email protected]
1136 # - domain:google.com
1137 # - serviceAccount:[email protected]
1138 # role: roles/resourcemanager.organizationAdmin
1139 # - members:
1140 # - user:[email protected]
1141 # role: roles/resourcemanager.organizationViewer
1142 # condition:
1143 # title: expirable access
1144 # description: Does not grant access after Sep 2020
1145 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
1146 # etag: BwWWja0YfJA=
1147 # version: 3
1148 # ```
1149 #
1150 # For a description of IAM and its features, see the
1151 # [IAM documentation](https://cloud.google.com/iam/docs/).
1152 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1153 { # Specifies the audit configuration for a service.
1154 # The configuration determines which permission types are logged, and what
1155 # identities, if any, are exempted from logging.
1156 # An AuditConfig must have one or more AuditLogConfigs.
1157 #
1158 # If there are AuditConfigs for both `allServices` and a specific service,
1159 # the union of the two AuditConfigs is used for that service: the log_types
1160 # specified in each AuditConfig are enabled, and the exempted_members in each
1161 # AuditLogConfig are exempted.
1162 #
1163 # Example Policy with multiple AuditConfigs:
1164 #
1165 # {
1166 # &quot;audit_configs&quot;: [
1167 # {
1168 # &quot;service&quot;: &quot;allServices&quot;,
1169 # &quot;audit_log_configs&quot;: [
1170 # {
1171 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1172 # &quot;exempted_members&quot;: [
1173 # &quot;user:[email protected]&quot;
1174 # ]
1175 # },
1176 # {
1177 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1178 # },
1179 # {
1180 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
1181 # }
1182 # ]
1183 # },
1184 # {
1185 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
1186 # &quot;audit_log_configs&quot;: [
1187 # {
1188 # &quot;log_type&quot;: &quot;DATA_READ&quot;
1189 # },
1190 # {
1191 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1192 # &quot;exempted_members&quot;: [
1193 # &quot;user:[email protected]&quot;
1194 # ]
1195 # }
1196 # ]
1197 # }
1198 # ]
1199 # }
1200 #
1201 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1202 # logging. It also exempts `[email protected]` from DATA_READ logging, and
1203 # `[email protected]` from DATA_WRITE logging.
1204 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1205 { # Provides the configuration for logging a type of permissions.
1206 # Example:
1207 #
1208 # {
1209 # &quot;audit_log_configs&quot;: [
1210 # {
1211 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1212 # &quot;exempted_members&quot;: [
1213 # &quot;user:[email protected]&quot;
1214 # ]
1215 # },
1216 # {
1217 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1218 # }
1219 # ]
1220 # }
1221 #
1222 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1223 # [email protected] from DATA_READ logging.
1224 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1225 # permission.
1226 # Follows the same format of Binding.members.
1227 &quot;A String&quot;,
1228 ],
1229 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1230 },
1231 ],
1232 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1233 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1234 # `allServices` is a special value that covers all services.
1235 },
1236 ],
1237 &quot;bindings&quot;: [ # Associates a list of `members`, or principals, with a `role`. Optionally,
1238 # may specify a `condition` that determines how and when the `bindings` are
1239 # applied. Each of the `bindings` must contain at least one principal.
1240 #
1241 # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
1242 # of these principals can be Google groups. Each occurrence of a principal
1243 # counts towards these limits. For example, if the `bindings` grant 50
1244 # different roles to `user:[email protected]`, and not to any other
1245 # principal, then you can add another 1,450 principals to the `bindings` in
1246 # the `Policy`.
1247 { # Associates `members`, or principals, with a `role`.
1248 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1249 #
1250 # If the condition evaluates to `true`, then this binding applies to the
1251 # current request.
1252 #
1253 # If the condition evaluates to `false`, then this binding does not apply to
1254 # the current request. However, a different role binding might grant the same
1255 # role to one or more of the principals in this binding.
1256 #
1257 # To learn which resources support conditions in their IAM policies, see the
1258 # [IAM
1259 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1260 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1261 # are documented at https://github.com/google/cel-spec.
1262 #
1263 # Example (Comparison):
1264 #
1265 # title: &quot;Summary size limit&quot;
1266 # description: &quot;Determines if a summary is less than 100 chars&quot;
1267 # expression: &quot;document.summary.size() &lt; 100&quot;
1268 #
1269 # Example (Equality):
1270 #
1271 # title: &quot;Requestor is owner&quot;
1272 # description: &quot;Determines if requestor is the document owner&quot;
1273 # expression: &quot;document.owner == request.auth.claims.email&quot;
1274 #
1275 # Example (Logic):
1276 #
1277 # title: &quot;Public documents&quot;
1278 # description: &quot;Determine whether the document should be publicly visible&quot;
1279 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1280 #
1281 # Example (Data Manipulation):
1282 #
1283 # title: &quot;Notification string&quot;
1284 # description: &quot;Create a notification string with a timestamp.&quot;
1285 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1286 #
1287 # The exact variables and functions that may be referenced within an expression
1288 # are determined by the service that evaluates it. See the service
1289 # documentation for additional information.
1290 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1291 # describes the expression, e.g. when hovered over it in a UI.
1292 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1293 # syntax.
1294 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1295 # reporting, e.g. a file name and a position in the file.
1296 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1297 # its purpose. This can be used e.g. in UIs which allow to enter the
1298 # expression.
1299 },
1300 &quot;members&quot;: [ # Specifies the principals requesting access for a Google Cloud resource.
1301 # `members` can have the following values:
1302 #
1303 # * `allUsers`: A special identifier that represents anyone who is
1304 # on the internet; with or without a Google account.
1305 #
1306 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1307 # who is authenticated with a Google account or a service account.
1308 # Does not include identities that come from external identity providers
1309 # (IdPs) through identity federation.
1310 #
1311 # * `user:{emailid}`: An email address that represents a specific Google
1312 # account. For example, `[email protected]` .
1313 #
1314 #
1315 # * `serviceAccount:{emailid}`: An email address that represents a Google
1316 # service account. For example,
1317 # `[email protected]`.
1318 #
1319 # * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
1320 # identifier for a
1321 # [Kubernetes service
1322 # account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
1323 # For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`.
1324 #
1325 # * `group:{emailid}`: An email address that represents a Google group.
1326 # For example, `[email protected]`.
1327 #
1328 #
1329 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1330 # users of that domain. For example, `google.com` or `example.com`.
1331 #
1332 #
1333 #
1334 #
1335 # * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
1336 # A single identity in a workforce identity pool.
1337 #
1338 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`:
1339 # All workforce identities in a group.
1340 #
1341 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
1342 # All workforce identities with a specific attribute value.
1343 #
1344 # * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`:
1345 # All identities in a workforce identity pool.
1346 #
1347 # * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`:
1348 # A single identity in a workload identity pool.
1349 #
1350 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`:
1351 # A workload identity pool group.
1352 #
1353 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`:
1354 # All identities in a workload identity pool with a certain attribute.
1355 #
1356 # * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`:
1357 # All identities in a workload identity pool.
1358 #
1359 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1360 # identifier) representing a user that has been recently deleted. For
1361 # example, `[email protected]?uid=123456789012345678901`. If the user is
1362 # recovered, this value reverts to `user:{emailid}` and the recovered user
1363 # retains the role in the binding.
1364 #
1365 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1366 # unique identifier) representing a service account that has been recently
1367 # deleted. For example,
1368 # `[email protected]?uid=123456789012345678901`.
1369 # If the service account is undeleted, this value reverts to
1370 # `serviceAccount:{emailid}` and the undeleted service account retains the
1371 # role in the binding.
1372 #
1373 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1374 # identifier) representing a Google group that has been recently
1375 # deleted. For example, `[email protected]?uid=123456789012345678901`. If
1376 # the group is recovered, this value reverts to `group:{emailid}` and the
1377 # recovered group retains the role in the binding.
1378 #
1379 # * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`:
1380 # Deleted single identity in a workforce identity pool. For example,
1381 # `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
1382 &quot;A String&quot;,
1383 ],
1384 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to the list of `members`, or principals.
1385 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1386 #
1387 # For an overview of the IAM roles and permissions, see the
1388 # [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For
1389 # a list of the available pre-defined roles, see
1390 # [here](https://cloud.google.com/iam/docs/understanding-roles).
1391 },
1392 ],
1393 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1394 # prevent simultaneous updates of a policy from overwriting each other.
1395 # It is strongly suggested that systems make use of the `etag` in the
1396 # read-modify-write cycle to perform policy updates in order to avoid race
1397 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1398 # systems are expected to put that etag in the request to `setIamPolicy` to
1399 # ensure that their change will be applied to the same version of the policy.
1400 #
1401 # **Important:** If you use IAM Conditions, you must include the `etag` field
1402 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1403 # you to overwrite a version `3` policy with a version `1` policy, and all of
1404 # the conditions in the version `3` policy are lost.
1405 &quot;version&quot;: 42, # Specifies the format of the policy.
1406 #
1407 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1408 # are rejected.
1409 #
1410 # Any operation that affects conditional role bindings must specify version
1411 # `3`. This requirement applies to the following operations:
1412 #
1413 # * Getting a policy that includes a conditional role binding
1414 # * Adding a conditional role binding to a policy
1415 # * Changing a conditional role binding in a policy
1416 # * Removing any role binding, with or without a condition, from a policy
1417 # that includes conditions
1418 #
1419 # **Important:** If you use IAM Conditions, you must include the `etag` field
1420 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1421 # you to overwrite a version `3` policy with a version `1` policy, and all of
1422 # the conditions in the version `3` policy are lost.
1423 #
1424 # If a policy does not include any conditions, operations on that policy may
1425 # specify any valid version or leave the field unset.
1426 #
1427 # To learn which resources support conditions in their IAM policies, see the
1428 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1429 }</pre>
1430 </div>
1431
1432 <div class="method">
1433 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None, x__xgafv=None)</code>
1434 <pre>Returns permissions that a caller has on the specified resource.
1435 *Caution* This resource is intended
1436 for use only by third-party partners who are creatingCloud Marketplace
1437 images.
1438
1439 Args:
1440 project: string, Project ID for this request. (required)
1441 resource: string, Name or id of the resource for this request. (required)
1442 body: object, The request body.
1443 The object takes the form of:
1444
1445 {
1446 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with
1447 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
1448 &quot;A String&quot;,
1449 ],
1450 }
1451
1452 x__xgafv: string, V1 error format.
1453 Allowed values
1454 1 - v1 error format
1455 2 - v2 error format
1456
1457 Returns:
1458 An object of the form:
1459
1460 {
1461 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
1462 # allowed.
1463 &quot;A String&quot;,
1464 ],
1465 }</pre>
1466 </div>
1467
1468 </body></html>