| 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 |
"allowedReplacementLicenses": [ # Specifies licenseCodes of licenses that can replace this license. Note: |
| 125 |
# such replacements are allowed even if removable_from_disk is false. |
| 126 |
"A String", |
| 127 |
], |
| 128 |
"appendableToDisk": True or False, # If true, this license can be appended to an existing disk's set of |
| 129 |
# licenses. |
| 130 |
"creationTimestamp": "A String", # Output only. [Output Only] Creation timestamp inRFC3339 |
| 131 |
# text format. |
| 132 |
"description": "A String", # Output only. [Output Only] Description of this License Code. |
| 133 |
"id": "A String", # Output only. [Output Only] The unique identifier for the resource. This identifier is |
| 134 |
# defined by the server. |
| 135 |
"incompatibleLicenses": [ # 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 |
"A String", |
| 139 |
], |
| 140 |
"kind": "compute#licenseCode", # Output only. [Output Only] Type of resource. Always compute#licenseCode for |
| 141 |
# licenses. |
| 142 |
"licenseAlias": [ # [Output Only] URL and description aliases of Licenses with the same |
| 143 |
# License Code. |
| 144 |
{ |
| 145 |
"description": "A String", # Output only. [Output Only] Description of this License Code. |
| 146 |
"selfLink": "A String", # Output only. [Output Only] URL of license corresponding to this License Code. |
| 147 |
}, |
| 148 |
], |
| 149 |
"minimumRetention": { # 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 "day" |
| 153 |
# or "month". Range is approximately 10,000 years. |
| 154 |
"nanos": 42, # Span of time that'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 |
"seconds": "A String", # 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 |
"multiTenantOnly": True or False, # If true, this license can only be used on VMs on multi tenant nodes. |
| 163 |
"name": "A String", # 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 |
"osLicense": 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 |
"removableFromDisk": True or False, # If true, this license can be removed from a disk's set of licenses, with no |
| 168 |
# replacement license needed. |
| 169 |
"requiredCoattachedLicenses": [ # 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 |
"A String", |
| 173 |
], |
| 174 |
"selfLink": "A String", # Output only. [Output Only] Server-defined URL for the resource. |
| 175 |
"soleTenantOnly": True or False, # If true, this license can only be used on VMs on sole tenant nodes. |
| 176 |
"state": "A String", # Output only. [Output Only] Current state of this License Code. |
| 177 |
"transferable": 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 |
"updateTimestamp": "A String", # 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 |
# "bindings": [ |
| 226 |
# { |
| 227 |
# "role": "roles/resourcemanager.organizationAdmin", |
| 228 |
# "members": [ |
| 229 |
# "user:[email protected]", |
| 230 |
# "group:[email protected]", |
| 231 |
# "domain:google.com", |
| 232 |
# "serviceAccount:[email protected]" |
| 233 |
# ] |
| 234 |
# }, |
| 235 |
# { |
| 236 |
# "role": "roles/resourcemanager.organizationViewer", |
| 237 |
# "members": [ |
| 238 |
# "user:[email protected]" |
| 239 |
# ], |
| 240 |
# "condition": { |
| 241 |
# "title": "expirable access", |
| 242 |
# "description": "Does not grant access after Sep 2020", |
| 243 |
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
| 244 |
# } |
| 245 |
# } |
| 246 |
# ], |
| 247 |
# "etag": "BwWWja0YfJA=", |
| 248 |
# "version": 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 < timestamp('2020-10-01T00:00:00.000Z') |
| 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 |
"auditConfigs": [ # 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 |
# "audit_configs": [ |
| 290 |
# { |
| 291 |
# "service": "allServices", |
| 292 |
# "audit_log_configs": [ |
| 293 |
# { |
| 294 |
# "log_type": "DATA_READ", |
| 295 |
# "exempted_members": [ |
| 296 |
# "user:[email protected]" |
| 297 |
# ] |
| 298 |
# }, |
| 299 |
# { |
| 300 |
# "log_type": "DATA_WRITE" |
| 301 |
# }, |
| 302 |
# { |
| 303 |
# "log_type": "ADMIN_READ" |
| 304 |
# } |
| 305 |
# ] |
| 306 |
# }, |
| 307 |
# { |
| 308 |
# "service": "sampleservice.googleapis.com", |
| 309 |
# "audit_log_configs": [ |
| 310 |
# { |
| 311 |
# "log_type": "DATA_READ" |
| 312 |
# }, |
| 313 |
# { |
| 314 |
# "log_type": "DATA_WRITE", |
| 315 |
# "exempted_members": [ |
| 316 |
# "user:[email protected]" |
| 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 |
"auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 328 |
{ # Provides the configuration for logging a type of permissions. |
| 329 |
# Example: |
| 330 |
# |
| 331 |
# { |
| 332 |
# "audit_log_configs": [ |
| 333 |
# { |
| 334 |
# "log_type": "DATA_READ", |
| 335 |
# "exempted_members": [ |
| 336 |
# "user:[email protected]" |
| 337 |
# ] |
| 338 |
# }, |
| 339 |
# { |
| 340 |
# "log_type": "DATA_WRITE" |
| 341 |
# } |
| 342 |
# ] |
| 343 |
# } |
| 344 |
# |
| 345 |
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 346 |
# [email protected] from DATA_READ logging. |
| 347 |
"exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 348 |
# permission. |
| 349 |
# Follows the same format of Binding.members. |
| 350 |
"A String", |
| 351 |
], |
| 352 |
"logType": "A String", # The log type that this config enables. |
| 353 |
}, |
| 354 |
], |
| 355 |
"service": "A String", # 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 |
"bindings": [ # 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 |
"condition": { # 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: "Summary size limit" |
| 389 |
# description: "Determines if a summary is less than 100 chars" |
| 390 |
# expression: "document.summary.size() < 100" |
| 391 |
# |
| 392 |
# Example (Equality): |
| 393 |
# |
| 394 |
# title: "Requestor is owner" |
| 395 |
# description: "Determines if requestor is the document owner" |
| 396 |
# expression: "document.owner == request.auth.claims.email" |
| 397 |
# |
| 398 |
# Example (Logic): |
| 399 |
# |
| 400 |
# title: "Public documents" |
| 401 |
# description: "Determine whether the document should be publicly visible" |
| 402 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 403 |
# |
| 404 |
# Example (Data Manipulation): |
| 405 |
# |
| 406 |
# title: "Notification string" |
| 407 |
# description: "Create a notification string with a timestamp." |
| 408 |
# expression: "'New message received at ' + string(document.create_time)" |
| 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 |
"description": "A String", # 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 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 416 |
# syntax. |
| 417 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 418 |
# reporting, e.g. a file name and a position in the file. |
| 419 |
"title": "A String", # 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 |
"members": [ # 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 |
"A String", |
| 506 |
], |
| 507 |
"role": "A String", # 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 |
"etag": "A String", # `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 |
"version": 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 |
"bindings": [ # Flatten Policy to create a backward compatible wire-format. |
| 571 |
# Deprecated. Use 'policy' to specify bindings. |
| 572 |
{ # Associates `members`, or principals, with a `role`. |
| 573 |
"condition": { # 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: "Summary size limit" |
| 591 |
# description: "Determines if a summary is less than 100 chars" |
| 592 |
# expression: "document.summary.size() < 100" |
| 593 |
# |
| 594 |
# Example (Equality): |
| 595 |
# |
| 596 |
# title: "Requestor is owner" |
| 597 |
# description: "Determines if requestor is the document owner" |
| 598 |
# expression: "document.owner == request.auth.claims.email" |
| 599 |
# |
| 600 |
# Example (Logic): |
| 601 |
# |
| 602 |
# title: "Public documents" |
| 603 |
# description: "Determine whether the document should be publicly visible" |
| 604 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 605 |
# |
| 606 |
# Example (Data Manipulation): |
| 607 |
# |
| 608 |
# title: "Notification string" |
| 609 |
# description: "Create a notification string with a timestamp." |
| 610 |
# expression: "'New message received at ' + string(document.create_time)" |
| 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 |
"description": "A String", # 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 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 618 |
# syntax. |
| 619 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 620 |
# reporting, e.g. a file name and a position in the file. |
| 621 |
"title": "A String", # 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 |
"members": [ # 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 |
"A String", |
| 708 |
], |
| 709 |
"role": "A String", # 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 |
"etag": "A String", # Flatten Policy to create a backward compatible wire-format. |
| 719 |
# Deprecated. Use 'policy' to specify the etag. |
| 720 |
"policy": { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the 'resource'. 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 |
# "bindings": [ |
| 744 |
# { |
| 745 |
# "role": "roles/resourcemanager.organizationAdmin", |
| 746 |
# "members": [ |
| 747 |
# "user:[email protected]", |
| 748 |
# "group:[email protected]", |
| 749 |
# "domain:google.com", |
| 750 |
# "serviceAccount:[email protected]" |
| 751 |
# ] |
| 752 |
# }, |
| 753 |
# { |
| 754 |
# "role": "roles/resourcemanager.organizationViewer", |
| 755 |
# "members": [ |
| 756 |
# "user:[email protected]" |
| 757 |
# ], |
| 758 |
# "condition": { |
| 759 |
# "title": "expirable access", |
| 760 |
# "description": "Does not grant access after Sep 2020", |
| 761 |
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
| 762 |
# } |
| 763 |
# } |
| 764 |
# ], |
| 765 |
# "etag": "BwWWja0YfJA=", |
| 766 |
# "version": 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 < timestamp('2020-10-01T00:00:00.000Z') |
| 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 |
"auditConfigs": [ # 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 |
# "audit_configs": [ |
| 808 |
# { |
| 809 |
# "service": "allServices", |
| 810 |
# "audit_log_configs": [ |
| 811 |
# { |
| 812 |
# "log_type": "DATA_READ", |
| 813 |
# "exempted_members": [ |
| 814 |
# "user:[email protected]" |
| 815 |
# ] |
| 816 |
# }, |
| 817 |
# { |
| 818 |
# "log_type": "DATA_WRITE" |
| 819 |
# }, |
| 820 |
# { |
| 821 |
# "log_type": "ADMIN_READ" |
| 822 |
# } |
| 823 |
# ] |
| 824 |
# }, |
| 825 |
# { |
| 826 |
# "service": "sampleservice.googleapis.com", |
| 827 |
# "audit_log_configs": [ |
| 828 |
# { |
| 829 |
# "log_type": "DATA_READ" |
| 830 |
# }, |
| 831 |
# { |
| 832 |
# "log_type": "DATA_WRITE", |
| 833 |
# "exempted_members": [ |
| 834 |
# "user:[email protected]" |
| 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 |
"auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 846 |
{ # Provides the configuration for logging a type of permissions. |
| 847 |
# Example: |
| 848 |
# |
| 849 |
# { |
| 850 |
# "audit_log_configs": [ |
| 851 |
# { |
| 852 |
# "log_type": "DATA_READ", |
| 853 |
# "exempted_members": [ |
| 854 |
# "user:[email protected]" |
| 855 |
# ] |
| 856 |
# }, |
| 857 |
# { |
| 858 |
# "log_type": "DATA_WRITE" |
| 859 |
# } |
| 860 |
# ] |
| 861 |
# } |
| 862 |
# |
| 863 |
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 864 |
# [email protected] from DATA_READ logging. |
| 865 |
"exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 866 |
# permission. |
| 867 |
# Follows the same format of Binding.members. |
| 868 |
"A String", |
| 869 |
], |
| 870 |
"logType": "A String", # The log type that this config enables. |
| 871 |
}, |
| 872 |
], |
| 873 |
"service": "A String", # 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 |
"bindings": [ # 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 |
"condition": { # 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: "Summary size limit" |
| 907 |
# description: "Determines if a summary is less than 100 chars" |
| 908 |
# expression: "document.summary.size() < 100" |
| 909 |
# |
| 910 |
# Example (Equality): |
| 911 |
# |
| 912 |
# title: "Requestor is owner" |
| 913 |
# description: "Determines if requestor is the document owner" |
| 914 |
# expression: "document.owner == request.auth.claims.email" |
| 915 |
# |
| 916 |
# Example (Logic): |
| 917 |
# |
| 918 |
# title: "Public documents" |
| 919 |
# description: "Determine whether the document should be publicly visible" |
| 920 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 921 |
# |
| 922 |
# Example (Data Manipulation): |
| 923 |
# |
| 924 |
# title: "Notification string" |
| 925 |
# description: "Create a notification string with a timestamp." |
| 926 |
# expression: "'New message received at ' + string(document.create_time)" |
| 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 |
"description": "A String", # 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 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 934 |
# syntax. |
| 935 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 936 |
# reporting, e.g. a file name and a position in the file. |
| 937 |
"title": "A String", # 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 |
"members": [ # 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 |
"A String", |
| 1024 |
], |
| 1025 |
"role": "A String", # 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 |
"etag": "A String", # `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 |
"version": 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 |
# "bindings": [ |
| 1103 |
# { |
| 1104 |
# "role": "roles/resourcemanager.organizationAdmin", |
| 1105 |
# "members": [ |
| 1106 |
# "user:[email protected]", |
| 1107 |
# "group:[email protected]", |
| 1108 |
# "domain:google.com", |
| 1109 |
# "serviceAccount:[email protected]" |
| 1110 |
# ] |
| 1111 |
# }, |
| 1112 |
# { |
| 1113 |
# "role": "roles/resourcemanager.organizationViewer", |
| 1114 |
# "members": [ |
| 1115 |
# "user:[email protected]" |
| 1116 |
# ], |
| 1117 |
# "condition": { |
| 1118 |
# "title": "expirable access", |
| 1119 |
# "description": "Does not grant access after Sep 2020", |
| 1120 |
# "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", |
| 1121 |
# } |
| 1122 |
# } |
| 1123 |
# ], |
| 1124 |
# "etag": "BwWWja0YfJA=", |
| 1125 |
# "version": 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 < timestamp('2020-10-01T00:00:00.000Z') |
| 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 |
"auditConfigs": [ # 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 |
# "audit_configs": [ |
| 1167 |
# { |
| 1168 |
# "service": "allServices", |
| 1169 |
# "audit_log_configs": [ |
| 1170 |
# { |
| 1171 |
# "log_type": "DATA_READ", |
| 1172 |
# "exempted_members": [ |
| 1173 |
# "user:[email protected]" |
| 1174 |
# ] |
| 1175 |
# }, |
| 1176 |
# { |
| 1177 |
# "log_type": "DATA_WRITE" |
| 1178 |
# }, |
| 1179 |
# { |
| 1180 |
# "log_type": "ADMIN_READ" |
| 1181 |
# } |
| 1182 |
# ] |
| 1183 |
# }, |
| 1184 |
# { |
| 1185 |
# "service": "sampleservice.googleapis.com", |
| 1186 |
# "audit_log_configs": [ |
| 1187 |
# { |
| 1188 |
# "log_type": "DATA_READ" |
| 1189 |
# }, |
| 1190 |
# { |
| 1191 |
# "log_type": "DATA_WRITE", |
| 1192 |
# "exempted_members": [ |
| 1193 |
# "user:[email protected]" |
| 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 |
"auditLogConfigs": [ # The configuration for logging of each type of permission. |
| 1205 |
{ # Provides the configuration for logging a type of permissions. |
| 1206 |
# Example: |
| 1207 |
# |
| 1208 |
# { |
| 1209 |
# "audit_log_configs": [ |
| 1210 |
# { |
| 1211 |
# "log_type": "DATA_READ", |
| 1212 |
# "exempted_members": [ |
| 1213 |
# "user:[email protected]" |
| 1214 |
# ] |
| 1215 |
# }, |
| 1216 |
# { |
| 1217 |
# "log_type": "DATA_WRITE" |
| 1218 |
# } |
| 1219 |
# ] |
| 1220 |
# } |
| 1221 |
# |
| 1222 |
# This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 1223 |
# [email protected] from DATA_READ logging. |
| 1224 |
"exemptedMembers": [ # Specifies the identities that do not cause logging for this type of |
| 1225 |
# permission. |
| 1226 |
# Follows the same format of Binding.members. |
| 1227 |
"A String", |
| 1228 |
], |
| 1229 |
"logType": "A String", # The log type that this config enables. |
| 1230 |
}, |
| 1231 |
], |
| 1232 |
"service": "A String", # 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 |
"bindings": [ # 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 |
"condition": { # 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: "Summary size limit" |
| 1266 |
# description: "Determines if a summary is less than 100 chars" |
| 1267 |
# expression: "document.summary.size() < 100" |
| 1268 |
# |
| 1269 |
# Example (Equality): |
| 1270 |
# |
| 1271 |
# title: "Requestor is owner" |
| 1272 |
# description: "Determines if requestor is the document owner" |
| 1273 |
# expression: "document.owner == request.auth.claims.email" |
| 1274 |
# |
| 1275 |
# Example (Logic): |
| 1276 |
# |
| 1277 |
# title: "Public documents" |
| 1278 |
# description: "Determine whether the document should be publicly visible" |
| 1279 |
# expression: "document.type != 'private' && document.type != 'internal'" |
| 1280 |
# |
| 1281 |
# Example (Data Manipulation): |
| 1282 |
# |
| 1283 |
# title: "Notification string" |
| 1284 |
# description: "Create a notification string with a timestamp." |
| 1285 |
# expression: "'New message received at ' + string(document.create_time)" |
| 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 |
"description": "A String", # 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 |
"expression": "A String", # Textual representation of an expression in Common Expression Language |
| 1293 |
# syntax. |
| 1294 |
"location": "A String", # Optional. String indicating the location of the expression for error |
| 1295 |
# reporting, e.g. a file name and a position in the file. |
| 1296 |
"title": "A String", # 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 |
"members": [ # 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 |
"A String", |
| 1383 |
], |
| 1384 |
"role": "A String", # 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 |
"etag": "A String", # `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 |
"version": 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 |
"permissions": [ # The set of permissions to check for the 'resource'. Permissions with |
| 1447 |
# wildcards (such as '*' or 'storage.*') are not allowed. |
| 1448 |
"A String", |
| 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 |
"permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is |
| 1462 |
# allowed. |
| 1463 |
"A String", |
| 1464 |
], |
| 1465 |
}</pre> |
| 1466 |
</div> |
| 1467 |
|
| 1468 |
</body></html> |