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

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.

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":"1.1.1.1"},{"src":"2.2.2.2"}]

The IP addresses that you want to manage. This parameter is a JSON string. The field in the value is described as follows:

  • src: the IP address. This field is required and must be of the STRING type.
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
ExpireTime Integer No 3600

The validity period of the IP address in the whitelist. Unit: seconds. 0 indicates that the whitelist takes effect all the time.

Response parameters

Parameter Type Example Description
RequestId String C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AddAutoCcWhitelist
&InstanceId=ddoscoo-cn-mp91j1ao****
&Whitelist=[{"src":"1.1.1.1"},{"src":"2.2.2.2"}]
&<Common request parameters>

Sample success responses

XML format

<AddAutoCcWhitelistResponse>
      <RequestId>C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E</RequestId>
</AddAutoCcWhitelistResponse>

JSON format

{
    "RequestId": "C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E"
}

Error codes

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