All Products
Search
Document Center

Anti-DDoS:Create an Anti-DDoS Proxy instance by API

Last Updated:Mar 31, 2026

Anti-DDoS Proxy does not provide a dedicated API for instance creation. Instead, call the CreateInstance operation from the Alibaba Cloud Transaction and Billing Management API to provision an Anti-DDoS Proxy instance programmatically.

Background

The Alibaba Cloud Transaction and Billing Management API provides a unified set of operations for managing Alibaba Cloud resources, including querying service prices, managing instances, and retrieving billing information. For the full list of supported operations, see API overview.

To create an Anti-DDoS Proxy instance, call CreateInstance. For details on signing and structuring requests, see Request body and signature mechanism of V3.

Usage notes

  • Payment is processed automatically when the CreateInstance call succeeds. For pricing details, see Billing overview.

  • If your account is on the international site (alibabacloud.com), it must have a credit control identity. Contact your business manager if it does not.

Create an Anti-DDoS Proxy instance for the Chinese mainland

Set the following parameters when calling CreateInstance to create an Anti-DDoS Proxy instance for the Chinese mainland.

Note: For the common request parameters required to call this operation, see Signature mechanism.

Table 1. Request parameters: Chinese mainland

NameTypeRequiredExampleDescription
ActionStringYesCreateInstanceThe operation to perform. Set the value to CreateInstance.
ProductCodeStringYesddosThe product code. Set the value to ddos.
ProductTypeStringYesddoscooThe product type. Valid values: ddoscoo (China site, aliyun.com), ddoscoo_intl (international site, alibabacloud.com).
SubscriptionTypeStringYesSubscriptionThe billing method. Set the value to Subscription.
PeriodIntegerYes1The subscription duration, in months. Valid values: 1, 2, 3, 4, 5, 6, 12, and 24.
Parameter.N.CodeStringYesFunctionVersionAn instance configuration key, paired with Parameter.N.Value. For example, Parameter.1.Code and Parameter.1.Value define the first configuration pair. For valid configuration parameters, see Table 2.
Parameter.N.ValueStringYes0The value for the configuration key specified in Parameter.N.Code.
RenewalStatusStringNoManualRenewalThe renewal method. Valid values: ManualRenewal (default), AutoRenewal.
RenewPeriodIntegerNo1The auto-renewal cycle, in months. Required only when RenewalStatus is set to AutoRenewal.
ClientTokenStringNo123e4567-e89b-12d3-a456-42665544****A client token to ensure request idempotence. Generate a unique value for each request. The token can contain only ASCII characters and cannot exceed 64 characters. If omitted, the system uses the RequestId as the token. For more information, see How to ensure idempotence.

Use Parameter.N.Code and Parameter.N.Value pairs to specify the instance configuration. The following table lists the supported configuration parameters.

Table 2. Instance configuration parameters: Chinese mainland

Parameter (Code)TypeExample (Value)Description
AddressTypeStringIpv4The IP address protocol. Valid values: IPv4, Ipv6.
EditionStringcoopThe protection plan. Set the value to coop (Professional Edition).
resourcebStringshenzhendianxinThe protection node. Valid values: shenzhendianxin (default), cloudbeijing (China (Beijing)), cloudhangzhou (China (Hangzhou)).
ServicePartnerStringcoop-line-001The protection line. Set the value to coop-line-001 (default protection line).
BaseBandwidthFloat30The basic protection bandwidth, in Gbps. Valid values: 30, 60, 100, 300, 400, 500, 600, 800, 1000, and 1500.
BandwidthFloat50The burstable protection bandwidth, in Gbps. Must be greater than or equal to BaseBandwidth. Valid values per BaseBandwidth setting: 30 → 30, 40, 50, 60, 70, 80, 100, 150, 200, 300; 60 → 60, 70, 80, 100, 150, 200, 300, 400, 500, 600; 100 → 100, 150, 200, 300, 400, 500, 600; 300 → 300, 400, 500, 600, 800, 1000, 1500; 400 → 400, 500, 600, 800, 1000, 1500; 500 → 500, 600, 800, 1000, 1500; 600 → 600, 800, 1000, 1500; 800 → 800, 1000, 1500; 1000 → 1000, 1500; 1500 → 1500.
ServiceBandwidthFloat100The clean bandwidth, in Mbps. Must be a multiple of 50 in the range of 100 to 20,000.
95BurstBandwidthModeString1The metering method for the 95th percentile burstable clean bandwidth. Valid values: 0 (disabled), 1 (daily 95th percentile), 2 (monthly 95th percentile).
NormalQpsFloat3000The clean queries per second (QPS). Must be a multiple of 100 in the range of 3,000 to 100,000.
95_burst_qps_modeString0The 95th percentile burstable QPS metering method. Valid values: 0 (disabled), 1 (daily 95th percentile), 2 (monthly 95th percentile).
FunctionVersionString0The function plan. Valid values: 0 (Standard function plan), 1 (Enhanced function plan).
DomainCountFloat50The number of protected domain names. Must be a multiple of 10 in the range of 50 to 2,000.
PortCountFloat50The number of protected ports. Must be a multiple of 5 in the range of 50 to 1,500.

