Domain name for API request: antiddos.intl.tencentcloudapi.com.
This API is used to purchase Anti-DDoS packages.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateBgpInstance. |
| Version | Yes | String | Common Params. The value used for this API: 2020-03-09. |
| Region | No | String | Common Params. This parameter is not required for this API. |
| InstanceChargeType | Yes | String | Payment type: payment mode: PREPAID (prepayment) POSTPAID_BY_MONTH (pay-as-you-go). |
| PackageType | Yes | String | High-Protection package type: specifies the high-protection package type. valid values: Enterprise (Enterprise edition), Standard (Standard version), StandardPlus (Standard version 2.0). |
| InstanceCount | Yes | Integer | Specifies the number of anti-ddos packages to purchase. valid values: one-time purchase of no more than 10. |
| InstanceChargePrepaid | No | InstanceChargePrepaid | { "Period": 3, "RenewFlag": "NOTIFY_AND_AUTO_RENEW" } |
| EnterprisePackageConfig | No | EnterprisePackageConfig | { "Region": "ap-guangzhou", "ProtectIpCount": 1, "BasicProtectBandwidth": 300, "Bandwidth": 100, "ElasticProtectLimit": 0, "ElasticBandwidthFlag": true } |
| StandardPackageConfig | No | StandardPackageConfig | { "Region": "ap-guangzhou", "ProtectIpCount": 1, "BasicProtectBandwidth": 300, "Bandwidth": 100, "ElasticProtectLimit": 0, "ElasticBandwidthFlag": true } |
| StandardPlusPackageConfig | No | StandardPlusPackageConfig | { "Region": "ap-guangzhou", "ProtectCount": "TWO_TIMES", "ProtectIpCount": 1, "Bandwidth": 100, "ElasticBandwidthFlag": true } |
| TagInfoList.N | No | Array of TagInfo | [ { "TagKey": "beal-test", "TagValue": "beal-test" } ] |
| DryRun | No | Boolean | false by default. true indicates to perform parameter validation only without actual purchase. |
| Parameter Name | Type | Description |
|---|---|---|
| ResourceIds | Array of String | bgpIds |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: antiddos.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateBgpInstance
<Common request parameters>
{
"InstanceChargeType": "PREPAID",
"PackageType": "StandardPlus",
"InstanceCount": 1,
"InstanceChargePrepaid": {
"Period": 3,
"RenewFlag": "NOTIFY_AND_AUTO_RENEW"
},
"StandardPlusPackageConfig": {
"Region": "ap-guangzhou",
"ProtectCount": "TWO_TIMES",
"ProtectIpCount": 1,
"Bandwidth": 10,
"ElasticBandwidthFlag": true
},
"TagInfoList": [],
"DryRun": false
}
{
"Response": {
"ResourceIds": [
"bgp-00000451"
],
"RequestId": "fe8e9c34-a2c0-4bb2-a874-2b7386adbd97"
}
}
POST / HTTP/1.1
Host: antiddos.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateBgpInstance
<Common request parameters>
{
"InstanceChargeType": "PREPAID",
"PackageType": "Standard",
"InstanceCount": 1,
"InstanceChargePrepaid": {
"Period": 3,
"RenewFlag": "NOTIFY_AND_MANUAL_RENEW"
},
"StandardPackageConfig": {
"Region": "ap-guangzhou",
"ProtectIpCount": 1,
"Bandwidth": 10,
"ElasticBandwidthFlag": true
},
"TagInfoList": [],
"DryRun": false
}
{
"Response": {
"ResourceIds": [
"bgp-0000043i"
],
"RequestId": "e122a577-1266-4193-b223-f8cb654b5209"
}
}
POST / HTTP/1.1
Host: antiddos.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateBgpInstance
<Common request parameters>
{
"InstanceChargeType": "PREPAID",
"PackageType": "Enterprise",
"InstanceCount": 1,
"InstanceChargePrepaid": {
"Period": 3,
"RenewFlag": "NOTIFY_AND_AUTO_RENEW"
},
"EnterprisePackageConfig": {
"Region": "ap-guangzhou",
"ProtectIpCount": 1,
"BasicProtectBandwidth": 300,
"Bandwidth": 10,
"ElasticBandwidthFlag": true
},
"TagInfoList": [
{
"TagKey": "beal-test",
"TagValue": "beal-test"
}
],
"DryRun": false
}
{
"Response": {
"ResourceIds": [
"bgp-00000450"
],
"RequestId": "dc81b4ff-730a-4907-a2eb-b08fc1e1e8b8"
}
}
POST / HTTP/1.1
Host: antiddos.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateBgpInstance
<Common request parameters>
{
"InstanceChargeType": "POSTPAID_BY_MONTH",
"PackageType": "Standard",
"InstanceCount": 1,
"StandardPackageConfig": {
"Region": "ap-shanghai",
"ProtectIpCount": 10,
"Bandwidth": 100
},
"DryRun": false
}
{
"Response": {
"ResourceIds": [
"bgp-000004ku"
],
"RequestId": "340d95e7-4ea2-480c-958b-ca094141911f"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.InsufficientBalance | Insufficient account balance. |
| InvalidParameter | Parameter error. |
| InvalidParameter.SpecialParameterForSpecialAccount | This parameter can only be used when the allowlist feature is enabled. |
| UnsupportedOperation | Unsupported operation. |
| UnsupportedOperation.BandwidthNotSupported | This business bandwidth is not supported. |
| UnsupportedOperation.BasicProtectBandwidthNotSupported | This base protection bandwidth value is unsupported. |
| UnsupportedOperation.ElasticProtectBandwidthNotSupported | This elastic bandwidth value is not supported. |
| UnsupportedOperation.InstanceChargeTypeNotSupported | This payment type is not supported. |
| UnsupportedOperation.PeriodNotSupported | The billing period is not supported. see the corresponding billing periods supported by the anti-ddos pro package. |
| UnsupportedOperation.ProtectIpCountNotSupported | The number of protected ips is not supported. |
| UnsupportedOperation.RegionNotSupported | This region is not supported. |
피드백