gdcloud iam service-accounts add-iam-policy-binding
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
NOME
gdcloud iam service-accounts add-iam-policy-binding - Grant a Role/ProjectRole/ClusterRole/OrganizationRole to a account di servizio.
SINOSSI
gdcloud iam service-accounts add-iam-policy-binding [flags]
DESCRIZIONE
Concedi un ruolo, un ProjectRole, un ClusterRole o un OrganizationRole all'account di servizio di un progetto. Il nome del binding verrà generato automaticamente, quindi non devi fornirne uno.
ESEMPI
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
FLAG OBBLIGATORI
--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.
FLAG FACOLTATIVI
--role-namespace string Namespace of Role to bind with the service account. This is only applicable for multizone enabled environments.
GDCLOUD WIDE FLAGS
Questi flag sono disponibili per tutti i comandi: --configuration, --format, --help, --project, --quiet.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eThis command, \u003ccode\u003egdcloud iam service-accounts add-iam-policy-binding\u003c/code\u003e, creates a new ProjectRoleBinding on the organization admin cluster.\u003c/p\u003e\n"],["\u003cp\u003eThe command requires specifying the service account (\u003ccode\u003e--iam-account\u003c/code\u003e) and the role (\u003ccode\u003e--role\u003c/code\u003e) to bind them together.\u003c/p\u003e\n"],["\u003cp\u003eYou can optionally specify the project using \u003ccode\u003e--project\u003c/code\u003e, but if it's set via \u003ccode\u003egdcloud init\u003c/code\u003e, it can be omitted.\u003c/p\u003e\n"],["\u003cp\u003eTo create a projectRoleBinding, you are required to input a ProjectRoleBinding name, as well as set two mandatory flags, \u003ccode\u003e--iam-account\u003c/code\u003e and \u003ccode\u003e--role\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# gdcloud iam service-accounts add-iam-policy-binding\n\nNAME\n----\n\ngdcloud iam service-accounts add-iam-policy-binding - Grant a Role/ProjectRole/ClusterRole/OrganizationRole to a service account.\n\nSYNOPSIS\n--------\n\n gdcloud iam service-accounts add-iam-policy-binding [flags]\n\nDESCRIPTION\n-----------\n\nGrant 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.\n\n### EXAMPLES\n\n\n To grant the project role of name \"pr-test\" for project's service account \"psa-test\" in project \"iam-test\", run:\n\n gdcloud iam service-accounts add-iam-policy-binding --role=ProjectRole/pr-test --iam-account=psa-test --project=iam-test\n\n### REQUIRED FLAGS\n\n --iam-account string Project's service account to bind with the role. The flag is required to run the command.\n --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.\n\n### OPTIONAL FLAGS\n\n --role-namespace string Namespace of Role to bind with the service account. This is only applicable for multizone enabled environments.\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/appliance/resources/gdcloud-reference/gdcloud) page."]]