You can call this operation to query the protection mode of a specific protection module, such as web application protection, HTTP flood protection, and the big data deep learning engine.

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.


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

Request parameters

Parameter Type Required Example Description 
Action Boolean No DescribeProtectionModuleMode

The operation that you want to perform. Set the value to DescribeProtectionModuleMode.

DefenseType String No waf

The protection module. Valid values:

  • waf: the RegEx protection engine
  • dld: the big data deep learning engine
  • cc: HTTP flood protection
  • antifraud: data risk control
  • normalized: positive security model
Domain String No

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.
ResourceGroupId String Yes rg-atstuj3rtoptyui

The ID of the resource group to which the queried domain belongs in Resource Management. By default, no value is specified, indicating that the domain 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 depending on the value of the DefenseType parameter.
  • The RegEx protection engine (DefenseType is set to waf)
    • 0: prevention mode
    • 1: detection mode
  • The big data deep learning engine (DefenseType is set to dld)
    • 0: detection mode
    • 1: prevention mode
  • HTTP flood protection (DefenseType is set to cc)
    • 0: prevention mode
    • 1: protection-emergency mode
  • Data risk control (DefenseType is set to antifraud)
    • 0: detection mode
    • 1: prevention mode
    • 2: strict interception mode
  • Positive security model (DefenseType is set to normalized)
    • 0: detection mode
    • 1: prevention mode
RequestId String D7861F61-5B61-46CE-A47C-6B19160D5EB0

The ID of the request.


Sample request

http(s)://[Endpoint]/? Action=DescribeProtectionModuleMode
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes.

For a list of error codes, visit the API Error Center.