All Products
Search
Document Center

API Gateway:ListPolicyClasses

更新时间:Feb 05, 2026
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

The template type.

FlowControl
directionstringNo

The direction of traffic on which the policy takes effect. Valid values:

  • OutBound
  • InBound
  • Both
InBound
attachResourceTypestringNo

The supported mount point type. Valid values:

  • HttpApi: an HTTP API
  • Operation: an operation in an HTTP API
  • GatewayRoute: a route
  • GatewayService: a service
  • GatewayServicePort: a service port
  • Domain: a domain name
  • Gateway: an instance
Operation
pageNumberintegerNo

The page number of the page to return. Default value: 1.

1
pageSizeintegerNo

The number of entries per page.

10
attachResourceIdstringNo

The resource ID to attach the policy

route-001
gatewayIdstringNo

The gateway ID

gw-001

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

requestIdstring

The request ID.

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

The status code returned.

Ok
messagestring

The response message returned.

success
dataobject

An array of policy template information.

pageNumberinteger

The page number of the returned page.

1
pageSizeinteger

The number of entries per page.

10
totalSizeinteger

The total number of entries.

10
itemsarray

The templates.

policyClassInfoPolicyClassInfo

The 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": "",
        "name": "",
        "alias": "",
        "version": "",
        "description": "",
        "type": "",
        "direction": "",
        "attachableResourceTypes": [
          ""
        ],
        "executeStage": "",
        "executePriority": "",
        "enableLog": true,
        "deprecated": true,
        "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