Create an Anti-DDoS Proxy instance for a region outside the Chinese mainland

Set the following parameters when calling CreateInstance to create an Anti-DDoS Proxy instance for a region outside the Chinese mainland.

Note: For the common request parameters required to call this operation, see Signature mechanism.

Table 3. Request parameters: Outside the Chinese mainland

NameTypeRequiredExampleDescription
ActionStringYesCreateInstanceThe operation to perform. Set the value to CreateInstance.
ProductCodeStringYesddosThe product code. Set the value to ddos.
ProductTypeStringYesddosDipThe product type. Set the value to ddosDip, which indicates Anti-DDoS Proxy for regions outside the Chinese mainland.
SubscriptionTypeStringYesSubscriptionThe billing method. Set the value to Subscription.
PeriodIntegerYes3The subscription duration, in months. Valid values: 1, 2, 3, 4, 5, 6, 12, and 24.
Parameter.N.CodeStringYesFunctionVersionAn instance configuration key, paired with Parameter.N.Value. For example, Parameter.1.Code and Parameter.1.Value define the first configuration pair. For valid configuration parameters, see Table 4.
Parameter.N.ValueStringYes0The value for the configuration key specified in Parameter.N.Code.
RenewalStatusStringNoManualRenewalThe renewal method. Valid values: ManualRenewal (default), AutoRenewal.
RenewPeriodIntegerNo1The auto-renewal cycle, in months. Required only when RenewalStatus is set to AutoRenewal.
ClientTokenStringNo123e4567-e89b-12d3-a456-42665544****A client token to ensure request idempotence. Generate a unique value for each request. The token can contain only ASCII characters and cannot exceed 64 characters. If omitted, the system uses the RequestId as the token. For more information, see How to ensure idempotence.

Use Parameter.N.Code and Parameter.N.Value pairs to specify the instance configuration. The following table lists the supported configuration parameters.

Table 4. Instance configuration parameters: Outside the Chinese mainland

Parameter (Code)TypeExample (Value)Description
RegionStringap-southeast-1The service region. Set the value to ap-southeast-1.
ProductPlanString0The instance plan. Valid values: 0 (Insurance), 1 (Unlimited), 2 (CMA), 3 (Sec-CMA 1.0), 12 (Sec-CMA 2.0 Insurance), 13 (Sec-CMA 2.0 Unlimited), 19 (Sec-CMA 2.0).
SecMitigation_specString1The number of advanced mitigation sessions. Required only when ProductPlan is 19 (Sec-CMA 2.0). Valid values: 0, 1, 2, 31 (unlimited).
NormalBandwidthString100The clean bandwidth, in Mbps. Valid values vary by ProductPlan: 0 or 1 → 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000; 2 → 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000; 3 → 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 250, 300, 400, 500; 12, 13, or 19 → 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000, 1500.
95BurstBandwidthModeString1The metering method for the 95th percentile burstable clean bandwidth. Valid values: 0 (disabled), 1 (daily 95th percentile), 2 (monthly 95th percentile).
NormalQpsFloat500The clean QPS. Valid values vary by ProductPlan: 0 → multiple of 100, 500–150,000; 1 → multiple of 100, 1,000–150,000; 2 → not required; 3 → multiple of 100, 500–100,000; 12, 13, or 19 → multiple of 100, 500–150,000.
95_burst_qps_modeString0The 95th percentile burstable QPS metering method. Valid values: 0 (disabled), 1 (daily 95th percentile), 2 (monthly 95th percentile). Not required when ProductPlan is 2 (CMA).
FunctionVersionString0The function plan. Valid values: 0 (Standard function plan), 1 (Enhanced function plan). Not required when ProductPlan is 2 (CMA).
DomainCountFloat10The number of protected domain names. Must be a multiple of 10 in the range of 10 to 2,000. Applies when ProductPlan is 0, 1, 3, 12, 13, or 19. Not required when ProductPlan is 2.
PortCountFloat5The number of protected ports. Must be a multiple of 5 in the range of 5 to 1,500. Applies when ProductPlan is 0, 1, 3, 12, 13, or 19. Not required when ProductPlan is 2.

Response data

NameTypeExampleDescription
CodeStringSuccessThe HTTP status code.
DataStructThe returned data.
InstanceIdStringddoscoo-cn-zvp28101****The ID of the created instance.
OrderIdString20951253014****The ID of the generated order.
MessageStringSuccessful!The response message.
RequestIdStringB03994C3-2A94-45FA-A44D-19E7BC39DC6DThe request ID.
SuccessBooleantrueIndicates whether the request succeeded. Valid values: true (succeeded), false (failed).

Examples

Example 1: Create an Anti-DDoS Proxy instance for the Chinese mainland

Request example:

