Retrieves policy templates.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apig:ListPolicyClasses |
none |
*All Resource
|
None | None |
Request syntax
GET /v1/policy-classes HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| type |
string |
No |
The policy templatetype. |
FlowControl |
| direction |
string |
No |
The direction of the policy. Valid values:
|
InBound |
| attachResourceType |
string |
No |
The type of resource that the policy can be attached to. Valid values:
|
Operation |
| pageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| pageSize |
integer |
No |
The number of entries per page. |
10 |
| attachResourceId |
string |
No |
The ID of the attached resource. |
route-001 |
| gatewayId |
string |
No |
The gateway ID. |
gw-001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| requestId |
string |
The request ID. |
23B45FA9-7208-5E55-B5CE-B6B2567DD822 |
| code |
string |
The response code. |
Ok |
| message |
string |
The response message. |
success |
| data |
object |
The policy template information. |
|
| pageNumber |
integer |
The page number. |
1 |
| pageSize |
integer |
The number of entries per page. |
10 |
| totalSize |
integer |
The total number of entries. |
10 |
| items |
array |
The list of policy templates. |
|
| PolicyClassInfo |
The policy template information. |
Examples
Success response
JSON format
{
"requestId": "23B45FA9-7208-5E55-B5CE-B6B2567DD822",
"code": "Ok",
"message": "success",
"data": {
"pageNumber": 1,
"pageSize": 10,
"totalSize": 10,
"items": [
{
"classId": "pc-cpqm0s94ckt1displ8ng",
"name": "ConcurrencyLimit",
"alias": "并发控制",
"version": "1.0.0",
"description": "通过控制并发线程数以保证系统的稳定性。适用于应用内部或下游依赖出现不稳定的场景,例如慢SQL、下游应用响应时间变长等。",
"type": "FlowControl",
"direction": "InBound",
"attachableResourceTypes": [
"Gateway"
],
"executeStage": "POST",
"executePriority": "1",
"enableLog": true,
"deprecated": false,
"configExample": "{}"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.