OBBLIGATORIO: il criterio completo da applicare a resource. La dimensione del criterio è limitata ad alcuni 10 secondi della knowledge base. Un criterio vuoto è un criterio valido, ma alcuni servizi Google Cloud (come i progetti) potrebbero rifiutarlo.
FACOLTATIVO: una maschera di campo che specifica i campi del criterio da modificare. Verranno modificati solo i campi nella maschera. Se non viene fornita alcuna maschera, viene utilizzata la seguente maschera predefinita:
paths: "bindings, etag"
Si tratta di un elenco separato da virgole di nomi completi dei campi. Esempio: "user.displayName,photo".
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di Policy.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2024-06-27 UTC."],[[["\u003cp\u003eThis endpoint sets the access control policy for a specified resource, replacing any existing policy, and it requires an authenticated request.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a \u003ccode\u003ePOST\u003c/code\u003e method to a specific URL that uses gRPC Transcoding syntax, including a required \u003ccode\u003eresource\u003c/code\u003e path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain a complete policy to be applied and an optional \u003ccode\u003eupdateMask\u003c/code\u003e field for modifying specific policy fields.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns a \u003ccode\u003ePolicy\u003c/code\u003e instance, and potential errors include \u003ccode\u003eNOT_FOUND\u003c/code\u003e, \u003ccode\u003eINVALID_ARGUMENT\u003c/code\u003e, and \u003ccode\u003ePERMISSION_DENIED\u003c/code\u003e.\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.targets.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- [Try it!](#try-it)\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://clouddeploy.googleapis.com/v1/{resource=projects/*/locations/*/targets/*}: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](/deploy/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)."]]