Encapsulates settings provided to repositoryGroups.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-30 UTC."],[[["\u003cp\u003eThis webpage details how to retrieve the access control policy for a specified resource using the \u003ccode\u003egetIamPolicy\u003c/code\u003e method, which returns an empty policy if no policy is currently set.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request for this operation uses \u003ccode\u003eGET\u003c/code\u003e with a URL structure that includes a placeholder for the resource and the method, along with parameters to define what is being requested.\u003c/p\u003e\n"],["\u003cp\u003eThe required resource for this operation is determined via a path parameter denoted as \u003ccode\u003eresource\u003c/code\u003e, that specifies a resource for which the policy is being requested, according to Google's Resource Naming guidelines.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003eoptions\u003c/code\u003e query parameter allows for the specification of a \u003ccode\u003eGetPolicyOptions\u003c/code\u003e object, and the request body must remain empty.\u003c/p\u003e\n"],["\u003cp\u003eThe operation needs \u003ccode\u003ecloudaicompanion.repositoryGroups.getIamPolicy\u003c/code\u003e permissions, and requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope for authorization, and returns an instance of \u003ccode\u003ePolicy\u003c/code\u003e in the response body if the request is successful.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.codeRepositoryIndexes.repositoryGroups.getIamPolicy\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n- [GetPolicyOptions](#GetPolicyOptions)\n - [JSON representation](#GetPolicyOptions.SCHEMA_REPRESENTATION)\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`GET https://cloudaicompanion.googleapis.com/v1/{resource=projects/*/locations/*/codeRepositoryIndexes/*/repositoryGroups/*}:getIamPolicy`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Policy](/gemini/docs/api/reference/rest/v1/Policy).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires **one of** the following [IAM](https://cloud.google.com/iam/docs) permissions on the `resource` resource, depending on the resource type:\n\n- `cloudaicompanion.repositoryGroups.getIamPolicy`\n- `cloudaicompanion.topics.getIamPolicy`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs).\n\nGetPolicyOptions\n----------------\n\nEncapsulates settings provided to repositoryGroups.getIamPolicy."]]