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
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateInstance | The operation to perform. Set the value to CreateInstance. |
| ProductCode | String | Yes | ddos | The product code. Set the value to ddos. |
| ProductType | String | Yes | ddoscoo | The product type. Valid values: ddoscoo (China site, aliyun.com), ddoscoo_intl (international site, alibabacloud.com). |
| SubscriptionType | String | Yes | Subscription | The billing method. Set the value to Subscription. |
| Period | Integer | Yes | 1 | The subscription duration, in months. Valid values: 1, 2, 3, 4, 5, 6, 12, and 24. |
| Parameter.N.Code | String | Yes | FunctionVersion | An 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.Value | String | Yes | 0 | The value for the configuration key specified in Parameter.N.Code. |
| RenewalStatus | String | No | ManualRenewal | The renewal method. Valid values: ManualRenewal (default), AutoRenewal. |
| RenewPeriod | Integer | No | 1 | The auto-renewal cycle, in months. Required only when RenewalStatus is set to AutoRenewal. |
| ClientToken | String | No | 123e4567-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) | Type | Example (Value) | Description |
|---|---|---|---|
| AddressType | String | Ipv4 | The IP address protocol. Valid values: IPv4, Ipv6. |
| Edition | String | coop | The protection plan. Set the value to coop (Professional Edition). |
| resourceb | String | shenzhendianxin | The protection node. Valid values: shenzhendianxin (default), cloudbeijing (China (Beijing)), cloudhangzhou (China (Hangzhou)). |
| ServicePartner | String | coop-line-001 | The protection line. Set the value to coop-line-001 (default protection line). |
| BaseBandwidth | Float | 30 | The basic protection bandwidth, in Gbps. Valid values: 30, 60, 100, 300, 400, 500, 600, 800, 1000, and 1500. |
| Bandwidth | Float | 50 | The 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. |
| ServiceBandwidth | Float | 100 | The clean bandwidth, in Mbps. 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 (disabled), 1 (daily 95th percentile), 2 (monthly 95th percentile). |
| NormalQps | Float | 3000 | The clean queries per second (QPS). 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 metering method. Valid values: 0 (disabled), 1 (daily 95th percentile), 2 (monthly 95th percentile). |
| FunctionVersion | String | 0 | The function plan. Valid values: 0 (Standard function plan), 1 (Enhanced function plan). |
| DomainCount | Float | 50 | The number of protected domain names. Must be a multiple of 10 in the range of 50 to 2,000. |
| PortCount | Float | 50 | The 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
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateInstance | The operation to perform. Set the value to CreateInstance. |
| ProductCode | String | Yes | ddos | The product code. Set the value to ddos. |
| ProductType | String | Yes | ddosDip | The product type. Set the value to ddosDip, which indicates Anti-DDoS Proxy for regions outside the Chinese mainland. |
| SubscriptionType | String | Yes | Subscription | The billing method. Set the value to Subscription. |
| Period | Integer | Yes | 3 | The subscription duration, in months. Valid values: 1, 2, 3, 4, 5, 6, 12, and 24. |
| Parameter.N.Code | String | Yes | FunctionVersion | An 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.Value | String | Yes | 0 | The value for the configuration key specified in Parameter.N.Code. |
| RenewalStatus | String | No | ManualRenewal | The renewal method. Valid values: ManualRenewal (default), AutoRenewal. |
| RenewPeriod | Integer | No | 1 | The auto-renewal cycle, in months. Required only when RenewalStatus is set to AutoRenewal. |
| ClientToken | String | No | 123e4567-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) | Type | Example (Value) | Description |
|---|---|---|---|
| Region | String | ap-southeast-1 | The service region. Set the value to ap-southeast-1. |
| ProductPlan | String | 0 | The 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_spec | String | 1 | The number of advanced mitigation sessions. Required only when ProductPlan is 19 (Sec-CMA 2.0). Valid values: 0, 1, 2, 31 (unlimited). |
| NormalBandwidth | String | 100 | The 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. |
| 95BurstBandwidthMode | String | 1 | The metering method for the 95th percentile burstable clean bandwidth. Valid values: 0 (disabled), 1 (daily 95th percentile), 2 (monthly 95th percentile). |
| NormalQps | Float | 500 | The 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_mode | String | 0 | The 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). |
| FunctionVersion | String | 0 | The function plan. Valid values: 0 (Standard function plan), 1 (Enhanced function plan). Not required when ProductPlan is 2 (CMA). |
| DomainCount | Float | 10 | The 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. |
| PortCount | Float | 5 | The 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
| 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 request ID. |
| Success | Boolean | true | Indicates 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
Alibaba Cloud Transaction and Billing Management API overview: API overview
Credit control: Credit Control