Configures protection against HTTP flood attacks by using an IP blacklist and an IP whitelist for an accelerated domain name.

Before you call this operation, take note of the following rules:
  • You can set an IP blacklist and an IP whitelist.
  • CIDR blocks can be added to an IP blacklist. For example, in the CIDR block 127.0.0.1/24, 24 indicates that the first 24 bits are network bits. The remaining 8 bits are host bits. The subnet can accommodate 254 hosts. Therefore, 127.0.0.1/24 represents an IP range from 127.0.0.1 to 127.0.0.255.

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 SetCcConfig

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

DomainName String Yes example.com

The accelerated domain names. You can specify multiple domain names and separate them with commas (,).

AllowIps String No 10.0.0.1xxx

The IP whitelist. IP addresses in the IP whitelist are allowed to access the accelerated domain name.

BlockIps String No 192.168.0.1xxx

The IP blacklist. IP addresses in the IP blacklist are not allowed to access the accelerated domain name.

Response parameters

Parameter Type Example Description
RequestId String 4C8BC316-91DA-4E99-93B1-65C311BFFB75

The ID of the request.

Examples

Sample requests

http://cdn.aliyuncs.com/?Action=SetCcConfig
&DomainName=example.com
&AllowIps=10.0.0.1xxx
&BlockIps=192.168.0.1xxx
&<Common request parameters>

Sample success responses

XML format

<SetCcConfigResponse>
      <RequestId>AED00EC1-32A8-4D48-BEB9-BD782AF3C6BD</RequestId>
</SetCcConfigResponse>

JSON format

{
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}

Error codes

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