Queries the status of each protection policy for websites.

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 the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeWebCcProtectSwitch

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

Domains.N RepeatList Yes www.aliyun.com

The domain name of website N.

Note A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query all domain names.
RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: mainland China, which indicates an Anti-DDoS Pro instance
  • ap-southeast-1: outside mainland China, which indicates an Anti-DDoS Premium instance
ResourceGroupId String No default

The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group.

Response parameters

Parameter Type Example Description
ProtectSwitchList Array

The status of each protection policy for a website.

AiMode String defense

The mode of the Intelligent Protection policy. Valid values:

  • watch: the Warning mode
  • defense: the Defense mode
AiRuleEnable Integer 1

The status of the Intelligent Protection policy. Valid values:

  • 0: The policy is disabled.
  • 1: The policy is enabled.
AiTemplate String level60

The level of the Intelligent Protection policy. Valid values:

  • level30: the Low level
  • level60: the Normal level
  • level90: the Strict level
BlackWhiteListEnable Integer 1

The status of the Black Lists and White Lists (Domain Names) policy. Valid values:

  • 0: The policy is disabled.
  • 1: The policy is enabled.
CcCustomRuleEnable Integer 0

The status of the Custom Rule switch for the Frequency Control policy. Valid values:

  • 0: The switch is turned off.
  • 1: The switch is turned on.
CcEnable Integer 1

The status of the Frequency Control policy. Valid values:

  • 0: The policy is disabled.
  • 1: The policy is enabled.
CcTemplate String default

The mode of the Frequency Control policy. Valid values:

  • default: the Normal mode
  • gf_under_attack: the Emergency mode
  • gf_sos_verify: the Strict mode
  • gf_sos_enhance: the Super Strict mode
Domain String www.aliyun.com

The domain name of the website.

PreciseRuleEnable Integer 0

The status of the Accurate Access Control policy. Valid values:

  • 0: The policy is disabled.
  • 1: The policy is enabled.
RegionBlockEnable Integer 0

The status of the Blocked Regions (Domain Names) policy. Valid values:

  • 0: The policy is disabled.
  • 1: The policy is enabled.
RequestId String 3ADD9EED-CA4B-488C-BC82-01B0B899363D

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeWebCcProtectSwitch
&Domains.1=www.aliyun.com
&<Common request parameters>

Sample success responses

XML format

<DescribeWebCcProtectSwitchResponse>
      <RequestId>3ADD9EED-CA4B-488C-BC82-01B0B899363D</RequestId>
      <ProtectSwitchList>
            <CcEnable>1</CcEnable>
            <BlackWhiteListEnable>1</BlackWhiteListEnable>
            <AiRuleEnable>1</AiRuleEnable>
            <CcCustomRuleEnable>0</CcCustomRuleEnable>
            <PreciseRuleEnable>0</PreciseRuleEnable>
            <Domain>www.aliyun.com</Domain>
            <AiMode>defense</AiMode>
            <RegionBlockEnable>0</RegionBlockEnable>
            <CcTemplate>default</CcTemplate>
            <AiTemplate>level60</AiTemplate>
      </ProtectSwitchList>
</DescribeWebCcProtectSwitchResponse>

JSON format

{
    "RequestId": "3ADD9EED-CA4B-488C-BC82-01B0B899363D",
    "ProtectSwitchList": [
        {
            "CcEnable": 1,
            "BlackWhiteListEnable": 1,
            "AiRuleEnable": 1,
            "CcCustomRuleEnable": 0,
            "PreciseRuleEnable": 0,
            "Domain": "www.aliyun.com",
            "AiMode": "defense",
            "RegionBlockEnable": 0,
            "CcTemplate": "default",
            "AiTemplate": "level60"
        }
    ]
}

Error codes

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