Workspace Api Operation Policy - List By Operation
API 작업 수준에서 정책 구성 목록을 가져옵니다.
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 매개 변수
| Name | In(다음 안에) | 필수 | 형식 | Description |
|---|---|---|---|---|
|
api
|
path | True |
string minLength: 1maxLength: 256 pattern: ^[^*#&+:<>?]+$ |
API 수정 식별자입니다. 현재 API Management 서비스 인스턴스에서 고유해야 합니다. 현재 버전이 아닌 수정 버전에는 다음이 있습니다. rev=n은 접미사로, n은 수정 번호입니다. |
|
operation
|
path | True |
string minLength: 1maxLength: 80 |
API 내의 작업 식별자입니다. 현재 API Management 서비스 인스턴스에서 고유해야 합니다. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
리소스 그룹의 이름입니다. 이름은 대/소문자를 구분하지 않습니다. |
|
service
|
path | True |
string minLength: 1maxLength: 50 pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$ |
API Management 서비스의 이름입니다. |
|
subscription
|
path | True |
string (uuid) |
대상 구독의 ID입니다. 값은 UUID여야 합니다. |
|
workspace
|
path | True |
string minLength: 1maxLength: 80 pattern: ^[^*#&+:<>?]+$ |
작업 영역 식별자입니다. 현재 API Management 서비스 인스턴스에서 고유해야 합니다. |
|
api-version
|
query | True |
string minLength: 1 |
이 작업에 사용할 API 버전입니다. |
응답
| Name | 형식 | Description |
|---|---|---|
| 200 OK |
Api Operations 정책 컬렉션입니다. |
|
| Other Status Codes |
작업이 실패한 이유를 설명하는 오류 응답입니다. |
보안
azure_auth
Azure Active Directory OAuth2 흐름.
형식:
oauth2
Flow:
implicit
권한 부여 URL:
https://login.microsoftonline.com/common/oauth2/authorize
범위
| Name | Description |
|---|---|
| user_impersonation | 사용자 계정 가장 |
예제
ApiManagementListWorkspaceApiOperationPolicies
샘플 요청
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
샘플 응답
{
"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": ""
}
정의
| Name | Description |
|---|---|
|
Error |
리소스 관리 오류 추가 정보입니다. |
|
Error |
오류 세부 정보입니다. |
|
Error |
오류 응답 |
|
Policy |
목록 정책 작업의 응답입니다. |
|
Policy |
policyContent의 형식입니다. |
|
Policy |
정책 계약 세부 정보입니다. |
ErrorAdditionalInfo
리소스 관리 오류 추가 정보입니다.
| Name | 형식 | Description |
|---|---|---|
| info |
object |
추가 정보입니다. |
| type |
string |
추가 정보 유형입니다. |
ErrorDetail
오류 세부 정보입니다.
| Name | 형식 | Description |
|---|---|---|
| additionalInfo |
오류 추가 정보입니다. |
|
| code |
string |
오류 코드입니다. |
| details |
오류 세부 정보입니다. |
|
| message |
string |
오류 메시지입니다. |
| target |
string |
오류 대상입니다. |
ErrorResponse
오류 응답
| Name | 형식 | Description |
|---|---|---|
| error |
오류 개체입니다. |
PolicyCollection
목록 정책 작업의 응답입니다.
| Name | 형식 | Description |
|---|---|---|
| count |
integer (int64) |
총 레코드 수 수입니다. |
| nextLink |
string |
다음 페이지 링크(있는 경우)입니다. |
| value |
정책 계약 값입니다. |
PolicyContentFormat
policyContent의 형식입니다.
| 값 | Description |
|---|---|
| xml |
콘텐츠는 인라인이고 콘텐츠 형식은 XML 문서입니다. |
| xml-link |
정책 XML 문서는 API Management 서비스에서 액세스할 수 있는 HTTP 엔드포인트에서 호스트됩니다. |
| rawxml |
콘텐츠는 인라인이며 콘텐츠 형식은 XML로 인코딩되지 않은 정책 문서입니다. |
| rawxml-link |
정책 문서는 XML로 인코딩되지 않으며 API Management 서비스에서 액세스할 수 있는 HTTP 엔드포인트에서 호스트됩니다. |
PolicyContract
정책 계약 세부 정보입니다.
| Name | 형식 | Default value | Description |
|---|---|---|---|
| id |
string |
리소스에 대한 정규화된 리소스 ID입니다. 예 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
|
| name |
string |
리소스의 이름 |
|
| properties.format | xml |
policyContent의 형식입니다. |
|
| properties.value |
string |
형식으로 정의된 정책의 내용입니다. |
|
| type |
string |
리소스의 형식입니다. 예: "Microsoft.Compute/virtualMachines" 또는 "Microsoft.Storage/storageAccounts" |