IAM(Identity and Access Management)ポリシーを定義します。アクセス制御ポリシーを Cloud Platform リソースに指定するのに用いられます。
Policy
は bindings
のリストで構成されています。binding
は members
のリストを role
にバインドします。メンバーは、ユーザー アカウント、Google グループ、Google ドメイン、およびサービス アカウントになることが可能です。role
は IAM で定義された権限からなる名前付きリストです。
JSON の例
{
"bindings": [
{
"role": "roles/owner",
"members": [
"user:mike@example.com",
"group:admins@example.com",
"domain:google.com",
"serviceAccount:my-other-app@appspot.gserviceaccount.com"
]
},
{
"role": "roles/viewer",
"members": ["user:sean@example.com"]
}
]
}
YAML の例
bindings:
- members:
- user:mike@example.com
- group:admins@example.com
- domain:google.com
- serviceAccount:my-other-app@appspot.gserviceaccount.com
role: roles/owner
- members:
- user:sean@example.com
role: roles/viewer
IAM とその機能については、IAM デベロッパー ガイドをご覧ください。
JSON 表現 | |
---|---|
{
"version": number,
"bindings": [
{
object( |
フィールド | |
---|---|
version |
サポート終了。 |
bindings[] |
|
etag |
Base64 でエンコードされた文字列。 |
バインディング
members
を role
に関連付けます。
JSON 表現 | |
---|---|
{
"role": string,
"members": [
string
],
"condition": {
object( |
フィールド | |
---|---|
role |
|
members[] |
Cloud Platform リソースのアクセスのリクエスト元を識別する情報を指定します。
|
condition |
未実装。このバインディングに関連付けられている条件。注: 条件を満たさないと、ユーザーは現在のバインディングからアクセスできません。別々のバインディングは、その条件を含めて個別に検査されます。 |
Expr
式のテキストを表します。次に例を示します。
title: "User account presence"
description: "Determines whether the request has a user account"
expression: "size(request.user) > 0"
JSON 表現 | |
---|---|
{ "expression": string, "title": string, "description": string, "location": string } |
フィールド | |
---|---|
expression |
Common Expression Language 構文による式のテキスト表現。 それを含んでいるメッセージのアプリケーション コンテキストにより、サポートされる CEL の既知の機能セットが決まります。 |
title |
式のタイトル(省略可)。その目的を表す短い文字列です。たとえば、その式を入力できる UI でこれを使用します。 |
description |
式の説明(省略可)。これは、式を説明する長いテキストです。たとえば、UI で式にカーソルを合わせたときに表示されます。 |
location |
エラー報告用に式の場所を示す文字列(省略可)。たとえば、ファイル名とファイル内の位置。 |