public sealed class SetIamPolicyRequest : IMessage<SetIamPolicyRequest>, IEquatable<SetIamPolicyRequest>, IDeepCloneable<SetIamPolicyRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Identity and Access Management (IAM) v1 API class SetIamPolicyRequest.
REQUIRED: The complete policy to be applied to the resource. The size of
the policy is limited to a few 10s of KB. An empty policy is a
valid policy but certain Cloud Platform services (such as Projects)
might reject them.
OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
the fields in the mask will be modified. If no mask is provided, the
following default mask is used:
[[["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-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eSetIamPolicyRequest\u003c/code\u003e class is used to set the IAM policy for a given resource within the Google Cloud Identity and Access Management (IAM) v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, for varied functionality.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSetIamPolicyRequest\u003c/code\u003e class requires properties like \u003ccode\u003eResource\u003c/code\u003e and \u003ccode\u003ePolicy\u003c/code\u003e to be set, which dictate the resource the policy will be applied to, and the policy itself.\u003c/p\u003e\n"],["\u003cp\u003eThere is an optional \u003ccode\u003eUpdateMask\u003c/code\u003e property, which lets you specify specific parts of the policy that should be modified, and if not set it defaults to only modifying the bindings and etag fields.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eSetIamPolicyRequest\u003c/code\u003e class available is 3.4.0, with previous versions ranging back to 2.2.0.\u003c/p\u003e\n"]]],[],null,[]]