Anti-DDoS Pro and Anti-DDoS Premium do not provide the API operation to create Anti-DDoS Pro and Anti-DDoS Premium instances. To create an Anti-DDoS Pro or Anti-DDoS Premium instance, you can call the CreateInstance operation provided by the transactions and bills management API, which is also called BSS API for short.
Background information
The BSS API provides a set of common operations to manage Alibaba Cloud resources. You can call the operations to query service prices, manage instances, and 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 Anti-DDoS Pro or Anti-DDoS Premium instance. For more information about how to call the operation, see Request Structure.
The following sections describe how to call the CreateInstance operation to create Anti-DDoS Pro and Anti-DDoS Premium instances and provide examples.
Create an Anti-DDoS Pro 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 indicates Anti-DDoS Pro and Anti-DDoS Premium. |
ProductType | String | Yes | ddoscoo | The service type of the instance.
Set the value to ddoscoo, which indicates Anti-DDoS Pro. |
SubscriptionType | String | Yes | Subscription | The billing method of the instance.
Set the value to Subscription. |
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 indicates the serial number of a configuration item. For example, the Parameter.1.Code and Parameter.1.Value pair indicates the configuration for the first item. For more information, see Configurations of an Anti-DDoS Pro instance. |
Parameter.N.Value | String | Yes | 0 | |
RenewalStatus | String | No | ManualRenewal | The method that is used to renew the instance. Valid values:
|
RenewPeriod | Integer | No | 1 | The auto-renewal period. Unit: months.
Notice 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 value, but you must ensure that it is unique among different
requests. 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 specify this parameter, the system automatically uses the request ID
as the client token.
|
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:
|
NormalQps | Float | 3000 | The queries per second (QPS) of normal services.
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.
|
ServicePartner | String | coop-line-001 | The type of the protection line. Set the value to coop-line-001, which indicates the default protection line. |
Create an Anti-DDoS Premium instance
When you call the CreateInstance operation to create an Anti-DDoS Premium instance, you must configure the request parameters based on the following table.
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 indicates Anti-DDoS Pro and Anti-DDoS Premium. |
ProductType | String | Yes | ddosDip | The service type of the instance.
Set the value to ddosDip, which indicates Anti-DDoS Premium. |
SubscriptionType | String | Yes | Subscription | The billing method of the instance.
Set the value to Subscription. |
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 an 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 indicates the serial number of a configuration item. For example, the Parameter.1.Code and Parameter.1.Value pair indicates the configuration for the first item. For more information, see Configurations of an Anti-DDoS Premium instance. |
Parameter.N.Value | String | Yes | 0 | |
RenewalStatus | String | No | ManualRenewal | The method that is used to renew the instance. Valid values:
|
RenewPeriod | Integer | No | 1 | The auto-renewal period. 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 value, but you must ensure that it is unique among different
requests. 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 specify this parameter, the system automatically uses the request ID
as the client token.
|
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 mainland China. |
ProductPlan | String | 0 | The mitigation plan of the instance. Valid values:
|
FunctionVersion | Strinig | 0 | The function plan of the instance. Valid values:
Note If you set ProductPlan to 2, you do not need to specify this parameter.
|
NormalQps | Float | 500 | The QPS of normal services.
The value of NormalQps varies based on the value of ProductPlan.
|
NormalBandwidth | String | 100 | The clean bandwidth provided by the instance. Unit: Mbit/s.
The value of NormalBandwidth varies based on the value of ProductPlan.
|
PortCount | Float | 5 | The number of ports that you want to protect.
The value of PortCount varies based on the value of ProductPlan.
|
DomainCount | Float | 10 | The number of domain names that you want to protect.
The value of DomainCount varies based on the value of ProductPlan.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | Success | The returned HTTP status code. |
Data | Struct | The returned data. | |
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 response message. |
RequestId | String | B03994C3-2A94-45FA-A44D-19E7BC39DC6D | The ID of the request. |
Success | Boolean | true | Indicates whether the request is successful. Valid values:
|
Examples
- Example 1: Create an Anti-DDoS Pro 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' &<Common request parameters>
Sample success responsesXML
formatHTTP/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
formatHTTP/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 Premium instance with 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 &<Common request parameters>
Sample success responsesXML
formatHTTP/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
formatHTTP/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 Premium instance with the MCA 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 &<Common request parameters>
Sample success responsesXML
formatHTTP/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
formatHTTP/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 }