tencent cloud

APIs

CreateBgpInstance

Download
Focus Mode
Font Size
Last updated: 2026-09-07 13:06:50

1. API Description

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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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.

3. Output Parameters

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.

4. Example

Example1 Prepaid Standard Version 2.0 - 2 Protections - 1 IP - Business Bandwidth 10Mbps

Input Example

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
}

Output Example

{
    "Response": {
        "ResourceIds": [
            "bgp-00000451"
        ],
        "RequestId": "fe8e9c34-a2c0-4bb2-a874-2b7386adbd97"
    }
}

Example2 Prepaid Mode - Guangzhou Region - Standard Edition Purchase 10M-1IP

Input Example

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
}

Output Example

{
    "Response": {
        "ResourceIds": [
            "bgp-0000043i"
        ],
        "RequestId": "e122a577-1266-4193-b223-f8cb654b5209"
    }
}

Example3 Prepaid Mode - Purchase Anti-DDoS Pro for Enterprise - Base Bandwidth 300Gbps Business Bandwidth 10Mbps Number of Protected IPs 1

Input Example

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
}

Output Example

{
    "Response": {
        "ResourceIds": [
            "bgp-00000450"
        ],
        "RequestId": "dc81b4ff-730a-4907-a2eb-b08fc1e1e8b8"
    }
}

Example4 Postpaid Standard Version Protected IP10 Business Bandwidth 100Mbps

Input Example

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
}

Output Example

{
    "Response": {
        "ResourceIds": [
            "bgp-000004ku"
        ],
        "RequestId": "340d95e7-4ea2-480c-958b-ca094141911f"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

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.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback