Query CDS Price
Updated at:2025-10-20
View CDS pricing information.
Request structure
Plain Text
1POST /v{version}/volume/getPrice HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{
5 "storageType": specId,
6 "cdsSizeInGB": spec,
7 "paymentTiming": paymentTiming,
8 "zoneName": zoneName,
9 "purchaseCount": purchaseCount,
10 "purchaseLength": purchaseLength
11}
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number |
| storageType | StorageType | Yes | RequestBody | CDS storage classes include SSD_Enhanced (Enhanced SSD), cloud_hp1 (General-purpose SSD), hp1 (High-Performance Cloud Disk Server), and hdd (General Purpose HDD), with hp1 set as the default. |
| cdsSizeInGB | int | Yes | RequestBody | CDS disk capacity |
| paymentTiming | String | Yes | RequestBody | Billing types include Postpaid and Prepaid. |
| zoneName | String | Yes | RequestBody | Availability zone name |
| purchaseCount | int | No | RequestBody | Total price of any number of CDS, must be a positive integer greater than 0; optional parameter, default value is 1 |
| purchaseLength | int | No | RequestBody | Duration, [1,2,3,4,5,6,7,8,9,12,24,36], unit: month |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| price | List<[CdsPrices](BCC/API Reference/Appendix.md#CdsPrices)> | Query price information corresponding to CDS |
Request example
Plain Text
1POST /v2/volume/getPrice HTTP/1.1
2Host: bcc.bj.baidubce.com
3ContentType: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
5{
6 "purchaseLength": 1,
7 "paymentTiming": "Prepaid",
8 "storageType":"cloud_hp1",
9 "cdsSizeInGB":1000,
10 "purchaseCount":1,
11 "zoneName": "cn-bj-b"
12}
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Wed, 03 Dec 2014 06:42:19 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6{
7 "price": [
8 {
9 "storageType": "cloud_hp1",
10 "cdsSizeInGB": 1000,
11 "unit": "12month",
12 "price": 8964.0
13 }
14 ]
15}
