gdcloud organizations add-iam-policy-binding

名称

gdcloud organizations add-iam-policy-binding - 向组织中的成员授予角色

摘要

gdcloud organizations add-iam-policy-binding ORGANIZATION_ID [flags]

说明

向组织中的成员授予角色。成员可以是真人用户,也可以是服务账号。绑定的名称是自动生成的。

示例


To grant the role "pr-test-role" for user "test-user@example.com" with IdP prefix "fop" in organization "org-1", run:

    gdcloud organizations add-iam-policy-binding org-1 --role=pr-test-role --member=user:fop-test-user@example.com

To grant the role "pr-test-role" for service account "test-sa" of project "test-sa-project" in the organization "org-1", run:

    gdcloud organizations add-iam-policy-binding org-1 --role=pr-test-role --member=serviceAccount:test-sa-project:test-sa

必需标志

      --member string   The member to add binding for, defined by either user:EMAIL or serviceAccount:SERVICE_ACCOUNT_PROJECT:SERVICE_ACCOUNT_NAME. The email must contain the IdP prefix for the user.
      --role string     Role name to assign to the member.

GDCLOUD 全局标志

以下标志适用于所有命令:--configuration--format--help--project--quiet

如需了解详情,请参阅 gdcloud CLI 参考概览页面。