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: paths: "bindings, etag"
getResource
REQUIRED: The resource for which the policy is being specified.
See the operation documentation for the appropriate value for this field.
Returns
Type
Description
string
setResource
REQUIRED: The resource for which the policy is being specified.
See the operation documentation for the appropriate value for this field.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPolicy
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.
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:
paths: "bindings, etag"
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:
paths: "bindings, etag"
[[["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-28 UTC."],[],[],null,["# Google API Common Protos V1 Client - Class SetIamPolicyRequest (4.12.3)\n\nVersion latestkeyboard_arrow_down\n\n- [4.12.3 (latest)](/php/docs/reference/common-protos/latest/Cloud.Iam.V1.SetIamPolicyRequest)\n- [4.12.2](/php/docs/reference/common-protos/4.12.2/Cloud.Iam.V1.SetIamPolicyRequest)\n- [4.11.0](/php/docs/reference/common-protos/4.11.0/Cloud.Iam.V1.SetIamPolicyRequest)\n- [4.10.0](/php/docs/reference/common-protos/4.10.0/Cloud.Iam.V1.SetIamPolicyRequest)\n- [4.9.0](/php/docs/reference/common-protos/4.9.0/Cloud.Iam.V1.SetIamPolicyRequest)\n- [4.8.3](/php/docs/reference/common-protos/4.8.3/Cloud.Iam.V1.SetIamPolicyRequest) \nReference documentation and code samples for the Google API Common Protos V1 Client class SetIamPolicyRequest.\n\nRequest message for `SetIamPolicy` method.\n\nGenerated from protobuf message `google.iam.v1.SetIamPolicyRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Iam \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getResource\n\nREQUIRED: The resource for which the policy is being specified.\n\nSee the operation documentation for the appropriate value for this field.\n\n### setResource\n\nREQUIRED: The resource for which the policy is being specified.\n\nSee the operation documentation for the appropriate value for this field.\n\n### getPolicy\n\nREQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.\n\n### hasPolicy\n\n### clearPolicy\n\n### setPolicy\n\nREQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.\n\n### getUpdateMask\n\nOPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\n`paths: \"bindings, etag\"`\n\n### hasUpdateMask\n\n### clearUpdateMask\n\n### setUpdateMask\n\nOPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\n`paths: \"bindings, etag\"`"]]