Encapsulates settings provided to managedZones.getIamPolicy.
JSON representation
{"requestedPolicyVersion":integer}
Fields
requestedPolicyVersion
integer
Optional. The maximum policy version that will be used to format the policy.
Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.
Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.
The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.
To learn which resources support conditions in their IAM policies, see theIAM documentation.
[[["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-05-19 UTC."],[[["\u003cp\u003eThis document outlines the process for retrieving the access control policy for a specified resource using the \u003ccode\u003egetIamPolicy\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetIamPolicy\u003c/code\u003e request is made via a \u003ccode\u003ePOST\u003c/code\u003e HTTP request to a URL structured according to gRPC Transcoding syntax, including a required \u003ccode\u003eresource\u003c/code\u003e path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can include an optional \u003ccode\u003eGetPolicyOptions\u003c/code\u003e object, allowing specification of the policy version using the \u003ccode\u003eoptions\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eA successful response will return an instance of \u003ccode\u003ePolicy\u003c/code\u003e, while the request requires one of the specified OAuth authorization scopes for access.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetPolicyOptions\u003c/code\u003e object can specify the desired policy version, which can be 0, 1, or 3, and it should be noted that version 3 is required if there are any conditional role bindings.\u003c/p\u003e\n"]]],[],null,["# Method: managedZones.getIamPolicy\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [GetPolicyOptions](#GetPolicyOptions)\n - [JSON representation](#GetPolicyOptions.SCHEMA_REPRESENTATION)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nGets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.\n\n### HTTP request\n\n`POST https://dns.googleapis.com/dns/v1beta2/{resource=projects/*/managedZones/*}:getIamPolicy`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Policy](/dns/docs/reference/rest/v1beta2/Policy).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/cloud-platform.read-only`\n- `\n https://www.googleapis.com/auth/ndev.clouddns.readonly`\n- `\n https://www.googleapis.com/auth/ndev.clouddns.readwrite`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/external/authorization-gcp).\n\nGetPolicyOptions\n----------------\n\nEncapsulates settings provided to managedZones.getIamPolicy."]]