名称
gdcloud iam service-accounts add-iam-policy-binding - 向服务账号授予角色/项目角色/集群角色/组织角色。
摘要
gdcloud iam service-accounts add-iam-policy-binding [flags]
说明
向项目的服务账号授予 Role、ProjectRole、ClusterRole 或 OrganizationRole。绑定名称将自动生成,因此您无需提供名称。
示例
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。
如需了解详情,请参阅 gdcloud CLI 参考概览页面。