Encapsula as configurações fornecidas para repositoryGroups.getIamPolicy.
Representação JSON
{"requestedPolicyVersion": integer}
Campos
requestedPolicyVersion
integer
Opcional. A versão máxima da política que será usada para formatar a política.
Os valores válidos são: 0, 1 e 3. Solicitações especificando um valor inválido serão rejeitadas.
As solicitações de políticas com qualquer vinculação condicional precisam especificar a versão 3. As políticas sem vinculações de papéis condicionais podem especificar qualquer valor válido ou deixar o campo sem definição.
A política na resposta pode usar a versão da política especificada ou uma versão anterior. Por exemplo, se você especificar a versão 3, mas a política não tiver vinculações de papéis condicionais, a resposta usará a versão 1.
Para saber quais recursos são compatíveis com as condições nas políticas do IAM, consulte a documentação do IAM.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-14 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."]]