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 Cloud 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eGetRoleRequest\u003c/code\u003e class in the Google Cloud IAM Admin V1 API is version 2.4.0, which is used to retrieve the definition of an existing role.\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the \u003ccode\u003eGoogle.Cloud.Iam.Admin.V1\u003c/code\u003e namespace and is implemented within the \u003ccode\u003eGoogle.Cloud.Iam.Admin.V1.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetRoleRequest\u003c/code\u003e class has a constructor that can create a new instance or copy an existing \u003ccode\u003eGetRoleRequest\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes a \u003ccode\u003eName\u003c/code\u003e property, which is a string representing the resource name, and its format depends on whether the request targets roles, projects, or organizations, each of which has its own structure.\u003c/p\u003e\n"],["\u003cp\u003eThe class also includes the \u003ccode\u003eResourceName\u003c/code\u003e property, which is an IResourceName-typed view of the \u003ccode\u003eName\u003c/code\u003e resource property.\u003c/p\u003e\n"]]],[],null,["# Identity and Access Management (IAM) v1 API - Class GetRoleRequest (2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.GetRoleRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.3.0/Google.Cloud.Iam.Admin.V1.GetRoleRequest)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.2.0/Google.Cloud.Iam.Admin.V1.GetRoleRequest)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.1.0/Google.Cloud.Iam.Admin.V1.GetRoleRequest)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/2.0.0/Google.Cloud.Iam.Admin.V1.GetRoleRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.2.0/Google.Cloud.Iam.Admin.V1.GetRoleRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.1.0/Google.Cloud.Iam.Admin.V1.GetRoleRequest)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/1.0.0/Google.Cloud.Iam.Admin.V1.GetRoleRequest) \n\n public sealed class GetRoleRequest : IMessage\u003cGetRoleRequest\u003e, IEquatable\u003cGetRoleRequest\u003e, IDeepCloneable\u003cGetRoleRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Identity and Access Management (IAM) v1 API class GetRoleRequest.\n\nThe request to get the definition of an existing role. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e GetRoleRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GetRoleRequest](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.GetRoleRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GetRoleRequest](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.GetRoleRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GetRoleRequest](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.GetRoleRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Iam.Admin.V1](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Iam.Admin.V1.dll\n\nConstructors\n------------\n\n### GetRoleRequest()\n\n public GetRoleRequest()\n\n### GetRoleRequest(GetRoleRequest)\n\n public GetRoleRequest(GetRoleRequest other)\n\nProperties\n----------\n\n### Name\n\n public string Name { get; set; }\n\nThe `name` parameter's value depends on the target resource for the\nrequest, namely\n[`roles`](https://cloud.google.com/iam/reference/rest/v1/roles),\n[`projects`](https://cloud.google.com/iam/reference/rest/v1/projects.roles),\nor\n[`organizations`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles).\nEach resource type's `name` value format is described below:\n\n- [`roles.get()`](https://cloud.google.com/iam/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`.\n This method returns results from all\n [predefined\n roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles)\n in Cloud IAM. Example request URL:\n `https://iam.googleapis.com/v1/roles/{ROLE_NAME}`\n\n- [`projects.roles.get()`](https://cloud.google.com/iam/reference/rest/v1/projects.roles/get):\n `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only\n [custom\n roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that\n have been created at the project level. Example request URL:\n `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`\n\n- [`organizations.roles.get()`](https://cloud.google.com/iam/reference/rest/v1/organizations.roles/get):\n `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method\n returns only [custom\n roles](https://cloud.google.com/iam/docs/understanding-custom-roles) that\n have been created at the organization level. Example request URL:\n `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`\n\nNote: Wildcard (\\*) values are invalid; you must specify a complete project\nID or organization ID.\n\n### ResourceName\n\n public IResourceName ResourceName { get; set; }\n\n[IResourceName](https://github.com/googleapis/gax-dotnet/blob/83f42b5edc4529818dbdb34d9ea9ecc3c04f7b6e/Google.Api.Gax/IResourceName.cs)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Iam.Admin.V1/latest/Google.Cloud.Iam.Admin.V1.GetRoleRequest#Google_Cloud_Iam_Admin_V1_GetRoleRequest_Name) resource name property."]]