All Products
Search
Document Center

Anti-DDoS:Use an API to create an Anti-DDoS Proxy instance

Last Updated:Dec 25, 2025

Anti-DDoS Proxy does not provide a dedicated API for instance creation. Instead, you can call the CreateInstance API, which is part of the Alibaba Cloud Transaction and Billing Management API service. This topic describes how to use this API to create an Anti-DDoS Proxy instance.

Background

The Alibaba Cloud Transaction and Billing Management API is a set of common APIs for managing Alibaba Cloud resources. You can use these APIs to query service prices, manage instances, and obtain billing information. For more information about the APIs supported by the Alibaba Cloud Transaction and Billing Management API, see API overview.

You can call the CreateInstance - Create an instance API to create an Anti-DDoS Proxy instance. For more information about how to call this API, see Request body and signature mechanism of V3.

Usage notes

  • When you call the CreateInstance API to create an Anti-DDoS Proxy instance, the payment is processed automatically. For more information about the instance fees, see Billing overview.

  • If you use an account on the international site (alibabacloud.com) to create an Anti-DDoS Proxy instance, your account must have a credit control identity. If your account does not have one, contact your business manager to request it.

Create an Anti-DDoS Proxy instance for the Chinese mainland

When you call the CreateInstance API to create an Anti-DDoS Proxy instance for the Chinese mainland, set the following API request parameters.

Note

For more information about the common request parameters required to call this API, see Signature mechanism.

Table 1. Request parameters: Create an Anti-DDoS Proxy instance for the Chinese mainland

Name

Type

Required

Example

Description

Action

String

Yes

CreateInstance

The operation to perform. Set the value to CreateInstance.

ProductCode

String

Yes

ddos

The code of the service to which the instance belongs.

Set the value to ddos, which indicates the Anti-DDoS Proxy service.

ProductType

String

Yes

ddoscoo

The type of the service to which the instance belongs.

Valid values:

  • ddoscoo: the Anti-DDoS Proxy service for the Chinese mainland on the China site (aliyun.com).

  • ddoscoo_intl: the Anti-DDoS Proxy service for the Chinese mainland on the international site (alibabacloud.com).

SubscriptionType

String

Yes

Subscription

The billing method of the instance.

Set the value to Subscription, which indicates the subscription billing method.

Period

Integer

Yes

1

The subscription duration. Unit: month.

Valid values: 1, 2, 3, 4, 5, 6, 12, and 24.

Parameter.N.Code

String

Yes

FunctionVersion

Parameter.N.Code specifies an instance parameter. Parameter.N.Value specifies the value for that item.

Set an instance configuration by specifying a Parameter.N.Code and Parameter.N.Value pair. N is the ordinal number of the parameter. For example, `Parameter.1.Code` and `Parameter.1.Value` specify the first parameter.

For more information about the configurations of an Anti-DDoS Proxy instance for the Chinese mainland, see Configurations of an Anti-DDoS Proxy instance for the Chinese mainland.

Parameter.N.Value

String

Yes

0

RenewalStatus

String

No

ManualRenewal

The renewal method of the instance. Valid values:

  • ManualRenewal (default): manual renewal.

  • AutoRenewal: auto-renewal.

RenewPeriod

Integer

No

1

The auto-renewal cycle. Unit: month.

Note

This parameter is required only when RenewalStatus is set to AutoRenewal.

ClientToken

String

No

123e4567-e89b-12d3-a456-42665544****

A client token to ensure the idempotence of the request. Generate a unique token for each request. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

Note

If you do not set this parameter, the system automatically uses the RequestId of the API request as the ClientToken.

When you create an Anti-DDoS Proxy instance for the Chinese mainland, use the Parameter.N.Code and Parameter.N.Value pairs to specify the instance configurations described in the following table.

Table 2. Configurations of an Anti-DDoS Proxy instance for the Chinese mainland

Parameter (Code)

Type

Example (Value)

Description

AddressType

String

Ipv4

The protocol type of the IP address. Valid values:

  • IPv4: Specifies the IPv4 protocol.

  • Ipv6: IPv6.

Edition

String

coop

The protection plan type. Set the value to coop, which indicates the Professional Edition.

resourceb

String

shenzhendianxin

The protection node. Valid values:

  • Default: shenzhendianxin

  • China (Beijing): cloudbeijing

  • China (Hangzhou): cloudhangzhou

ServicePartner

String

coop-line-001

The protection line type. Set the value to coop-line-001, which indicates the default protection line.

BaseBandwidth

Float

30

The basic protection bandwidth. Unit: Gbps.

Valid values: 30, 60, 100, 300, 400, 500, 600, 800, 1000, and 1500.

