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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:GetWafFilter |
get |
*Site
|
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 |
|
|
object |
A data option available when the selector |
||
| 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:
|
string |
| Kind |
string |
The input type for the value. Valid values:
|
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.