All Products
Search
Document Center

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

Last Updated:Dec 25, 2024

Anti-DDoS Proxy (Chinese Mainland) and Anti-DDoS Proxy (Outside Chinese Mainland) do not provide the API operation to create instances. To create an instance, you can call the CreateInstance operation provided by the transactions and bills management API, which is also called BSS API for short. This topic describes how to call the BSS API to create an instance.

Background information

The BSS API is a set of common operations used to manage Alibaba Cloud resources. For example, you can call the operations to query service prices, manage instances, or obtain bills. For more information about the operations of the BSS API, see API Overview.

You can call the CreateInstance operation provided by the BSS API to create an instance. For more information about how to call the operation, see Request syntax and signature method V3.

Usage notes

  • After you call the CreateInstance operation to create an instance, fees for the instance are automatically deducted from your account balance. For more information about the billing, see Billing.

  • If you use an account that is created on the International site (alibabacloud.com) to create an instance, a credit control identity must be applied for the account. If you do not apply for a credit control identity for the account, contact your account manager to apply for a credit control identity.

Create an Anti-DDoS Proxy (Chinese Mainland) instance

When you call the CreateInstance operation to create an Anti-DDoS Proxy (Chinese Mainland) instance, you must configure the request parameters based on the following table.

Note

For more information about the common request parameters, see Request syntax and signature method V2 for RPC APIs.

Table 1. Request parameters used to create an Anti-DDoS Proxy (Chinese Mainland) instance

Parameter

Type

Required

Example

Description

Action

String

Yes

CreateInstance

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

ProductCode

String

Yes

ddos

The service code of the instance.

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

ProductType

String

Yes

ddoscoo

The service type of the instance.

