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 the IAM 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 a \u003ccode\u003ePOST\u003c/code\u003e HTTP request to the \u003ccode\u003edns.googleapis.com\u003c/code\u003e API endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003eresource\u003c/code\u003e path parameter, which identifies the resource for which the policy is being requested, adhering to Google Cloud's resource name format.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can contain an optional \u003ccode\u003eGetPolicyOptions\u003c/code\u003e object to specify options, including the maximum policy version for the request, which affects how the policy is formatted.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns a \u003ccode\u003ePolicy\u003c/code\u003e object, and the request requires one of four specified OAuth authorization scopes.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGetPolicyOptions\u003c/code\u003e allows to specify the \u003ccode\u003erequestedPolicyVersion\u003c/code\u003e, with valid values of 0, 1, and 3, where version 3 is mandatory for policies with 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/v1/{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/v1/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."]]