Create bandwidth package
Updated at:2025-11-11
Description
Create a shared bandwidth package for the Cloud Smart Network.
- Inter-cloud connection bandwidth packages support both prepaid and postpaid billing modes (billed by daily peak bandwidth).
- Cloud-edge and edge-edge connection bandwidth packages only support postpaid billing (billed by monthly 95th percentile peak bandwidth).
Request structure
Plain Text
1POST /v{version}/csn/bp?clientToken={clientToken} HTTP/1.1
2Host: csn.baidubce.com
3Authorization: authorization string
4{
5 "name": "name",
6 "bandwidth": "bandwidth",
7 "geographicA": "geographicA",
8 "geographicB": "geographicB",
9 "interworkType": "interworkType",
10 "billing": {
11 "paymentTiming": "paymentTiming",
12 "reservation": {
13 "reservationLength": reservationLength,
14 "reservationTimeUnit": "reservationTimeUnit"
15 }
16 },
17 "tags": [{
18 "tagKey": "tagKey",
19 "tagValue": "tagValue"
20 }]
21}
Request headers
No special headers beyond common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| clientToken | String | No | Query | Idempotence token, which is an ASCII string with a length not exceeding 64 bits, see details in [ClientToken Idempotence Support](CSN/API Reference/General Description.md#Idempotence) |
| name | String | Yes | RequestBody | Name of the bandwidth package: Cannot be empty. |
| interworkType | String | No | RequestBody | Connection type of the bandwidth package. Value range: [center | center-edge | edge-edge], representing inter-cloud connection, cloud-edge connection, and edge-edge connection respectively. By default, it is for inter-cloud connection |
| bandwidth | int | Yes | RequestBody | Bandwidth value of the bandwidth package: Maximum value is 10,000 |
| geographicA | String | Yes | RequestBody | Region to which the network instance belongs. Value range: [China | Asia-Pacific], representing Chinese mainland and Asia-Pacific region respectively. |
| geographicB | String | Yes | RequestBody | Region to which the other network instance belongs. Value range: [China | Asia-Pacific], representing Chinese mainland and Asia-Pacific region respectively. |
| billing | [Billing](CSN/API Reference/Appendix.md#Billing) | Yes | RequestBody | Billing information |
| tags | List<[TagModel](CSN/API Reference/Appendix.md#TagModel)> | No | RequestBody | List of tag key-value pairs to be created |
Response headers
No additional headers beyond standard ones.
Response parameters
| Parameter name | Type | Description |
|---|---|---|
| csnBpId | String | ID of the bandwidth package |
Request example
Plain Text
1POST /v1/csn/bp?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2HOST: csn.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2022-03-15T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4{
5 "name": "bpName",
6 "bandwidth":100,
7 "geographicA":"China",
8 "geographicB":"China",
9 "interworkType":"center-edge",
10 "billing": {
11 "paymentTiming": "Prepaid",
12 "reservation": {
13 "reservationLength": 1,
14 "reservationTimeUnit": "month"
15 }
16 }
17}
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 15 Mar 15 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7{
8 "csnBpId":"csnBp-gdrf6fukb36u"
9}
