All Products
Search
Document Center

Anti-DDoS:ModifyWebAIProtectSwitch

Last Updated:Jul 11, 2024

Enables or disables the Intelligent Protection policy for a website.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupIdstringNo

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.

default
DomainstringYes

The domain name of the website.

Note A forwarding rule must be configured for a domain name. You can call the DescribeDomains operation to query all domain names.
www.aliyun.com
ConfigstringYes

The details of the Intelligent Protection policy. This parameter is a JSON string. The string contains the following fields:

  • AiRuleEnable: the status of the Intelligent Protection policy. This field is required and must be of the integer type. Valid values:

    • 0: disabled
    • 1: enabled
{"AiRuleEnable": 1}

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc

Examples

Sample success responses

JSONformat

{
  "RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc"
}

Error codes

For a list of error codes, visit the Service error codes.