Stay organized with collections
Save and categorize content based on your preferences.
NAME
gdcloud iam roles list - List roles[custom/predefined/all].
SYNOPSIS
gdcloud iam roles list (custom | predefined | all) [--project=PROJECT] [flags]
DESCRIPTION
This command lists the roles of a specified type: 'custom', 'predefined' or 'all'. Optionally, you can specify a project to filter the results.
EXAMPLES
To list all roles, run:
gdcloud iam roles list
To list predefined roles, run:
gdcloud iam roles list --type=predefined
To list custom roles, run:
gdcloud iam roles list --type=custom
To list all roles for a specific project, run:
gdcloud iam roles list --project=my-project
To list predefined roles for a specific project, run:
gdcloud iam roles list --type=predefined --project=my-project
To list custom roles for a specific project, run:
gdcloud iam roles list --type=custom --project=my-project
OPTIONAL FLAGS
--type string Type of roles to list. Valid values are 'custom', 'predefined', or 'all'. (default "all")
GDCLOUD WIDE FLAGS
These flags are available to all commands: --configuration, --format, --help, --project, --quiet.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThe \u003ccode\u003egdcloud iam roles list\u003c/code\u003e command is used to list IAM roles, categorized as custom, predefined, or all.\u003c/p\u003e\n"],["\u003cp\u003eYou can filter the roles listed by specifying the role type using the \u003ccode\u003e--type\u003c/code\u003e flag.\u003c/p\u003e\n"],["\u003cp\u003eYou can also filter the roles by a specific project using the \u003ccode\u003e--project\u003c/code\u003e flag.\u003c/p\u003e\n"],["\u003cp\u003eThe command can be run without any flags in order to list all roles.\u003c/p\u003e\n"]]],[],null,["# gdcloud iam roles list\n\nNAME\n----\n\ngdcloud iam roles list - List roles\\[custom/predefined/all\\].\n\nSYNOPSIS\n--------\n\n gdcloud iam roles list (custom | predefined | all) [--project=PROJECT] [flags]\n\nDESCRIPTION\n-----------\n\nThis command lists the roles of a specified type: 'custom', 'predefined' or 'all'. Optionally, you can specify a project to filter the results.\n\n### EXAMPLES\n\n\n To list all roles, run:\n\n gdcloud iam roles list\n\n To list predefined roles, run:\n\n gdcloud iam roles list --type=predefined\n\n To list custom roles, run:\n\n gdcloud iam roles list --type=custom\n\n To list all roles for a specific project, run:\n\n gdcloud iam roles list --project=my-project\n\n To list predefined roles for a specific project, run:\n\n gdcloud iam roles list --type=predefined --project=my-project\n\n To list custom roles for a specific project, run:\n\n gdcloud iam roles list --type=custom --project=my-project\n\n### OPTIONAL FLAGS\n\n --type string Type of roles to list. Valid values are 'custom', 'predefined', or 'all'. (default \"all\")\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."]]