public sealed class CreatePolicyRequest : IMessage<CreatePolicyRequest>, IEquatable<CreatePolicyRequest>, IDeepCloneable<CreatePolicyRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Identity and Access Management (IAM) v2 API class CreatePolicyRequest.
Required. The resource that the policy is attached to, along with the kind of policy
to create. Format: policies/{attachment_point}/denypolicies
The attachment point is identified by its URL-encoded full resource name,
which means that the forward-slash character, /, must be written as
%2F. For example,
policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies.
For organizations and folders, use the numeric ID in the full resource
name. For projects, you can use the alphanumeric or the numeric ID.
The ID to use for this policy, which will become the final component of
the policy's resource name. The ID must contain 3 to 63 characters. It can
contain lowercase letters and numbers, as well as dashes (-) and periods
(.). The first character must be a lowercase letter.
[[["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 \u003ccode\u003eCreatePolicyRequest\u003c/code\u003e class is part of the Google Cloud Identity and Access Management (IAM) v2 API, specifically within the \u003ccode\u003eGoogle.Cloud.Iam.V2\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThis class is used to create a request message for the \u003ccode\u003eCreatePolicy\u003c/code\u003e function, as described in the reference documentation.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from the base \u003ccode\u003eobject\u003c/code\u003e class and implements multiple interfaces, including \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 \u003ccode\u003eCreatePolicyRequest\u003c/code\u003e class contains properties such as \u003ccode\u003eParent\u003c/code\u003e, \u003ccode\u003ePolicy\u003c/code\u003e, and \u003ccode\u003ePolicyId\u003c/code\u003e which define the resource it is attached to, the policy to create and the policy's resource name ID respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe class has two constructors, \u003ccode\u003eCreatePolicyRequest()\u003c/code\u003e for creating an empty instance and \u003ccode\u003eCreatePolicyRequest(CreatePolicyRequest other)\u003c/code\u003e to make a copy of another \u003ccode\u003eCreatePolicyRequest\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]