Bandwidth

Float

50

The burstable protection bandwidth. Unit: Gbps.

The value of this parameter must be greater than or equal to the value of BaseBandwidth. The valid values of Bandwidth vary based on the value of BaseBandwidth. The details are as follows:

  • If BaseBandwidth is 30, valid values for Bandwidth are 30, 40, 50, 60, 70, 80, 100, 150, 200, and 300.

  • If BaseBandwidth is 60, valid values for Bandwidth are 60, 70, 80, 100, 150, 200, 300, 400, 500, and 600.

  • If BaseBandwidth is 100, valid values for Bandwidth are 100, 150, 200, 300, 400, 500, and 600.

  • If BaseBandwidth is 300, valid values for Bandwidth are 300, 400, 500, 600, 800, 1000, and 1500.

  • If BaseBandwidth is 400, valid values for Bandwidth are 400, 500, 600, 800, 1000, and 1500.

  • If BaseBandwidth is 500, valid values for Bandwidth are 500, 600, 800, 1000, and 1500.

  • If BaseBandwidth is 600, valid values for Bandwidth are 600, 800, 1000, and 1500.

  • If BaseBandwidth is 800, valid values for Bandwidth are 800, 1000, and 1500.

  • If BaseBandwidth is 1000, valid values for Bandwidth are 1000 and 1500.

  • If BaseBandwidth is 1500, the valid value for Bandwidth is 1500.

ServiceBandwidth

Float

100

The clean bandwidth. Unit: Mbps.

The value must be a multiple of 50 in the range of 100 to 20,000.

95BurstBandwidthMode

String

1

The metering method for the 95th Percentile Burstable Clean Bandwidth. Valid values:

  • 0: Burstable clean bandwidth is disabled.

  • 1: The 95th percentile burstable clean bandwidth is enabled. The daily 95th percentile metering method is used.

  • 2: The 95th percentile burstable clean bandwidth is enabled. The monthly 95th percentile metering method is used.

NormalQps

Float

3000

Normal queries per second (QPS) for clean traffic.

The value must be a multiple of 100 in the range of 3,000 to 100,000.

95_burst_qps_mode

String

0

The 95th percentile burstable QPS pattern. Valid values:

  • 0: The burstable QPS is disabled.

  • 1: The burstable QPS is enabled. The daily 95th percentile metering method is used.

  • 2: The burstable QPS is enabled. The monthly 95th percentile metering method is used.

FunctionVersion

String

0

The function plan type. Valid values:

  • A value of 0 represents the standard function plan.

  • 1: Enhanced function plan.

DomainCount

Float

50

The number of protected domain names.

The value must be a multiple of 10 in the range of 50 to 2,000.

PortCount

Float

50

The number of protected ports.

The value 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

When you call the CreateInstance API to create an Anti-DDoS Proxy instance for a region outside the Chinese mainland, set the following API request parameters.

Note

For more information about the common request parameters required to call this API, see Signature mechanism.

Table 3. Request parameters: Create an Anti-DDoS Proxy instance for a region outside the Chinese mainland

Name

Type

Required

Example

Description

Action

String

Yes

CreateInstance

The operation to perform. Set the value to CreateInstance.

ProductCode

String

Yes

ddos

The code of the service to which the instance belongs.

Set the value to ddos, which indicates the Anti-DDoS Proxy service.

ProductType

String

Yes

ddosDip

The type of the service to which the instance belongs.

Set the value to ddosDip, which indicates the Anti-DDoS Proxy service for regions outside the Chinese mainland.

SubscriptionType

String

Yes

Subscription

The billing method of the instance.

Set the value to Subscription, which indicates the subscription billing method.

Period

Integer

Yes

3

The subscription duration. Unit: month.

Valid values: 1, 2, 3, 4, 5, 6, 12, and 24.

Parameter.N.Code

String

Yes

FunctionVersion

Parameter.N.Code specifies an instance parameter. Parameter.N.Value specifies the value for that item.

Set an instance configuration by specifying a Parameter.N.Code and Parameter.N.Value pair. N is the ordinal number of the parameter. For example, `Parameter.1.Code` and `Parameter.1.Value` specify the first parameter.

For more information about the configurations of an Anti-DDoS Proxy instance for a region outside the Chinese mainland, see Configurations of an Anti-DDoS Proxy instance for a region outside the Chinese mainland.

Parameter.N.Value

String

Yes

0

RenewalStatus

String

No

ManualRenewal

The renewal method of the instance. Valid values:

  • ManualRenewal (default): manual renewal.

  • AutoRenewal: auto-renewal.