Valid values:

  • ddoscoo, which specifies Anti-DDoS Proxy (Chinese Mainland) on the China site (aliyun.com).

  • ddoscoo_intl, which specifies Anti-DDoS Proxy (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 of the instance. Unit: months.

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

Parameter.N.Code

String

Yes

FunctionVersion

The Parameter.N.Code parameter specifies configuration item N of the instance. The Parameter.N.Value parameter specifies the value of configuration item N.

You can specify Parameter.N.Code and Parameter.N.Value pairs to configure items. N specifies the serial number of a configuration item. For example, Parameter.1.Code and Parameter.1.Value pair specify the first configuration item and its value.

For more information, see Configurations of an Anti-DDoS Proxy (Chinese Mainland) instance.

Parameter.N.Value

String

Yes

0

RenewalStatus

String

No

ManualRenewal

The method that is used to renew the instance. Valid values:

  • ManualRenewal (default)

  • AutoRenewal

RenewPeriod

Integer

No

1

The auto-renewal period of the instance. Unit: months.

Note

If you set RenewalStatus to AutoRenewal, you must specify this parameter.

ClientToken

String

No

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

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How do I ensure the idempotence?

Note

If you do not specify this parameter, the system automatically uses the request ID as the client token.

When you create an Anti-DDoS Proxy (Chinese Mainland) instance, you must specify Parameter.N.Code and Parameter.N.Value pairs to complete the configurations based on the following table.

Table 2. Configurations of an Anti-DDoS Proxy (Chinese Mainland) instance

Configuration item (Code)

Type

Example (Value)

Description

Edition

String

coop

The mitigation plan of the instance. Set the value to coop, which indicates the Profession mitigation plan.

FunctionVersion

String

0

The function plan of the instance. Valid values:

  • 0: the Standard function plan

  • 1: the Enhanced function plan

NormalQps

Float

3000

The clean queries per second (QPS) provided by the instance.

Valid values: 3000 to 100000. The value must be a multiple of 100.

PortCount

Float

50

The number of ports that you want to protect.

Valid values: 50 to 400. The value must be a multiple of 5.

DomainCount

Float

50

The number of domain names that you want to protect.

Valid values: 50 to 2000. The value must be a multiple of 10.

ServiceBandwidth

Float

100

The clean bandwidth provided by the instance. Unit: Mbit/s.

Valid values: 100 to 5000. The value must be a multiple of 50.

BaseBandwidth

Float

30

The basic protection bandwidth. Unit: Gbit/s.

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

Bandwidth

Float

50

The burstable protection bandwidth. Unit: Gbit/s.

The burstable protection bandwidth must be greater than or equal to the basic protection bandwidth. The value of Bandwidth varies based on the value of BaseBandwidth.

  • If you set BaseBandwidth to 30, you can set Bandwidth to 30, 40, 50, 60, 70, 80, 100, 150, 200, or 300.

  • If you set BaseBandwidth to 60, you can set Bandwidth to 60, 70, 80, 100, 150, 200, 300, 400, 500, or 600.

  • If you set BaseBandwidth to 100, you can set Bandwidth to 100, 150, 200, 300, 400, 500, or 600.

  • If you set BaseBandwidth to 300, you can set Bandwidth to 300, 400, 500, or 600.

  • If you set BaseBandwidth to 400, you can set Bandwidth to 400, 500, or 600.

  • If you set BaseBandwidth to 500, you can set Bandwidth to 500 or 600.

  • If you set BaseBandwidth to 600, you can set Bandwidth only to 600.

ServicePartner

String

coop-line-001

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

95BurstBandwidthMode

String

1

The metering method of the 95th percentile burstable clean bandwidth. Valid values:

  • 0: disables the burstable clean bandwidth feature.

  • 1: enables the burstable clean bandwidth feature and uses the daily 95th percentile metering method.

  • 2: enables the burstable clean bandwidth feature and uses the monthly 95th percentile metering method.

AddressType

String

Ipv4

The IP version of the IP address. Valid values:

  • Ipv4

  • Ipv6

Create an Anti-DDoS Proxy (Outside Chinese Mainland) instance

When you call the CreateInstance operation to create an Anti-DDoS Proxy (Outside Chinese Mainland) instance, you must configure the request parameters based on the following table.

Note

For more information about the common request parameters, see Request syntax and signature method V2 for RPC APIs.

Table 3. Request parameters used to create an Anti-DDoS Proxy (Outside Chinese Mainland) instance

Parameter

Type

Required

Example

Description

Action

String

Yes

CreateInstance

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

ProductCode

String

Yes

ddos

The service code of the instance.

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

ProductType

String

Yes

ddosDip

The service type of the instance.

Set the value to ddosDip, which indicates Anti-DDoS Proxy (Outside 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 of the instance. Unit: months.

Valid values: 3, 6, 12, and 24.

Parameter.N.Code

String

Yes

FunctionVersion

The Parameter.N.Code parameter specifies configuration item N of the instance. The Parameter.N.Value parameter specifies the value of configuration item N.

You can specify Parameter.N.Code and Parameter.N.Value pairs to configure items. N specifies the serial number of a configuration item. For example, Parameter.1.Code and Parameter.1.Value pair specify the first configuration item and its value.

For more information, see Configurations of an Anti-DDoS Proxy (Outside Chinese Mainland) instance.

Parameter.N.Value

String

Yes

0

RenewalStatus

String

No

ManualRenewal

The method that is used to renew the instance. Valid values:

  • ManualRenewal (default)

  • AutoRenewal

RenewPeriod

Integer

No

1

The auto-renewal period of the instance. Unit: months.

Note

If you set RenewalStatus to AutoRenewal, you must specify this parameter.

ClientToken

String

No

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

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How do I ensure the idempotence?

Note

If you do not specify this parameter, the system automatically uses the request ID as the client token.

When you create an Anti-DDoS Proxy (Outside Chinese Mainland) instance, you must specify Parameter.N.Code and Parameter.N.Value pairs to complete the configurations based on the following table.

Table 4. Configurations of an Anti-DDoS Proxy (Outside Chinese Mainland) instance

Configuration item (Code)

Type

Example (Value)

Description

Region

String

ap-southeast-1

The region ID of the instance. Set the value to ap-southeast-1, which indicates outside the Chinese mainland.

ProductPlan

String

0

The mitigation plan of the instance. Valid values:

  • 0: the Insurance mitigation plan

  • 1: the Unlimited mitigation plan

  • 2: the Chinese Mainland Acceleration (CMA) mitigation plan

  • 3: the Secure Chinese Mainland Acceleration (Sec-CMA) mitigation plan

FunctionVersion

Strinig

0

The function plan of the instance. Valid values:

  • 0: the Standard function plan

  • 1: the Enhanced function plan

Note

If you set ProductPlan to 2, you do not need to specify this parameter.

NormalQps

Float

500

The clean QPS provided by the instance.

The value of NormalQps varies based on the value of ProductPlan.

  • If you set ProductPlan to 0, you can set NormalQps to a value that ranges from 500 to 100000. The value must be a multiple of 100.

  • If you set ProductPlan to 1, you can set NormalQps to a value that ranges from 1000 to 100000. The value must be a multiple of 100.

  • If you set ProductPlan to 2, you do not need to specify this parameter.

  • If you set ProductPlan to 3, you can set NormalQps to a value that ranges from 500 to 100000. The value must be a multiple of 100.

NormalBandwidth

String

100

The clean bandwidth provided by the instance. Unit: Mbit/s.

The value of NormalBandwidth varies based on the value of ProductPlan.

  • If you set ProductPlan to 0, you can set NormalBandwidth to 100, 150, 200, 250, or 300.

  • If you set ProductPlan to 1, you can set NormalBandwidth to 100, 150, 200, 250, or 300.

  • If you set ProductPlan to 2, you can set NormalBandwidth to 10, 20, 30, 40, 50, 60, 70, 80, 90, or 100.

  • If you set ProductPlan to 3, you can set NormalBandwidth to 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, or 200.

PortCount

Float

5

The number of ports that you want to protect.

The value of PortCount varies based on the value of ProductPlan.

  • If you set ProductPlan to 0, you can set PortCount to a value that ranges from 5 to 400. The value must be a multiple of 5.

  • If you set ProductPlan to 1, you can set PortCount to a value that ranges from 5 to 400. The value must be a multiple of 5.

  • If you set ProductPlan to 2, you do not need to specify this parameter.

  • If you set ProductPlan to 3, you can set PortCount to a value that ranges from 5 to 400. The value must be a multiple of 5.

DomainCount

Float

10

The number of domain names that you want to protect.

The value of DomainCount varies based on the value of ProductPlan.

  • If you set ProductPlan to 0, you can set DomainCount to a value that ranges from 10 to 200. The value must be a multiple of 10.

  • If you set ProductPlan to 1, you can set DomainCount to a value that ranges from 10 to 200. The value must be a multiple of 10.

  • If you set ProductPlan to 2, you do not need to specify this parameter.

  • If you set ProductPlan to 3, you can set DomainCount to a value that ranges from 10 to 200. The value must be a multiple of 10.

95BurstBandwidthMode

String

1

The metering method of the 95th percentile burstable clean bandwidth. Valid values:

  • 0: disables the burstable clean bandwidth feature.

  • 1: enables the burstable clean bandwidth feature and uses the daily 95th percentile metering method.

  • 2: enables the burstable clean bandwidth feature and uses the monthly 95th percentile metering method.

Response parameters

Parameter

Type

Example

Description

Code

String

Success

The HTTP status code.

Data

Struct

The response parameters.

InstanceId

String

ddoscoo-cn-zvp28101****

The ID of the instance that is created.

OrderId

String

20951253014****

The ID of the order.

Message

String

Successful!

The returned message.

RequestId

String

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

The request ID.

Success

Boolean

true

Indicates whether the call was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

Examples

  • Example 1: Create an Anti-DDoS Proxy (Chinese Mainland) instance

    Sample requests

    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>
    

    Sample success responses

    • 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 (Outside Chinese Mainland) instance of the Insurance mitigation plan

    Sample requests

    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>
    

    Sample success responses

    • 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 Anti-DDoS Proxy (Outside Chinese Mainland) instance of the CMA mitigation plan

    Sample requests

    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>
    

    Sample success responses

    • 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