http(s)://[Endpoint]/?Action=CreateInstance
&ProductCode=ddos
&ProductType=ddoscoo
&SubscriptionType=Subscription
&Period=1
&Parameter.1.Code=Edition
&Parameter.1.Value=coop
&Parameter.2.Code=FunctionVersion
&Parameter.2.Value=0
&Parameter.3.Code=NormalQps
&Parameter.3.Value=3000
&Parameter.4.Code=PortCount
&Parameter.4.Value=50
&Parameter.5.Code=DomainCount
&Parameter.5.Value=50
&Parameter.6.Code=ServiceBandwidth
&Parameter.6.Value=200
&Parameter.7.Code=BaseBandwidth
&Parameter.7.Value=30
&Parameter.8.Code=Bandwidth
&Parameter.8.Value=50
&Parameter.9.Code=ServicePartner
&Parameter.9.Value='coop-line-001'
&Parameter.10.Code=95BurstBandwidthMode
&Parameter.10.Value='1'
&Parameter.11.Code=AddressType
&Parameter.11.Value='Ipv4'
&<Common request parameters>

Response example — XML format:

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

<CreateInstanceResponse>
    <RequestId>B03994C3-2A94-45FA-A44D-19E7BC39DC6D</RequestId>
    <Message>Successful!</Message>
    <Data>
        <InstanceId>ddoscoo-cn-zvp28101****</InstanceId>
        <OrderId>20951253014****</OrderId>
    </Data>
    <Code>Success</Code>
    <Success>true</Success>
</CreateInstanceResponse>

Response example — JSON format:

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

{
  "RequestId": "B03994C3-2A94-45FA-A44D-19E7BC39DC6D",
  "Message": "Successful!",
  "Data": {
    "InstanceId": "ddoscoo-cn-zvp28101****",
    "OrderId": "20951253014****"
  },
  "Code": "Success",
  "Success": true
}

Example 2: Create an Insurance plan Anti-DDoS Proxy instance for a region outside the Chinese mainland

Request example:

http(s)://[Endpoint]/?Action=CreateInstance
&ProductCode=ddos
&ProductType=ddosDip
&SubscriptionType=Subscription
&Period=3
&Parameter.1.Code=Region
&Parameter.1.Value='ap-southeast-1'
&Parameter.2.Code=ProductPlan
&Parameter.2.Value=0
&Parameter.3.Code=FunctionVersion
&Parameter.3.Value=0
&Parameter.4.Code=NormalQps
&Parameter.4.Value=500
&Parameter.5.Code=NormalBandwidth
&Parameter.5.Value=100
&Parameter.6.Code=PortCount
&Parameter.6.Value=5
&Parameter.7.Code=DomainCount
&Parameter.7.Value=10
&Parameter.8.Code=95BurstBandwidthMode
&Parameter.8.Value='1'
&<Common request parameters>

Response example — XML format:

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

<CreateInstanceResponse>
    <RequestId>4DA44417-7BF7-474A-A3DC-D157EF6BD7CA</RequestId>
    <Message>Successful!</Message>
    <Data>
        <InstanceId>ddosDip-cn-i7m282j****</InstanceId>
        <OrderId>20951829465****</OrderId>
    </Data>
    <Code>Success</Code>
    <Success>true</Success>
</CreateInstanceResponse>

Response example — JSON format:

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

{
  "RequestId": "4DA44417-7BF7-474A-A3DC-D157EF6BD7CA",
  "Message": "Successful!",
  "Data": {
    "InstanceId": "ddosDip-cn-i7m282j****",
    "OrderId": "20951829465****"
  },
  "Code": "Success",
  "Success": true
}

Example 3: Create a CMA plan Anti-DDoS Proxy instance for a region outside the Chinese mainland

Request example:

http(s)://[Endpoint]/?Action=CreateInstance
&ProductCode=ddos
&ProductType=ddosDip
&SubscriptionType=Subscription
&Period=3
&Parameter.1.Code=Region
&Parameter.1.Value='ap-southeast-1'
&Parameter.2.Code=ProductPlan
&Parameter.2.Value=2
&Parameter.3.Code=NormalBandwidth
&Parameter.3.Value=10
&Parameter.4.Code=95BurstBandwidthMode
&Parameter.4.Value='1'
&<Common request parameters>

Response example — XML format:

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

<CreateInstanceResponse>
    <RequestId>4DA44417-7BF7-474A-A3DC-D157EF6BD7CA</RequestId>
    <Message>Successful!</Message>
    <Data>
        <InstanceId>ddosDip-cn-i7m282j****</InstanceId>
        <OrderId>20951829465****</OrderId>
    </Data>
    <Code>Success</Code>
    <Success>true</Success>
</CreateInstanceResponse>

Response example — JSON format:

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

{
  "RequestId": "4DA44417-7BF7-474A-A3DC-D157EF6BD7CA",
  "Message": "Successful!",
  "Data": {
    "InstanceId": "ddosDip-cn-i7m282j****",
    "OrderId": "20951829465****"
  },
  "Code": "Success",
  "Success": true
}

References