All Products
Search
Document Center

Edge Security Acceleration:ListWafRulesets

Last Updated:Jul 07, 2026

Lists the rulesets under the current WAF execution phase. Queries basic information and status of rulesets with paging support.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

esa:ListWafRulesets

get

*Site

acs:esa:{#regionId}:{#accountId}:site/{#SiteId}

None None

Request parameters

Parameter

Type

Required

Description

Example

SiteId

integer

Yes

The site ID. You can call the ListSites operation to obtain the site ID.

1

SiteVersion

integer

No

The version number of the site configuration. For sites with configuration version management enabled, you can use this parameter to specify the site version for which the configuration takes effect. Default value: 0.

0

Phase

string

Yes

The WAF rule execution phase. Valid values:

  • http_whitelist: whitelist rules

  • http_custom: custom rules

  • http_managed: managed rules

  • http_anti_scan: scan protection rules

  • http_ratelimit: frequency control rules

  • ip_access_rule: IP access rules

  • http_bot: advanced mode bots

  • http_security_level_rule: security rules

http_bot

QueryArgs

object

No

The query parameters, passed in JSON format, including various filter conditions.

http_bot

NameLike

string

No

The fuzzy match string for the ruleset name.

example

AnyLike

string

No

The fuzzy match string for the ruleset ID, ruleset name, rule ID, or rule name.

example

OrderBy

string

No

The column by which to sort the results.

id

Desc

boolean

No

Specifies whether to sort the results in descending order.

PageNumber

integer

No

The page number. Specifies the current page number for paging queries.

1

PageSize

integer

No

The page size. Specifies the number of records per page for paging queries.

20

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

36af3fcc-43d0-441c-86b1-428951dc8225

SiteUsage

integer

The number of WAF rulesets used by the site in this WAF execution phase.

5

InstanceUsage

integer

The number of WAF rulesets used by the instance in this WAF execution phase.

10

TotalCount

integer

The total number of records after filtering.

5

Rulesets

array<object>

The list of rulesets, including detailed information about each ruleset.

object

The ruleset information.

UpdateTime

string

The last modification time of the ruleset.

Format: RFC 3339 / ISO 8601, UTC time zone (ending with Z).

Example: 2026-06-10T14:23:45Z

2024-01-01T00:00:00Z

Id

integer

The ID of the WAF ruleset. You can call the ListWafRulesets operation to obtain the ruleset ID.

10000001

Name

string

The ruleset name.

example

Status

string

The ruleset status.

on

Phase

string

The WAF rule execution phase. Valid values:

  • http_whitelist: whitelist rules

  • http_custom: custom rules

  • http_managed: managed rules

  • http_anti_scan: scan protection rules

  • http_ratelimit: frequency control rules

  • ip_access_rule: IP access rules

  • http_bot: advanced mode bots

  • http_security_level_rule: security rules

http_bot

Types

array

The list of rule types.

string

The rule type.

http_custom_cc

Target

string

The protection target type in http_bot.

web

Fields

array

The list of match objects.

string

The match object.

http.request.headers

PageNumber

integer

The current page number.

1

PageSize

integer

The page size.

20

Examples

Success response

JSON format

{
  "RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
  "SiteUsage": 5,
  "InstanceUsage": 10,
  "TotalCount": 5,
  "Rulesets": [
    {
      "UpdateTime": "2024-01-01T00:00:00Z",
      "Id": 10000001,
      "Name": "example",
      "Status": "on",
      "Phase": "http_bot",
      "Types": [
        "http_custom_cc"
      ],
      "Target": "web",
      "Fields": [
        "http.request.headers"
      ]
    }
  ],
  "PageNumber": 1,
  "PageSize": 20
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is invalid. The specified parameter is invalid.
400 InternalException Failed to call the service. Try again later or contact technical support. Failed to call the service. Try again later or contact technical support.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.