RenewPeriod

Integer

No

1

The auto-renewal cycle. Unit: month.

Note

This parameter is required only when RenewalStatus is set to AutoRenewal.

ClientToken

String

No

123e4567-e89b-12d3-a456-42665544****

A client token to ensure the idempotence of the request. Generate a unique token for each request. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

Note

If you do not set this parameter, the system automatically uses the RequestId of the API request as the ClientToken.

When you create an Anti-DDoS Proxy instance for a region outside the Chinese mainland, use the Parameter.N.Code and Parameter.N.Value pairs to specify the instance configurations described in the following table.

Table 4. Configurations of an Anti-DDoS Proxy instance for a region outside the Chinese mainland

Parameter (Code)

Type

Example (Value)

Description

Region

String

ap-southeast-1

The service region. Set the value to ap-southeast-1, which indicates a region outside the Chinese mainland.

ProductPlan

String

0

The instance type. Valid values:

  • 0: Insurance mitigation plan.

  • 1: Unlimited mitigation plan.

  • 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_spec

String

1

The number of advanced mitigation sessions. This parameter is required only when you purchase a Sec-CMA 2.0 instance, for which ProductPlan is set to 19. Valid values: 0, 1, 2, and 31 (unlimited).

NormalBandwidth

String

100

The clean bandwidth. Unit: Mbps.

  • If ProductPlan is 0, valid values for NormalBandwidth are 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, and 5000.

  • If ProductPlan is 1, valid values for NormalBandwidth are 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, and 5000.

  • If ProductPlan is 2, valid values for NormalBandwidth are 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, and 1000.

  • If ProductPlan is 3, valid values for NormalBandwidth are 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 250, 300, 400, and 500.

  • If ProductPlan is 12, 13, or 19, valid values for NormalBandwidth are 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000, and 1500.

95BurstBandwidthMode

String

1

The metering method for the 95th Percentile Burstable Clean Bandwidth. Valid values:

  • 0: Burstable clean bandwidth is disabled.

  • 1: The 95th percentile burstable clean bandwidth is enabled. The daily 95th percentile metering method is used.

  • 2: The 95th percentile burstable clean bandwidth is enabled. The monthly 95th percentile metering method is used.

NormalQps

Float

500

Clean queries per second (QPS).

  • If ProductPlan is 0, the value must be a multiple of 100 in the range of 500 to 150,000.

  • If ProductPlan is 1, the value must be a multiple of 100 in the range of 1,000 to 150,000.

  • This parameter is not required if ProductPlan is 2.

  • If ProductPlan is 3, the value must be a multiple of 100 in the range of 500 to 100,000.

  • If ProductPlan is 12, 13, or 19, the value must be a multiple of 100 in the range of 500 to 150,000.

95_burst_qps_mode

String

0

The 95th percentile burstable QPS pattern. Valid values:

  • 0: The burstable QPS is disabled.

  • 1: The burstable QPS is enabled. The daily 95th percentile metering method is used.

  • 2: The burstable QPS is enabled. The monthly 95th percentile metering method is used.

Note

This parameter is not required if you set ProductPlan to 2 to create an CMA instance.

FunctionVersion

String

0

The function plan type. Valid values:

  • A value of 0 indicates the standard function plan.

  • 1: Enhanced function plan.

Note

This parameter is not required if you set ProductPlan to 2 to create an CMA instance.

DomainCount

Float

10

The number of protected domain names.

  • If ProductPlan is 0, 1, 3, 12, 13, or 19, the value must be a multiple of 10 in the range of 10 to 2,000.

  • DomainCount is not required if you set ProductPlan to 2.

PortCount

Float

5

The number of protected ports.

  • If ProductPlan is 0, 1, 3, 12, 13, or 19, the value must be a multiple of 5 in the range of 5 to 1,500.

  • PortCount is not required if you set ProductPlan to 2.

Response data

Name

Type

Example

Description

Code

String

Success

The HTTP status code.

Data

Struct

The returned data.

InstanceId

String

ddoscoo-cn-zvp28101****

The ID of the created instance.

OrderId

String

20951253014****

The ID of the generated order.

Message

String

Successful!

The response message.

RequestId

String

B03994C3-2A94-45FA-A44D-19E7BC39DC6D

The ID of the request.

Success

Boolean

true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request 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>
    • 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 Anti-DDoS Proxy instance (Insurance) 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>
    • 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 an CMA plan of Anti-DDoS Proxy 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>

    Example of a normal response

    • 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>
    • 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

  • For more information about the Alibaba Cloud Transaction and Billing Management API, see API overview.

  • For more information about credit control, see Credit Control.