Adds IP addresses to the whitelist of an Anti-DDoS Pro or Anti-DDoS Premium instance.

Usage notes

You can call the AddAutoCcWhitelist operation to add IP addresses to the whitelist of an Anti-DDoS Pro or Anti-DDoS Premium instance. This way, the Anti-DDoS Pro or Anti-DDoS Premium instance allows traffic from the IP addresses.

By default, the traffic from the IP addresses that you add to the whitelist is always allowed. If you no longer use the whitelist, you can call the EmptyAutoCcWhitelist operation to remove the IP addresses from the whitelist.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

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 AddAutoCcWhitelist

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

RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: the Chinese mainland, which indicates Anti-DDoS Pro instances
  • ap-southeast-1: outside the Chinese mainland, which indicates Anti-DDoS Premium instances
InstanceId String Yes ddoscoo-cn-mp91j1ao****

The ID of the instance.

Note You can call the DescribeInstanceIds operation to query the IDs of all instances.
Whitelist String Yes [{"src":"192.XX.XX.1"},{"src":"192.XX.XX.2"}]

The configuration of the IP addresses that you want to add to the whitelist. The value is a string that consists of JSON arrays. Each element in a JSON array is a JSON struct that contains the following fields:

  • src: the IP address that you want to add. This parameter is required. Data type: string.
ExpireTime Integer No 0

This parameter is deprecated.

Note This parameter indicates the validity period of the IP address blacklist. By default, the traffic from the IP addresses that you add to the whitelist is always allowed. You do not need to set this parameter.

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
RequestId String AB5025DA-5C52-5207-B6AC-3F198758B678

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AddAutoCcWhitelist
&InstanceId=ddoscoo-cn-mp91j1ao****
&Whitelist=[{"src":"192.XX.XX.1"},{"src":"192.XX.XX.2"}]
&ExpireTime=0
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<AddAutoCcWhitelistResponse>
    <RequestId>AB5025DA-5C52-5207-B6AC-3F198758B678</RequestId>
</AddAutoCcWhitelistResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "AB5025DA-5C52-5207-B6AC-3F198758B678"
}

Error codes

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