Weisen Sie einem Mitglied in einem Projekt eine Rolle zu. Das Mitglied kann entweder ein Nutzer oder ein Dienstkonto sein. Der Name der Bindung wird automatisch generiert.
BEISPIELE
To grant the role "pr-test-role" for user "test-user@example.com" with IdP prefix "fop" in project "iam-test", run:
gdcloud projects add-iam-policy-binding iam-test --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 project "iam-test", run:
gdcloud projects add-iam-policy-binding iam-test --role=pr-test-role --member=serviceAccount:test-sa-project:test-sa
ERFORDERLICHE FLAGS
--member string Member to add the binding for, defined by either user:EMAIL or serviceAccount:SERVICE_ACCOUNT_PROJECT:SERVICE_ACCOUNT_NAME. The email should contain the IdP prefix for the user.
--role string Role name to assign to the member.
GDCLOUD-WEITE FLAGS
Diese Flags sind für alle Befehle verfügbar: --configuration, --format, --help, --project, --quiet.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# gdcloud projects add-iam-policy-binding\n\nNAME\n----\n\ngdcloud projects add-iam-policy-binding - Grant a role to a member in a project.\n\nSYNOPSIS\n--------\n\n gdcloud projects add-iam-policy-binding PROJECT_ID [flags]\n\nDESCRIPTION\n-----------\n\nGrant a role to a member in a project. The member can either be a human user or a service account. The name of the binding is auto-generated.\n\n### EXAMPLES\n\n\n To grant the role \"pr-test-role\" for user \"test-user@example.com\" with IdP prefix \"fop\" in project \"iam-test\", run:\n\n gdcloud projects add-iam-policy-binding iam-test --role=pr-test-role --member=user:fop-test-user@example.com\n\n To grant the role \"pr-test-role\" for service account \"test-sa\" of project \"test-sa-project\" in the project \"iam-test\", run:\n\n gdcloud projects add-iam-policy-binding iam-test --role=pr-test-role --member=serviceAccount:test-sa-project:test-sa\n\n### REQUIRED FLAGS\n\n --member string Member to add the binding for, defined by either user:EMAIL or serviceAccount:SERVICE_ACCOUNT_PROJECT:SERVICE_ACCOUNT_NAME. The email should contain the IdP prefix for the user.\n --role string Role name to assign to the member.\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."]]