Workspace Api Operation Policy - List By Operation
Ottenere l'elenco della configurazione dei criteri a livello di operazione API.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId}/policies?api-version=2024-05-01
Parametri dell'URI
| Nome | In | Necessario | Tipo | Descrizione |
|---|---|---|---|---|
|
api
|
path | True |
string minLength: 1maxLength: 256 pattern: ^[^*#&+:<>?]+$ |
Identificatore di revisione API. Deve essere univoco nell'istanza corrente del servizio Gestione API. La revisione non corrente ha ; rev=n come suffisso dove n è il numero di revisione. |
|
operation
|
path | True |
string minLength: 1maxLength: 80 |
Identificatore dell'operazione all'interno di un'API. Deve essere univoco nell'istanza corrente del servizio Gestione API. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Nome del gruppo di risorse. Il nome non fa distinzione tra maiuscole e minuscole. |
|
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
Nome del servizio Gestione API. |
|
subscription
|
path | True |
string (uuid) |
ID della sottoscrizione di destinazione. Il valore deve essere un UUID. |
|
workspace
|
path | True |
string minLength: 1maxLength: 80 pattern: ^[^*#&+:<>?]+$ |
Identificatore dell'area di lavoro. Deve essere univoco nell'istanza corrente del servizio Gestione API. |
|
api-version
|
query | True |
string minLength: 1 |
Versione dell'API da usare per questa operazione. |
Risposte
| Nome | Tipo | Descrizione |
|---|---|---|
| 200 OK |
Raccolta di criteri delle operazioni API. |
|
| Other Status Codes |
Risposta di errore che descrive il motivo per cui l'operazione non è riuscita. |
Sicurezza
azure_auth
Flusso OAuth2 di Azure Active Directory.
Tipo:
oauth2
Flow:
implicit
URL di autorizzazione:
https://login.microsoftonline.com/common/oauth2/authorize
Ambiti
| Nome | Descrizione |
|---|---|
| user_impersonation | rappresentare l'account utente |
Esempio
ApiManagementListWorkspaceApiOperationPolicies
Esempio di richiesta
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/599e2953193c3c0bd0b3e2fa/operations/599e29ab193c3c0bd0b3e2fb/policies?api-version=2024-05-01
Risposta di esempio
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/apis/599e2953193c3c0bd0b3e2fa/operations/599e29ab193c3c0bd0b3e2fb/policies/policy",
"type": "Microsoft.ApiManagement/service/workspaces/apis/operations/policies",
"name": "policy",
"properties": {
"value": "<!--\r\n IMPORTANT:\r\n - Policy elements can appear only within the <inbound>, <outbound>, <backend> section elements.\r\n - Only the <forward-request> policy element can appear within the <backend> section element.\r\n - To apply a policy to the incoming request (before it is forwarded to the backend service), place a corresponding policy element within the <inbound> section element.\r\n - To apply a policy to the outgoing response (before it is sent back to the caller), place a corresponding policy element within the <outbound> section element.\r\n - To add a policy position the cursor at the desired insertion point and click on the round button associated with the policy.\r\n - To remove a policy, delete the corresponding policy statement from the policy document.\r\n - Position the <base> element within a section element to inherit all policies from the corresponding section element in the enclosing scope.\r\n - Remove the <base> element to prevent inheriting policies from the corresponding section element in the enclosing scope.\r\n - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n <inbound>\r\n <validate-jwt header-name=\"dd\">\r\n <required-claims>\r\n <claim name=\"bla\" separator=\"\">\r\n <value>xxx</value>\r\n </claim>\r\n </required-claims>\r\n </validate-jwt>\r\n <base />\r\n </inbound>\r\n <backend>\r\n <base />\r\n </backend>\r\n <outbound>\r\n <base />\r\n </outbound>\r\n</policies>"
}
}
],
"count": 1,
"nextLink": ""
}
Definizioni
| Nome | Descrizione |
|---|---|
|
Error |
Informazioni aggiuntive sull'errore di gestione delle risorse. |
|
Error |
Dettagli dell'errore. |
|
Error |
Risposta di errore |
|
Policy |
Risposta dell'operazione dei criteri di elenco. |
|
Policy |
Formato del criterioContent. |
|
Policy |
Dettagli contratto criteri. |
ErrorAdditionalInfo
Informazioni aggiuntive sull'errore di gestione delle risorse.
| Nome | Tipo | Descrizione |
|---|---|---|
| info |
object |
Informazioni aggiuntive. |
| type |
string |
Tipo di informazioni aggiuntive. |
ErrorDetail
Dettagli dell'errore.
| Nome | Tipo | Descrizione |
|---|---|---|
| additionalInfo |
Informazioni aggiuntive sull'errore. |
|
| code |
string |
Codice di errore. |
| details |
Dettagli dell'errore. |
|
| message |
string |
Messaggio di errore. |
| target |
string |
Destinazione dell'errore. |
ErrorResponse
Risposta di errore
| Nome | Tipo | Descrizione |
|---|---|---|
| error |
Oggetto error. |
PolicyCollection
Risposta dell'operazione dei criteri di elenco.
| Nome | Tipo | Descrizione |
|---|---|---|
| count |
integer (int64) |
Numero totale di record. |
| nextLink |
string |
Collegamento alla pagina successiva, se disponibile. |
| value |
Valore contratto criteri. |
PolicyContentFormat
Formato del criterioContent.
| Valore | Descrizione |
|---|---|
| xml |
Il contenuto è inline e Il tipo di contenuto è un documento XML. |
| xml-link |
Il documento XML dei criteri è ospitato in un endpoint HTTP accessibile dal servizio Gestione API. |
| rawxml |
Il contenuto è inline e Il tipo di contenuto è un documento di criteri non codificati XML. |
| rawxml-link |
Il documento dei criteri non è codificato in XML ed è ospitato in un endpoint HTTP accessibile dal servizio Gestione API. |
PolicyContract
Dettagli contratto criteri.
| Nome | Tipo | Valore predefinito | Descrizione |
|---|---|---|---|
| id |
string |
ID risorsa completo per la risorsa. Ad esempio - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
|
| name |
string |
Nome della risorsa |
|
| properties.format | xml |
Formato del criterioContent. |
|
| properties.value |
string |
Contenuto del criterio come definito dal formato. |
|
| type |
string |
Tipo della risorsa. Ad esempio, "Microsoft.Compute/virtualMachines" o "Microsoft.Storage/storageAccounts" |