名稱
gdcloud iam service-accounts add-iam-policy-binding - Grant a Role/ProjectRole/ClusterRole/OrganizationRole to a service account.
概要
gdcloud iam service-accounts add-iam-policy-binding [flags]
說明
將角色、專案角色、叢集角色或機構角色授予專案的服務帳戶。系統會自動產生繫結名稱,因此您不需要提供名稱。
範例
To grant the project role of name "pr-test" for project's service account "psa-test" in project "iam-test", run:
gdcloud iam service-accounts add-iam-policy-binding --role=ProjectRole/pr-test --iam-account=psa-test --project=iam-test
必要標記
--iam-account string Project's service account to bind with the role. The flag is required to run the command.
--role string Role to bind with the service account in the format of "RoleType/NAME" where RoleType is one of the Kubernetes type in Role, ProjectRole, ClusterRole or OrganizationRole, and NAME is the name of the role. The flag is required to run the command.
選用旗標
--role-namespace string Namespace of Role to bind with the service account. This is only applicable for multizone enabled environments.
GDCLOUD 廣泛標記
所有指令都可使用這些旗標:--configuration、--format、--help、--project、--quiet。
詳情請參閱 gcloud CLI 參考資料總覽頁面。