Product Policy - Get

İlke yapılandırmasını Ürün düzeyinde alın.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/policy?api-version=2022-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/policy?format={format}&api-version=2022-08-01

URI Parametreleri

Name İçinde Gerekli Tür Description
policyId
path True

PolicyIdName

İlkenin tanımlayıcısı.

productId
path True

string

Ürün tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır.

resourceGroupName
path True

string

Kaynak grubunun adı. Ad büyük/küçük harfe duyarlı değildir.

serviceName
path True

string

API Management hizmetinin adı.

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

Hedef aboneliğin kimliği.

api-version
query True

string

Bu işlem için kullanılacak API sürümü.

format
query

PolicyExportFormat

İlke Dışarı Aktarma Biçimi.

Yanıtlar

Name Tür Description
200 OK

PolicyContract

Ürün İlkesi bilgileri.

Headers

ETag: string

Other Status Codes

ErrorResponse

İş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

ApiManagementGetProductPolicy

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/kjoshiarmTemplateProduct4/policies/policy?api-version=2022-08-01

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/kjoshiarmTemplateProduct4/policies/policy",
  "type": "Microsoft.ApiManagement/service/products/policies",
  "name": "policy",
  "properties": {
    "value": "<policies>\r\n  <inbound>\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  <on-error>\r\n    <base />\r\n  </on-error>\r\n</policies>"
  }
}

Tanımlar

Name Description
ErrorFieldContract

Hata Alanı sözleşmesi.

ErrorResponse

Hata Yanıtı.

PolicyContentFormat

policyContent biçimi.

PolicyContract

İlke Sözleşmesi ayrıntıları.

PolicyExportFormat

İlke Dışarı Aktarma Biçimi.

PolicyIdName

İlkenin tanımlayıcısı.

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

ErrorFieldContract[]

Doğrulama hatası durumunda istekte gönderilen geçersiz alanların listesi.

error.message

string

Hatanın insan tarafından okunabilir gösterimi.

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

PolicyContentFormat

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"

PolicyExportFormat

İlke Dışarı Aktarma Biçimi.

Name Tür Description
rawxml

string

İçerikler satır içidir ve İçerik türü XML kodlanmamış bir ilke belgesidir.

xml

string

İçerikler satır içidir ve İçerik türü bir XML belgesidir.

PolicyIdName

İlkenin tanımlayıcısı.

Name Tür Description
policy

string