Queries the protection mode of a protection module for a specific domain name. The protection modules include the RegEx Protection Engine, Big Data Deep Learning Engine, HTTP flood protection, data risk control, and positive security model.
You can set the DefenseType parameter to specify the protection module. For more information about the value of this parameter, see the description of the DefenseType parameter in the "Request parameters" section of this topic.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeProtectionModuleMode |
The operation that you want to perform. Set the value to DescribeProtectionModuleMode. |
DefenseType | String | Yes | waf |
The protection module. Valid values:
|
Domain | String | Yes | www.example.com |
The domain name that is added to WAF. |
InstanceId | String | Yes | waf_elasticity-cn-0xldbqt**** |
The ID of the WAF instance. Note You can call the DescribeInstanceInfo operation to query the ID of the WAF instance.
|
ResourceGroupId | String | No | rg-atstuj3rtop**** |
The ID of the resource group to which the domain name belongs in Resource Management. This parameter is empty by default, indicating that the domain name belongs to the default resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Mode | Integer | 1 |
The protection mode of the specified protection module. Valid values: Note The value of the Mode parameter varies based on the value of the DefenseType parameter.
|
RequestId | String | D7861F61-5B61-46CE-A47C-6B19160D5EB0 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeProtectionModuleMode
&DefenseType=waf
&Domain=www.example.com
&InstanceId=waf_elasticity-cn-0xldbqt****
&<Common request parameters>
Sample success responses
XML
format
<DescribeProtectionModuleModeResponse>
<Mode>1</Mode>
<RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>
</DescribeProtectionModuleModeResponse>
JSON
format
{
"Mode": 1,
"RequestId": "D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}
Error codes
For a list of error codes, visit the API Error Center.