You can call this operation to change the protection mode of a specific protection module, including the RegEx protection engine, big data deep learning engine, HTTP flood protection feature, data risk control feature, and positive security model.
You can set the DefenseType parameter to specify the protection module. For more information about the values of this parameter, see the description of DefenseType in the following section.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyProtectionModuleMode |
The operation that you want to perform. Set the value to ModifyProtectionModuleMode. |
DefenseType | String | Yes | waf |
The protection module. Valid values:
|
Domain | String | Yes | www.example.com |
The domain that has been added to WAF. |
InstanceId | String | Yes | waf_elasticity-cn-0xldbqtm005 |
The ID of the WAF instance. Note You can call the DescribeInstanceInfo operation to query the ID of the WAF instance.
|
Mode | Integer | Yes | 0 |
The protection mode of the specified protection module. Valid values: Note The value of the Mode parameter varies depending on the value of the DefenseType parameter.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | D7861F61-5B61-46CE-A47C-6B19160D5EB0 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ModifyProtectionModuleMode
&DefenseType=waf
&Domain=www.example.com
&InstanceId=waf_elasticity-cn-0xldbqtm005
&Mode=0
& <Common request parameters>
Sample success responses
XML
format
<RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>
JSON
format
{
"RequestId":"D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}
Error codes
For a list of error codes, visit the API Error Center.