Policy - List By Service
Listet alle globalen Richtliniendefinitionen des API-Verwaltungsdiensts auf.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies?api-version=2024-05-01
URI-Parameter
Name | In | Erforderlich | Typ | Beschreibung |
---|---|---|---|---|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Der Name der Ressourcengruppe. Bei dem Namen wird die Groß-/Kleinschreibung nicht beachtet. |
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
Der Name des API-Verwaltungsdiensts. |
subscription
|
path | True |
string (uuid) |
Die ID des Zielabonnements. Der Wert muss eine UUID sein. |
api-version
|
query | True |
string minLength: 1 |
Die API-Version, die für diesen Vorgang verwendet werden soll. |
Antworten
Name | Typ | Beschreibung |
---|---|---|
200 OK |
Gibt ein Array von Richtlinienverträgen zurück. |
|
Other Status Codes |
Fehlerantwort, die beschreibt, warum der Vorgang fehlgeschlagen ist. |
Sicherheit
azure_auth
Azure Active Directory OAuth2-Fluss.
Typ:
oauth2
Ablauf:
implicit
Autorisierungs-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiche
Name | Beschreibung |
---|---|
user_impersonation | Identitätswechsel ihres Benutzerkontos |
Beispiele
ApiManagementListPolicies
Beispielanforderung
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies?api-version=2024-05-01
Beispiel für eine Antwort
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies/policy",
"type": "Microsoft.ApiManagement/service/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 - Policies are applied in the order of their appearance, from the top down.\r\n-->\r\n<policies>\r\n <inbound />\r\n <backend>\r\n <forward-request />\r\n </backend>\r\n <outbound />\r\n</policies>"
}
}
],
"count": 1,
"nextLink": ""
}
Definitionen
Name | Beschreibung |
---|---|
Error |
Der Ressourcenverwaltungsfehler zusätzliche Informationen. |
Error |
Das Fehlerdetails. |
Error |
Fehlerantwort |
Policy |
Die Antwort des Listenrichtlinienvorgangs. |
Policy |
Format der policyContent. |
Policy |
Details des Richtlinienvertrags. |
ErrorAdditionalInfo
Der Ressourcenverwaltungsfehler zusätzliche Informationen.
Name | Typ | Beschreibung |
---|---|---|
info |
object |
Die zusätzlichen Informationen. |
type |
string |
Der zusätzliche Informationstyp. |
ErrorDetail
Das Fehlerdetails.
Name | Typ | Beschreibung |
---|---|---|
additionalInfo |
Die zusätzlichen Informationen des Fehlers. |
|
code |
string |
Der Fehlercode. |
details |
Die Fehlerdetails. |
|
message |
string |
Die Fehlermeldung. |
target |
string |
Das Fehlerziel. |
ErrorResponse
Fehlerantwort
Name | Typ | Beschreibung |
---|---|---|
error |
Das Fehlerobjekt. |
PolicyCollection
Die Antwort des Listenrichtlinienvorgangs.
Name | Typ | Beschreibung |
---|---|---|
count |
integer (int64) |
Gesamtzahl der Datensatzanzahl. |
nextLink |
string |
Link zur nächsten Seite, falls vorhanden. |
value |
Richtlinienvertragswert. |
PolicyContentFormat
Format der policyContent.
Wert | Beschreibung |
---|---|
rawxml |
Der Inhalt ist inline und der Inhaltstyp ist ein nicht XML-codiertes Richtliniendokument. |
rawxml-link |
Das Richtliniendokument ist nicht XML-codiert und wird auf einem HTTP-Endpunkt gehostet, auf den über den API-Verwaltungsdienst zugegriffen werden kann. |
xml |
Der Inhalt ist inline und der Inhaltstyp ist ein XML-Dokument. |
xml-link |
Das XML-Dokument der Richtlinie wird auf einem HTTP-Endpunkt gehostet, auf den über den API-Verwaltungsdienst zugegriffen werden kann. |
PolicyContract
Details des Richtlinienvertrags.
Name | Typ | Standardwert | Beschreibung |
---|---|---|---|
id |
string |
Vollqualifizierte Ressourcen-ID für die Ressource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
|
name |
string |
Der Name der Ressource |
|
properties.format | xml |
Format der policyContent. |
|
properties.value |
string |
Inhalt der Richtlinie gemäß definition des Formats. |
|
type |
string |
Der Typ der Ressource. Z. B. "Microsoft.Compute/virtualMachines" oder "Microsoft.Storage/storageAccounts" |