All Products
Search
Document Center

API Gateway:ListPolicyClasses

Last Updated:Dec 25, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Queries policy templates.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
apig:ListPolicyClassesnone
*All Resources
*
    none
none

Request syntax

GET /v1/policy-classes HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
typestringNo

Type of the policy template.

FlowControl
directionstringNo

Direction of the policy.

  • Outbound: OutBound.
  • Inbound: InBound.
  • Both directions: Both.
InBound
attachResourceTypestringNo

Types of attachment points supported by the policy.

  • HttpApi: HttpApi.
  • Operation: Operation of HttpApi.
  • GatewayRoute: Gateway route.
  • GatewayService: Gateway service.
  • GatewayServicePort: Gateway service port.
  • Domain: Gateway domain.
  • Gateway: Gateway.
Operation
pageNumberintegerNo

Page number, default is 1.

1
pageSizeintegerNo

Page size

10

Response parameters

ParameterTypeDescriptionExample
object

Response object

requestIdstring

Request ID.

23B45FA9-7208-5E55-B5CE-B6B2567DD822
codestring

Response code.

Ok
messagestring

ResponseMessage

success
dataobject

Policy template information.

pageNumberinteger

Page number.

1
pageSizeinteger

Page size

10
totalSizeinteger

Total number of items.

10
itemsarray

List of policy templates

policyClassInfoPolicyClassInfo

Policy template information.

Examples

Sample success responses

JSONformat

{
  "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": "",
        "type": "FlowControl",
        "direction": "InBound",
        "attachableResourceTypes": [
          "Gateway"
        ],
        "executeStage": "POST",
        "executePriority": 1,
        "enableLog": true,
        "deprecated": false,
        "configExample": {}
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-07-25The request parameters of the API has changedView Change Details