Create TBSP
Updated at:2025-10-16
Description
- TBSP adopts a prepaid billing model, effective immediately upon purchase.
- When creating a TBSP, the purchase period and renewal period must be specified as integers.
- To enable auto-renewal when creating a TBSP, both the autoRenewTime and autoRenewTimeUnit parameters must be provided. If either is missing, auto-renewal will not be enabled.
Request structure
Plain Text
1POST /v{version}/tbsp?clientToken={clientToken} HTTP/1.1
2Host: eip.bj.baidubce.com
3Authorization: authorization string
4{
5 "name": name,
6 "lineType": lineType,
7 "ipCapacity": ipCapacity,
8 "reservationLength": reservationLength,
9 "reservationTimeUnit": reservationTimeUnit,
10 "autoRenewTime": autoRenewTime,
11 "autoRenewTimeUnit": autoRenewTimeUnit
12}
Request headers
No special headers beyond common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| clientToken | String | Yes | Query | Idempotence token, for details, refer to [Idempotence](EIP/API Reference/General Description.md#Idempotence) |
| name | String | Yes | RequestBody | Name of the TBSP |
| lineType | String | Yes | RequestBody | Line Type (supporting BGP (standard) and BGP_S (enhanced)) |
| ipCapacity | Int | Yes | RequestBody | IP capacity of a single service package (1/5/30/100) |
| reservationLength | Int | Yes | RequestBody | Purchase period (by days: 1-20; by months: 3, 6; by years: 1-3) |
| reservationTimeUnit | String | Yes | RequestBody | Purchase period unit (DAY/MONTH/YEAR) |
| autoRenewTime | Int | No | RequestBody | Auto-renewal period, enabling auto-renewal when creating a TBSP (by months: 1-9; by years: 1-3) |
| autoRenewTimeUnit | String | No | RequestBody | Auto-renewal period unit, enabling auto-renewal when creating a TBSP (MONTH/YEAR) |
Return status code
Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](EIP/API Reference/Error code.md).
Response headers
No special headers beyond common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| id | String | ID of the TBSP |
Request example
Java
1POST /v1/tbsp?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2Host: eip.bj.baidubce.com
3Authorization:bce-auth-v1/a43eea003308400587496785f7f5d9ee/2021-11-06T12:28:04Z/3600/host;x-bce-date/25ec3d4baba54ad7397cb31c96cb5e364088ff79f9b853ffb8dc6c11ebcdcf16
4{
5 "name": "tbsp",
6 "ipCapacity": 1,
7 "lineType": "BGP_S",
8 "reservationLength": 3,
9 "reservationTimeUnit": "MONTH",
10 "autoRenewTime": 1,
11 "autoRenewTimeUnit": "MONTH"
12}
Response example
Java
1HTTP/1.1 200 OK
2Server: nginx/1.19.0
3Date: Sat, 06 Nov 2021 12:28:05 GMT
4Content-Type: application/json; charset=UTF-8
5X-Bce-Request-Id: e63d384a-6d74-49f3-8364-50db7f7c56f2
6{
7 "id": "ipDdos-82562e17"
8}
