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, specifically for version 2.3.0 and other versions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateRoleRequest\u003c/code\u003e class is used to define the request for creating a new role, and it inherits from the base \u003ccode\u003eobject\u003c/code\u003e class, while implementing multiple 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\u003eThe class includes properties such as \u003ccode\u003eParent\u003c/code\u003e, \u003ccode\u003eParentAsResourceName\u003c/code\u003e, \u003ccode\u003eRole\u003c/code\u003e, and \u003ccode\u003eRoleId\u003c/code\u003e, which are used to define the location, resource name, role details, and unique identifier for the new role, respectively, with \u003ccode\u003eParent\u003c/code\u003e and \u003ccode\u003eParentAsResourceName\u003c/code\u003e to distinguish if it's a \u003ccode\u003eproject\u003c/code\u003e or \u003ccode\u003eorganization\u003c/code\u003e level role.\u003c/p\u003e\n"],["\u003cp\u003eConstructors for \u003ccode\u003eCreateRoleRequest\u003c/code\u003e allow creating instances either without parameters or by cloning an existing \u003ccode\u003eCreateRoleRequest\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThe document lists available versions of the library starting from 1.0.0 until the latest 2.4.0, including documentation for each version.\u003c/p\u003e\n"]]],[],null,[]]