All Products
Search
Document Center

Edge Security Acceleration:GetWafFilter

Last Updated:Jun 25, 2026

Queries the matching engine configuration of a specific site at a given WAF phase. The matching engine defines how WAF detects and handles different types of network requests.

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

get

*Site

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

None None

Request parameters

Parameter

Type

Required

Description

Example

SiteId

integer

No

The site ID. You can obtain this ID by calling the ListSites operation.

1

Phase

string

No

The WAF phase from which to retrieve the matching engine information.

http_bot

Target

string

No

The application target of the matching engine.

characteristics

Type

string

No

The rule type.

http_custom_cc

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

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

Filter

object

The matching engine configuration.

Phase

string

The phase at which WAF processes requests.

http_bot

Target

string

The target of the matching engine.

characteristics

Type

string

The rule type.

http_custom_cc

Fields

array<object>

The match objects and their properties.

array<object>

A match object.

Enable

boolean

Whether the current plan supports this match object.

false

MinPlan

string

The minimum plan that supports this match object, provided the current plan does not.

high

Label

string

The label for the match object.

Header

Key

string

The internal key for the match object.

http.request.headers

Sub

boolean

Whether the match object includes subfields.

true

SubTip

string

A hint for the subfield value.

e.g. Content-Type

Selector

object

The selector that defines how to select the match object.

Kind

string

The selector type, indicating whether it targets data items or other entities.

data

Data

array<object>

The data options available when the selector Kind is data.

object

A data option available when the selector Kind is data.

Label

string

The label for the data option.

China

Value

string

The value of the data option.

CN

Logics

array<object>

The logical operators that define the matching conditions.

array<object>

A logical operator that applies to the match object.

Enable

boolean

Whether the current plan supports this operator.

false

MinPlan

string

The minimum plan that supports this operator, provided the current plan does not.

high

Symbol

string

The internal identifier for the operator.

eq

Operator

string

The label for the operator.

Does not equal

Negative

boolean

Whether to negate the match result.

Type

string

The type of the value. Valid values:

  • integer: An integer.

  • integer_slice: An integer array.

  • string: A string.

  • string_slice: A string array.

string

Kind

string

The input type for the value. Valid values:

  • select:single: A single-select input.

  • select:multi: A multi-select input.

  • input:single: A single-value text input.

  • input:multi: A multi-value text input.

input:single

Attributes

integer

Configurable attributes, such as case sensitivity.

1

Tip

string

A hint for a valid value.

e.g. image/jpeg

Validator

object

The validator that defines validation rules for the value.

Length WafQuotaInteger

The length limit for the value.

Pattern

string

The regular expression pattern for the value.

^example$

Range WafQuotaInteger

The value range for numeric validation.

ErrMsg

string

The error message returned when validation fails.

Enter a valid expression

Examples

Success response

JSON format

{
  "RequestId": "36af3fcc-43d0-441c-86b1-428951dc8225",
  "Filter": {
    "Phase": "http_bot",
    "Target": "characteristics",
    "Type": "http_custom_cc",
    "Fields": [
      {
        "Enable": false,
        "MinPlan": "high",
        "Label": "Header",
        "Key": "http.request.headers",
        "Sub": true,
        "SubTip": "e.g. Content-Type",
        "Selector": {
          "Kind": "data",
          "Data": [
            {
              "Label": "China",
              "Value": "CN"
            }
          ]
        },
        "Logics": [
          {
            "Enable": false,
            "MinPlan": "high",
            "Symbol": "eq",
            "Operator": "Does not equal",
            "Negative": false,
            "Type": "string",
            "Kind": "input:single",
            "Attributes": 1,
            "Tip": "e.g. image/jpeg",
            "Validator": {
              "Length": {
                "Equal": 1,
                "GreaterThan": 1,
                "GreaterThanOrEqual": 1,
                "LessThan": 1,
                "LessThanOrEqual": 1
              },
              "Pattern": "^example$",
              "Range": {
                "Equal": 1,
                "GreaterThan": 1,
                "GreaterThanOrEqual": 1,
                "LessThan": 1,
                "LessThanOrEqual": 1
              },
              "ErrMsg": "Enter a valid expression"
            }
          }
        ]
      }
    ]
  }
}

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.