Enables or disables a protection module of Web Application Firewall (WAF).
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 | ModifyProtectionModuleStatus |
The operation that you want to perform. Set the value to ModifyProtectionModuleStatus. |
DefenseType | String | Yes | waf |
The WAF protection module that you want to manage. Valid values:
You can specify only one protection module. |
Domain | String | Yes | www.example.com |
The domain name of the website. Note You must specify a domain name that is added to WAF for protection. You can call the
DescribeDomainNames operation to query the domain names that are added to WAF for protection.
|
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.
|
ModuleStatus | Integer | Yes | 1 |
Specifies whether to enable or disable the specified protection module. Valid values:
|
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=ModifyProtectionModuleStatus
&DefenseType=waf
&Domain=www.example.com
&InstanceId=waf_elasticity-cn-0xldbqt****
&ModuleStatus=1
&<Common request parameters>
Sample success responses
XML
format
<ModifyProtectionModuleStatusResponse>
<RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>
</ModifyProtectionModuleStatusResponse>
JSON
format
{
"RequestId":"D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}
Error codes
For a list of error codes, visit the API Error Center.