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 でエンコードされた文字列。 |
Binding
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 |
エラー報告のための式の場所を示すオプションの文字列。たとえば、ファイル名やファイル内の位置。 |