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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates a sample code of the operation for different SDKs.

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:

  • waf: Protection Rules Engine
  • dld: Big Data Deep Learning Engine
  • tamperproof: Website Tamper-proofing
  • dlp: Data Leakage Prevention
  • normalized: Positive Security Model
  • bot_crawler: Allowed Crawlers
  • bot_intelligence: Bot Threat Intelligence
  • antifraud: Data Risk Control
  • bot_algorithm: Intelligent Algorithm
  • bot_wxbb: App Protection
  • bot_wxbb_pkg: Version Protection for App Protection
    Note If you enable the version protection module, you must call the CreateProtectionModuleRule operation to create a version protection rule. This rule specifies the allowed versions.
  • cc: HTTP Flood Protection
  • blacklist: Blacklists
  • ac_highfrep: Blocking IPs Initiating High-frequency Web Attacks
  • ac_dirscan: Directory Traversal Prevention
  • ac_scantool: Scanning Tool Blocking
  • ac_collaborative: Collaborative Defense
  • ac_custom: Custom Protection Policy

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:

  • 0: disables the protection module
  • 1: enables the protection module

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.