The name parameter's value depends on the target resource for the request, namely roles, projects, or organizations. Each resource type's name value format is described below:
roles.get: roles/{ROLE_NAME}. This method returns results from all predefined roles in IAM. Example request URL: https://iam.googleapis.com/v1/roles/{ROLE_NAME}
projects.roles.get: projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}. This method returns only custom roles that have been created at the project level. Example request URL: https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}
organizations.roles.get: organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}. This method returns only custom roles that have been created at the organization level. Example request URL: https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}
Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.
Authorization requires the following IAM permission on the specified resource name:
iam.roles.get
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of Role.
[[["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-01-16 UTC."],[[["This webpage details how to retrieve the definition of a specific Role using the IAM API."],["The `GET` HTTP request method is used with a specific URL structure, `https://iam.googleapis.com/v1/{name=organizations/*/roles/*}`, adhering to gRPC Transcoding syntax."],["The `name` path parameter in the URL determines the type of Role requested (predefined, project-level custom, or organization-level custom), with examples provided for each."],["The request body must be empty, and a successful response returns an instance of the Role definition."],["Authorization requires one of the specified OAuth scopes: `https://www.googleapis.com/auth/iam` or `https://www.googleapis.com/auth/cloud-platform`, and the permission `iam.roles.get` on the resource name."]]],[]]