Create bandwidth package
Updated at:2025-10-16
Description
- The bandwidth package only supports binding to prepaid resources. Currently, it can be bound to EIP and EIPGROUP.
- Name (optional): Specify a name for the bandwidth package (auto-generated if left blank). If specified, it must start with a letter and may include letters, digits, and special characters (- _ . /), with a maximum length of 65 characters.
- The "EIP" and "EIPGROUP" fields represent the EIP's IP address or the EIPGROUP's ID for the resource to be bound, respectively. Only one field is valid. If both are filled, only the "EIP" field will take effect.
- The EIP must be a standalone public IP instance and cannot belong to any EIPGROUP resource.
- The "bandwidthInMbps" field represents the public network bandwidth of the bandwidth package. It must be a positive integer, and the combined value of this bandwidth and that of any bound resources cannot exceed 200 Mbps. For AccelerationPackages, the total bandwidth including the instance's default cross-border bandwidth must not exceed the package's bandwidth limit.
- The "autoReleaseTime" field is optional and specifies when the bandwidth package will be automatically released. If set, the time must be in UTC format (e.g., "2019-08-03T20:38:43Z") and fall between the current time and the expiration time of the bound prepaid instance. If left blank, the package will be released when the bound resources expire.
- The "type" field is optional and indicates the type of bandwidth package, which can be BandwidthPackage or AccelerationPackage (cross-border acceleration package). Cross-border acceleration packages are only supported in the Hong Kong region. The default value is BandwidthPackage.
Request structure
Plain Text
1POST /v{version}/eipbp?clientToken={clientToken} HTTP/1.1
2Host: eip.bj.baidubce.com
3Authorization: authorization string
4{
5 "name": name,
6 "eip": eip,
7 "eipGroupId": eipGroupId,
8 "bandwidthInMbps": bandwidthInMbps,
9 "type":type,
10 "autoReleaseTime":autoReleaseTime,
11 "tags":[
12 {
13 "tagKey": tagKey,
14 "tagValue": tagValue
15 }
16 ],
17 "resourceGroupId":resourceGroupId
18}
Request headers
There are no special headers required beyond the 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 | Idempotency Token |
| name | String | No | RequestBody | Bandwidth package name (auto-generated if blank) |
| eip | String | Yes | RequestBody | The IP address of the elastic public IP (EIP) bound to the bandwidth package |
| eipGroupId | String | Yes | RequestBody | The EIPGROUP ID bound to the bandwidth package |
| bandwidthInMbps | int | Yes | RequestBody | Public network bandwidth of the bandwidth package |
| type | String | No | RequestBody | Bandwidth package type, including BandwidthPackage or AccelerationPackage (cross-border acceleration package). The cross-border acceleration package only supports Hong Kong region. The default value is BandwidthPackage. |
| autoReleaseTime | String | No | RequestBody | Automatic release time of the bandwidth package, which must comply with UTC format (e.g., "2019-08-03T20:38:43Z") |
| tags | List<[TagModel](EIP/API Reference/Appendix 1.md#TagModel)> | No | RequestBody | List of tag key-value pairs to be created. |
| resourceGroupId | String | No | RequestBody | ID of the resource group bound simultaneously when creating the bandwidth package |
Response 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 | Type | Description |
|---|---|---|
| id | String | Bandwidth package ID |
Request example
Plain Text
1POST /v1/eipbp?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2HOST: eip.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4{
5 "name":"bp-for-test",
6 "eip": "10.23.42.12",
7 "bandwidthInMbps": 5,
8 "tags":[
9 {
10 "tagKey": "tagK",
11 "tagValue": "tagV"
12 }
13 ],
14 "resourceGroupId":"RESG-J7PdULjguvB"
15}
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7{
8 "id":"bw-2ede9df3"
9}
