Workspace Api Operation Policy - List By Operation
API İşlem düzeyinde ilke yapılandırmasının listesini alı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 Parametreleri
| Name | İçinde | Gerekli | Tür | Description |
|---|---|---|---|---|
|
api
|
path | True |
string minLength: 1maxLength: 256 pattern: ^[^*#&+:<>?]+$ |
API düzeltme tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır. Geçerli olmayan düzeltme ; rev=n sonek olarak, n düzeltme numarasıdır. |
|
operation
|
path | True |
string minLength: 1maxLength: 80 |
API içindeki işlem tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız. |
|
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
API Management hizmetinin adı. |
|
subscription
|
path | True |
string (uuid) |
Hedef aboneliğin kimliği. Değer bir UUID olmalıdır. |
|
workspace
|
path | True |
string minLength: 1maxLength: 80 pattern: ^[^*#&+:<>?]+$ |
Çalışma alanı tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır. |
|
api-version
|
query | True |
string minLength: 1 |
Bu işlem için kullanılacak API sürümü. |
Yanıtlar
| Name | Tür | Description |
|---|---|---|
| 200 OK |
Api İşlemleri İlkesi Koleksiyonu. |
|
| Other Status Codes |
İşlemin neden başarısız olduğunu açıklayan hata yanıtı. |
Güvenlik
azure_auth
Azure Active Directory OAuth2 Akışı.
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
| Name | Description |
|---|---|
| user_impersonation | kullanıcı hesabınızın kimliğine bürünme |
Örnekler
ApiManagementListWorkspaceApiOperationPolicies
Örnek isteği
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
Örnek yanıt
{
"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": ""
}
Tanımlar
| Name | Description |
|---|---|
|
Error |
Kaynak yönetimi hatası ek bilgileri. |
|
Error |
Hata ayrıntısı. |
|
Error |
Hata yanıtı |
|
Policy |
Liste ilkesi işleminin yanıtı. |
|
Policy |
policyContent biçimi. |
|
Policy |
İlke Sözleşmesi ayrıntıları. |
ErrorAdditionalInfo
Kaynak yönetimi hatası ek bilgileri.
| Name | Tür | Description |
|---|---|---|
| info |
object |
Ek bilgiler. |
| type |
string |
Ek bilgi türü. |
ErrorDetail
Hata ayrıntısı.
| Name | Tür | Description |
|---|---|---|
| additionalInfo |
Hata ek bilgileri. |
|
| code |
string |
Hata kodu. |
| details |
Hata ayrıntıları. |
|
| message |
string |
Hata iletisi. |
| target |
string |
Hata hedefi. |
ErrorResponse
Hata yanıtı
| Name | Tür | Description |
|---|---|---|
| error |
Hata nesnesi. |
PolicyCollection
Liste ilkesi işleminin yanıtı.
| Name | Tür | Description |
|---|---|---|
| count |
integer (int64) |
Toplam kayıt sayısı. |
| nextLink |
string |
Varsa sonraki sayfa bağlantısı. |
| value |
İlke Sözleşmesi değeri. |
PolicyContentFormat
policyContent biçimi.
| Değer | Description |
|---|---|
| xml |
İçerikler satır içidir ve İçerik türü bir XML belgesidir. |
| xml-link |
İlke XML belgesi, API Management hizmetinden erişilebilen bir HTTP uç noktasında barındırılır. |
| rawxml |
İçerikler satır içidir ve İçerik türü XML ile kodlanmamış bir ilke belgesidir. |
| rawxml-link |
İlke belgesi XML ile kodlanmaz ve API Management hizmetinden erişilebilen bir HTTP uç noktasında barındırılır. |
PolicyContract
İlke Sözleşmesi ayrıntıları.
| Name | Tür | Default value | Description |
|---|---|---|---|
| id |
string |
Kaynağın tam kaynak kimliği. Örn - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
|
| name |
string |
Kaynağın adı |
|
| properties.format | xml |
policyContent biçimi. |
|
| properties.value |
string |
biçim tarafından tanımlanan İlkenin içeriği. |
|
| type |
string |
Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts" |