All Products
Search
Document Center

Edge Security Acceleration:ListUserWafRulesets

Last Updated:Mar 26, 2026

Retrieves WAF rule sets for a specified instance, allowing filtering by phase, name, and other criteria.

Operation description

Request

  • InstanceId is a required parameter that specifies the WAF instance to query.

  • The Phase parameter filters rule sets by WAF processing phase, such as custom rules and rate limiting rules.

  • Use NameLike in QueryArgs to perform a fuzzy search on rule set names.

  • The PageNumber and PageSize parameters control pagination and default to 1 and 20, respectively.

  • The response includes the request ID, current plan usage, the total record count, and a list of rule set details.

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:ListUserWafRulesets

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

esa-xxxxxxx

Phase

string

No

Specifies the execution phase of the WAF rule.

  • http_whitelist: whitelist rule

  • http_custom: custom rule

  • http_managed: managed rule

  • http_anti_scan: anti-scan rule

  • http_ratelimit: rate limit rule

  • ip_access_rule: IP access rule

  • http_bot: advanced mode bot

  • http_security_level_rule: security rule

http_custom

QueryArgs

object

No

Parameters for filtering and sorting the results.

NameLike

string

No

A string for a fuzzy search of ruleset names.

example

OrderBy

string

No

The field by which to sort results.

id

Desc

boolean

No

Specifies whether to sort results in descending order.

PageNumber

integer

No

The page number to return.

1

PageSize

integer

No

The number of entries to return on each page.

20

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

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

InstanceUsage

integer

The instance usage.

10

TotalCount

integer

The total number of records after filtering.

5

Rulesets

array<object>

A list of WAF ruleset objects.

object

A WAF ruleset object.

Id

integer

The WAF ruleset ID.

10000001

Position

integer

The WAF ruleset position.

1

Phase

string

The WAF rule execution phase. Possible values:

  • http_whitelist: Whitelist rule

  • http_custom: Custom rule

  • http_managed: Managed rule

  • http_anti_scan: Scan protection rule

  • http_ratelimit: Rate limit rule

  • ip_access_rule: IP access rule

  • http_bot: Bot rule

  • http_security_level_rule: Security rule

http_custom

Name

string

The WAF ruleset name.

example

Description

string

The WAF ruleset description.

example

Status

string

The WAF ruleset status.

on

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries returned per page.

20

Examples

Success response

JSON format

{
  "RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
  "InstanceUsage": 10,
  "TotalCount": 5,
  "Rulesets": [
    {
      "Id": 10000001,
      "Position": 1,
      "Phase": "http_custom",
      "Name": "example",
      "Description": "example",
      "Status": "on"
    }
  ],
  "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.