You can call this operation to configure HTTP flood protection and set the IP blacklist and IP whitelist for a CDN domain.

Note
  • You can set both the IP blacklist and 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 name of the CDN domain to configure the HTTP flood protection feature.

AllowIps String No 10.0.0.1%2F24%2C127.0.0.1%2F24

The HTTP flood protection IP whitelist. IP addresses in this whitelist are allowed to access the CDN domain.

BlockIps String No 192.168.0.1%2F24

The HTTP flood protection IP blacklist. IP addresses in this IP blacklist are blocked from accessing the CDN domain.

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
&Enable=On
&AllowIps=10.0.0.1%2F24%2C127.0.0.1%2F24
&BlockIps=192.168.0.1%2F24
&<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 more information about error codes, visit API Error Center.