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.
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
FunctionVersion | String | 0 | The function plan type. Valid values:
|
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.
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:
|
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:
|
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.
|
95BurstBandwidthMode | String | 1 | The metering method for the 95th Percentile Burstable Clean Bandwidth. Valid values:
|
NormalQps | Float | 500 | Clean queries per second (QPS).
|
95_burst_qps_mode | String | 0 | The 95th percentile burstable QPS pattern. Valid values:
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:
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.
|
PortCount | Float | 5 | The number of protected ports.
|
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:
|
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
XMLformatHTTP/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>JSONformatHTTP/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
XMLformatHTTP/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>JSONformatHTTP/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
XMLformatHTTP/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>JSONformatHTTP/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.