You can call this operation to enable or disable the protection of a specified WAF feature, such as web intrusion prevention, data security, advanced protection, Bot management, and access control or throttling.
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 | Boolean | No | ModifyProtectionModuleStatus |
The operation that you want to perform. Set the value to ModifyProtectionModuleStatus. |
DefenseType | String | No | waf |
The protection module. Valid values:
|
Domain | String | No | www.example.com |
The domain name that has been added to WAF. |
InstanceId | String | No | 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.
|
ModuleStatus | Integer | Yes | 1 |
The status of the specified protection module. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | D7861F61-5B61-46CE-A47C-6B19160D5EB0 |
The ID of the request. |
Samples
Sample request
http(s)://[Endpoint]/? Action=ModifyProtectionModuleStatus
&DefenseType=waf
&Domain=www.example.com
&InstanceId=waf_elasticity-cn-0xldbqtm005
&ModuleStatus=1
&<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.