Restituisce le autorizzazioni di cui dispone un chiamante sulla risorsa specificata. Se la risorsa non esiste, verrà restituito un insieme vuoto di autorizzazioni, non un errore NOT_FOUND.
Nota: questa operazione è progettata per essere utilizzata per creare interfacce utente e strumenti a riga di comando attenti alle autorizzazioni, non per il controllo dell'autorizzazione. Questa operazione potrebbe "non riuscire" senza avviso.
Richiesta HTTP
POST https://networksecurity.googleapis.com/v1beta1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions
OBBLIGATORI: la risorsa per cui viene richiesto il dettaglio delle norme. Consulta Nomi delle risorse per il valore appropriato per questo campo.
Corpo della richiesta
Il corpo della richiesta contiene dati con la seguente struttura:
Rappresentazione JSON
{"permissions": [string]}
Campi
permissions[]
string
L'insieme di autorizzazioni da controllare per resource. Le autorizzazioni con caratteri jolly (ad es. * o storage.*) non sono consentite. Per ulteriori informazioni, consulta la Panoramica di IAM.
[[["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 2025-07-29 UTC."],[],[],null,["# Method: projects.locations.authorizationPolicies.testIamPermissions\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\nReturns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.\n\n### HTTP request\n\n`POST https://networksecurity.googleapis.com/v1beta1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions`\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 [TestIamPermissionsResponse](/service-mesh/v1.23/docs/reference/network-security/rest/v1beta1/TestIamPermissionsResponse).\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](https://cloud.google.com/docs/authentication/)."]]