public sealed class CreateRoleRequest : IMessage<CreateRoleRequest>, IEquatable<CreateRoleRequest>, IDeepCloneable<CreateRoleRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Identity and Access Management (IAM) v1 API class CreateRoleRequest.
The parent parameter's value depends on the target resource for the
request, namely
projects
or
organizations.
Each resource type's parent value format is described below:
projects.roles.create():
projects/{PROJECT_ID}. This method creates project-level
custom
roles.
Example request URL:
https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles
organizations.roles.create():
organizations/{ORGANIZATION_ID}. This method creates organization-level
custom
roles.
Example request URL:
https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles
Note: Wildcard (*) values are invalid; you must specify a complete project
ID or organization ID.
A role ID may contain alphanumeric characters, underscores (_), and
periods (.). It must contain a minimum of 3 characters and a maximum of
64 characters.
[[["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\u003eThis document provides reference information for the \u003ccode\u003eCreateRoleRequest\u003c/code\u003e class within the Google Cloud Identity and Access Management (IAM) v1 API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCreateRoleRequest\u003c/code\u003e is used to create new roles, and the documentation covers versions 1.0.0 through to the latest version, 2.4.0, with the current version detailed being 2.2.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateRoleRequest\u003c/code\u003e class is defined in the \u003ccode\u003eGoogle.Cloud.Iam.Admin.V1\u003c/code\u003e namespace and implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eCreateRoleRequest\u003c/code\u003e class include \u003ccode\u003eParent\u003c/code\u003e (to define the project or organization), \u003ccode\u003eParentAsResourceName\u003c/code\u003e (typed view over parent), \u003ccode\u003eRole\u003c/code\u003e (the role resource to be created), and \u003ccode\u003eRoleId\u003c/code\u003e (the unique identifier for the role, limited to 3-64 alphanumeric characters, underscores, or periods).\u003c/p\u003e\n"],["\u003cp\u003eThe class can be instantiated using default or copy constructors, and it outlines where to create project or organization level custom roles.\u003c/p\u003e\n"]]],[],null,[]]