Package Related Interface
Query Package List
- Query the list of physical server packages.
Request Structure
GET /v{version}/flavor HTTP/1.1
Host: bbc.bj.baidubce.com
Authorization: authorization string
Request Header Field
There are no other special header fields except the public header field.
Request Parameter
Parameter Name | Type | Required? | Parameter Position | Description |
---|---|---|---|---|
version | String | Yes | URI parameter | API version number |
Return Header Field
There are no other special header fields except the common header field.
Return Parameter
Parameter Name | Type | Description |
---|---|---|
flavors | List<FlavorModel> | The package information list is a collection of InstanceModels. |
Request Example
GET /v1/flavor HTTP/1.1
Host: bbc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2016-12-03T06:42:19Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Return Example
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Wed, 03 Dec 2016 06:42:19 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"flavors":[
{
"flavorId":"BBC-I1-01",
"cpuCount": 24,
"cpuType": "Intel Xeon E5-2620 V3",
"memoryCapacityInGB": 128,
"disk": "480G*5 SSD + 100G*2 SATA",
"networkCard": "10000baseT/Full*2"
},
{
"flavorId":"BBC-I2-01",
"cpuCount": 32,
"cpuType": "Intel Xeon E5-2620 V3",
"memoryCapacityInGB": 128,
"disk": "480G*5 SSD",
"networkCard": "10000baseT/Full*2"
}
]
}
Query Package Details
- Query the detail information of physical server packages.
Request Structure
GET /v{version}/flavor/{flavorId} HTTP/1.1
Host: bbc.bj.baidubce.com
Authorization: authorization string
Request Header Field
There are no other special header fields except the public header field.
Request Parameter
Parameter Name | Type | Required? | Parameter Position | Description |
---|---|---|---|---|
version | String | Yes | URI parameter | API version number |
flavorId | String | Yes | URI parameter | Package ID to be queried |
Return Header Field
There are no other special header fields except the common header field.
Return Parameter
Request Example
GET /v1/flavor/BBBC-I1-01 HTTP/1.1
Host: bbc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Return Example
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Wed, 03 Dec 2014 06:42:19 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"flavorId":"BBC-I1-01",
"cpuCount": 24,
"cpuType": "Intel Xeon E5-2620 V3",
"memoryCapacityInGB": 128,
"disk": "480G*5 SSD + 100G*2 SATA",
"networkCard": "10000baseT/Full*2"
}
Query RAID
- Query the RAID method and disk size of the specified package
Request Structure
GET /v{version}/flavorRaid/{flavorId} HTTP/1.1
Host: bbc.bj.baidubce.com
Authorization: authorization string
Request Header Field
There are no other special header fields except the public header field.
Request Parameter
Parameter Name | Type | Required? | Parameter Position | Description |
---|---|---|---|---|
version | String | Yes | URI parameter | API version number |
flavorId | String | Yes | URI parameter | Specify the package for querying RAID |
Return Header Field
There are no other special header fields except the common header field.
Return Parameter
Parameter Name | Type | Description |
---|---|---|
flavorId | String | Package ID |
raids | List<RaidModel> | The RAID information list is a collection of RaidModel |
Request Example
GET /v1/flavorRaid/BBC-I1-01 HTTP/1.1
Host: bbc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Return Example
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Wed, 03 Dec 2014 06:42:19 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"flavorId":"BBC-I1-01",
"raids": [
{
"raidId":"raid-1dfe32d1",
"raid":"2RAID1 + 3RAID5",
"sysSwapSize":1,
"sysRootSize":20,
"sysHomeSize":880,
"sysDiskSize":901,
"dataDiskSize":10000
},
{
"raidId":"raid-22a2c3f9",
"raid":"5RAID5",
"sysSwapSize":1,
"sysRootSize":20,
"sysHomeSize":459,
"sysDiskSize":480,
"dataDiskSize":0
}
]
}