Workspace Api Operation Policy - List By Operation
Kérje le a szabályzatkonfigurációk listáját az API-művelet szintjén.
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
URI-paraméterek
Name | In | Kötelező | Típus | Description |
---|---|---|---|---|
api
|
path | True |
string minLength: 1maxLength: 256 pattern: ^[^*#&+:<>?]+$ |
API-változat azonosítója. Az aktuális API Management szolgáltatáspéldányban egyedinek kell lennie. A nem aktuális változat rendelkezik ; rev=n utótagként, ahol n a változat száma. |
operation
|
path | True |
string minLength: 1maxLength: 80 |
Műveletazonosító egy API-on belül. Az aktuális API Management szolgáltatáspéldányban egyedinek kell lennie. |
resource
|
path | True |
string minLength: 1maxLength: 90 |
Az erőforráscsoport neve. A név nem megkülönbözteti a kis- és nagybetűket. |
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
Az API Management szolgáltatás neve. |
subscription
|
path | True |
string (uuid) |
A cél-előfizetés azonosítója. Az értéknek UUID-nek kell lennie. |
workspace
|
path | True |
string minLength: 1maxLength: 80 pattern: ^[^*#&+:<>?]+$ |
Munkaterület azonosítója. Az aktuális API Management szolgáltatáspéldányban egyedinek kell lennie. |
api-version
|
query | True |
string minLength: 1 |
A művelethez használni kívánt API-verzió. |
Válaszok
Name | Típus | Description |
---|---|---|
200 OK |
Api Operations Policy Collection. |
|
Other Status Codes |
Hibaválasz, amely leírja, hogy miért nem sikerült a művelet. |
Biztonság
azure_auth
Azure Active Directory OAuth2 Flow.
Típus:
oauth2
Folyamat:
implicit
Engedélyezési URL:
https://login.microsoftonline.com/common/oauth2/authorize
Hatókörök
Name | Description |
---|---|
user_impersonation | a felhasználói fiók megszemélyesítése |
Példák
ApiManagementListWorkspaceApiOperationPolicies
Mintakérelem
Mintaválasz
{
"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": ""
}
Definíciók
Name | Description |
---|---|
Error |
Az erőforrás-kezelési hiba további információi. |
Error |
A hiba részletei. |
Error |
Hibaválasz |
Policy |
A listaszabályzat-művelet válasza. |
Policy |
A policyContent formátuma. |
Policy |
Szabályzatszerződés részletei. |
ErrorAdditionalInfo
Az erőforrás-kezelési hiba további információi.
Name | Típus | Description |
---|---|---|
info |
object |
A további információk. |
type |
string |
A további információtípus. |
ErrorDetail
A hiba részletei.
Name | Típus | Description |
---|---|---|
additionalInfo |
A hiba további információi. |
|
code |
string |
A hibakód. |
details |
A hiba részletei. |
|
message |
string |
A hibaüzenet. |
target |
string |
A hibacél. |
ErrorResponse
Hibaválasz
Name | Típus | Description |
---|---|---|
error |
A hibaobjektum. |
PolicyCollection
A listaszabályzat-művelet válasza.
Name | Típus | Description |
---|---|---|
count |
integer (int64) |
Rekordszám teljes száma. |
nextLink |
string |
Ha van ilyen, a következő oldal hivatkozása. |
value |
Szabályzatszerződés értéke. |
PolicyContentFormat
A policyContent formátuma.
Érték | Description |
---|---|
rawxml |
A tartalom beágyazott, a tartalomtípus pedig nem XML-kódolású szabályzatdokumentum. |
rawxml-link |
A szabályzatdokumentum nem XML-kódolású, és az API Management szolgáltatásból elérhető HTTP-végponton található. |
xml |
A tartalom beágyazott, a tartalomtípus pedig XML-dokumentum. |
xml-link |
A szabályzat XML-dokumentuma az API Management szolgáltatásból elérhető HTTP-végponton található. |
PolicyContract
Szabályzatszerződés részletei.
Name | Típus | Alapértelmezett érték | Description |
---|---|---|---|
id |
string |
Az erőforrás teljes erőforrás-azonosítója. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
|
name |
string |
Az erőforrás neve |
|
properties.format | xml |
A policyContent formátuma. |
|
properties.value |
string |
A szabályzat tartalma a formátum által meghatározott módon. |
|
type |
string |
Az erőforrás típusa. Pl. "Microsoft.Compute/virtualMachines" vagy "Microsoft.Storage/storageAccounts" |