Binding
Stay organized with collections
Save and categorize content based on your preferences.
Associates members
with a role
.
JSON representation |
{
"role": string,
"members": [
string
],
"condition": {
object (Expr )
}
} |
Fields |
role |
string
Role that is assigned to members . For example, roles/viewer , roles/editor , or roles/owner .
|
members[] |
string
Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:
allUsers : A special identifier that represents anyone who is on the internet; with or without a Google account.
allAuthenticatedUsers : A special identifier that represents anyone who is authenticated with a Google account or a service account.
user:{emailid} : An email address that represents a specific Google account. For example, alice@example.com .
serviceAccount:{emailid} : An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com .
group:{emailid} : An email address that represents a Google group. For example, admins@example.com .
deleted:user:{emailid}?uid={uniqueid} : An email address (plus unique identifier) representing a user that has been recently deleted. For example, alice@example.com?uid=123456789012345678901 . If the user is recovered, this value reverts to user:{emailid} and the recovered user retains the role in the binding.
deleted:serviceAccount:{emailid}?uid={uniqueid} : An email address (plus unique identifier) representing a service account that has been recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901 . If the service account is undeleted, this value reverts to serviceAccount:{emailid} and the undeleted service account retains the role in the binding.
deleted:group:{emailid}?uid={uniqueid} : An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, admins@example.com?uid=123456789012345678901 . If the group is recovered, this value reverts to group:{emailid} and the recovered group retains the role in the binding.
domain:{domain} : The G Suite domain (primary) that represents all the users of that domain. For example, google.com or example.com .
|
condition |
object (Expr )
The condition that is associated with this binding. If the condition evaluates to true , then this binding applies to the current request. If the condition evaluates to false , then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the members in this binding. To learn which resources support conditions in their IAM policies, see the IAM documentation.
|
Expr
Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec.
Example (Comparison):
title: "Summary size limit"
description: "Determines if a summary is less than 100 chars"
expression: "document.summary.size() < 100"
Example (Equality):
title: "Requestor is owner"
description: "Determines if requestor is the document owner"
expression: "document.owner == request.auth.claims.email"
Example (Logic):
title: "Public documents"
description: "Determine whether the document should be publicly visible"
expression: "document.type != 'private' && document.type != 'internal'"
Example (Data Manipulation):
title: "Notification string"
description: "Create a notification string with a timestamp."
expression: "'New message received at ' + string(document.create_time)"
The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
JSON representation |
{
"expression": string,
"title": string,
"description": string,
"location": string
} |
Fields |
expression |
string
Textual representation of an expression in Common Expression Language syntax.
|
title |
string
Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
|
description |
string
Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
|
location |
string
Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-13 UTC."],[[["This document outlines the structure for associating members with roles, including optional conditions for access."],["The `role` field specifies the role assigned to members, such as `roles/viewer`, `roles/editor`, or `roles/owner`."],["The `members` field specifies identities requesting access, which can include `allUsers`, `allAuthenticatedUsers`, specific email addresses, service accounts, groups, or deleted users/accounts."],["The `condition` field, defined as an `Expr` object, allows for specifying conditions that determine if a role binding applies."],["`Expr` fields define a Common Expression Language (CEL) expression, with fields for the `expression`, `title`, `description`, and `location` of the expression."]]],[]]