OBRIGATÓRIO: a política completa a ser aplicada ao resource. O tamanho da política é limitado a algumas dezenas de KBs. Uma política vazia é válida, mas alguns serviços do Google Cloud (como Projetos) podem rejeitá-la.
OPCIONAL: uma FieldMask especificando os campos da política a serem modificados. Somente os campos da máscara serão modificados. Se nenhuma máscara for fornecida, a seguinte máscara padrão será usada:
paths: "bindings, etag"
É uma lista separada por vírgulas de nomes de campos totalmente qualificados. Exemplo: "user.displayName,photo".
Corpo da resposta
Se a solicitação for bem-sucedida, o corpo da resposta conterá uma instância de Policy.
[[["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-07-30 UTC."],[[["\u003cp\u003eThis API endpoint \u003ccode\u003ePOST https://cloudaicompanion.googleapis.com/v1/{resource=projects/*/locations/*/codeRepositoryIndexes/*/repositoryGroups/*}:setIamPolicy\u003c/code\u003e sets or replaces the access control policy on a specified resource.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eresource\u003c/code\u003e path parameter is required and specifies the target resource for the policy.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include a \u003ccode\u003epolicy\u003c/code\u003e object defining the access control settings, and an optional \u003ccode\u003eupdateMask\u003c/code\u003e string that specifies which fields of the policy should be modified.\u003c/p\u003e\n"],["\u003cp\u003eA successful response will include an instance of a \u003ccode\u003ePolicy\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization for this operation requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.codeRepositoryIndexes.repositoryGroups.setIamPolicy\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\nSets the access control policy on the specified resource. Replaces any existing policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.\n\n### HTTP request\n\n`POST https://cloudaicompanion.googleapis.com/v1/{resource=projects/*/locations/*/codeRepositoryIndexes/*/repositoryGroups/*}:setIamPolicy`\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](/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)."]]