Query Spot Instance Packages
Updated at:2025-10-20
This API retrieves specification packages for spot instances.
Request structure
Plain Text
1POST /v{version}/instance/bidFlavor HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
No request parameters
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| zoneResources | List<[ZoneResource](BCC/API Reference/Appendix.md#ZoneResource)> | Specification packages for each availability zone. For specific data formats, refer to [ZoneResource](BCC/API Reference/Appendix.md#ZoneResource). |
Error codes
| Error code | Error description | HTTP status code | Chinese explanation |
|---|---|---|---|
| Instance.NotSupportInstanceTypeException | not support the instance type. | 403 | This machine type is not supported. |
Request example
Plain Text
1POST /v2/instance/bidFlavor HTTP/1.1
2Host: bcc.bj.baidubce.com
3ContentType: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
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{
8 "zoneResources": [
9 {
10 "zoneName": "cn-bj-a",
11 "bccResources": [
12 {
13 "instanceType": "N1",
14 "flavors": [
15 {
16 "specId": "c1",
17 "cpuCount": 1,
18 "memoryCapacityInGB": 2,
19 "productType": "bidding",
20 "spec": "bcc.c1.c1m2"
21 }
22 ]
23 }
24 ]
25 }
26 ]
27}
