To list all the iam policy for project "iam-test" sorted by members in ascending order and print out in json format, run:
gdcloud projects get-iam-policy iam-test --flatten="bindings[].members" --format=json --sort-by="bindings.members"
OPTIONS GCLOUD GÉNÉRALES
Ces options sont disponibles pour toutes les commandes : --configuration, --format, --help, --project, --quiet.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThe \u003ccode\u003egdcloud projects get-iam-policy\u003c/code\u003e command lists all IAM policies for a specified project.\u003c/p\u003e\n"],["\u003cp\u003eYou must provide the \u003ccode\u003ePROJECT_ID\u003c/code\u003e as an argument when running the command.\u003c/p\u003e\n"],["\u003cp\u003eThe command supports flags such as \u003ccode\u003e--flatten\u003c/code\u003e, \u003ccode\u003e--format\u003c/code\u003e, and \u003ccode\u003e--sort-by\u003c/code\u003e for customizing the output, like displaying the output in JSON format.\u003c/p\u003e\n"],["\u003cp\u003eGlobal flags such as \u003ccode\u003e--configuration\u003c/code\u003e, \u003ccode\u003e--help\u003c/code\u003e, \u003ccode\u003e--project\u003c/code\u003e, and \u003ccode\u003e--quiet\u003c/code\u003e can also be used with this command.\u003c/p\u003e\n"]]],[],null,["# gdcloud projects get-iam-policy\n\nNAME\n----\n\ngdcloud projects get-iam-policy - List all the iam policy for a project.\n\nSYNOPSIS\n--------\n\n gdcloud projects get-iam-policy PROJECT_ID [flags]\n\n### EXAMPLES\n\n To list all the iam policy for project \"iam-test\" sorted by members in ascending order and print out in json format, run:\n\n gdcloud projects get-iam-policy iam-test --flatten=\"bindings[].members\" --format=json --sort-by=\"bindings.members\"\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/gdch/resources/gdcloud-reference/gdcloud) page."]]