gdcloud iam service-accounts add-iam-policy-binding

NAME

gdcloud iam service-accounts add-iam-policy-binding - Grant a Role/ProjectRole/ClusterRole/OrganizationRole to a service account.

SYNOPSIS

gdcloud iam service-accounts add-iam-policy-binding [flags]

DESCRIPTION

Grant a Role, ProjectRole, ClusterRole or OrganizationRole to a project's service account. The name of the binding will be auto generated so you don't need to provide a name.

EXAMPLES


  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

REQUIRED FLAGS

      --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.

GDCLOUD WIDE FLAGS

These flags are available to all commands: --configuration, --format, --help, --project, --quiet.

For more information, see the gdcloud CLI reference overview page.