Policy - List By Service
Api Management hizmetinin tüm Genel İlke tanımlarını listeler.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies?api-version=2022-08-01
URI Parametreleri
Name | İçinde | Gerekli | Tür | Description |
---|---|---|---|---|
resource
|
path | True |
string |
Kaynak grubunun adı. Ad büyük/küçük harfe duyarlı değildir. |
service
|
path | True |
string |
API Management hizmetinin adı. Regex pattern: |
subscription
|
path | True |
string |
Hedef aboneliğin kimliği. |
api-version
|
query | True |
string |
Bu işlem için kullanılacak API sürümü. |
Yanıtlar
Name | Tür | Description |
---|---|---|
200 OK |
İlke Sözleşmeleri dizisini döndürür. |
|
Other Status Codes |
İşlemin neden başarısız olduğunu açıklayan hata yanıtı. |
Güvenlik
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | kullanıcı hesabınızın kimliğine bürünme |
Örnekler
ApiManagementListPolicies
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policies?api-version=2022-08-01
Sample Response
{
"value": [
{
"id": "/subscriptions/subid/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": ""
}
Tanımlar
Name | Description |
---|---|
Error |
Hata Alanı sözleşmesi. |
Error |
Hata Yanıtı. |
Policy |
Liste ilkesi işleminin yanıtı. |
Policy |
policyContent biçimi. |
Policy |
İlke Sözleşmesi ayrıntıları. |
ErrorFieldContract
Hata Alanı sözleşmesi.
Name | Tür | Description |
---|---|---|
code |
string |
Özellik düzeyi hata kodu. |
message |
string |
Özellik düzeyi hatanın insan tarafından okunabilir gösterimi. |
target |
string |
Özellik adı. |
ErrorResponse
Hata Yanıtı.
Name | Tür | Description |
---|---|---|
error.code |
string |
Hizmet tanımlı hata kodu. Bu kod, yanıtta belirtilen HTTP hata kodu için bir alt durum görevi görür. |
error.details |
Doğrulama hatası durumunda istekte gönderilen geçersiz alanların listesi. |
|
error.message |
string |
Hatanın insan tarafından okunabilir gösterimi. |
PolicyCollection
Liste ilkesi işleminin yanıtı.
Name | Tür | Description |
---|---|---|
count |
integer |
Toplam kayıt sayısı sayısı. |
nextLink |
string |
Varsa sonraki sayfa bağlantısı. |
value |
İlke Sözleşmesi değeri. |
PolicyContentFormat
policyContent biçimi.
Name | Tür | Description |
---|---|---|
rawxml |
string |
İçerikler satır içidir ve İçerik türü XML kodlanmamış bir ilke belgesidir. |
rawxml-link |
string |
İlke belgesi XML ile kodlanmaz ve API Management hizmetinden erişilebilen bir HTTP uç noktasında barındırılır. |
xml |
string |
İçerikler satır içidir ve İçerik türü bir XML belgesidir. |
xml-link |
string |
İlke XML belgesi, 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 | Varsayılan değer | Description |
---|---|---|---|
id |
string |
Kaynağın tam kaynak kimliği. Ex - /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 İlke içeriği. |
|
type |
string |
Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts" |