查询总资源概览信息
更新时间:2021-08-02
接口描述
本接口用于获取用户当前总资源的概览信息,包括用户资源使用量汇总、已购买节点汇总等相关信息。
请求结构
GET /v1/overview/summary HTTP/1.1
Host: bec.baidubce.com
Content-Type: application/json; charset=utf-8
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
无。
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
ready | Integer | 已上线节点数量 |
notReady | Integer | 未上线节点数量 |
used | Integer | 已购买节点数量 |
resourceUsage | ResourceUsageInISP | 用户资源使用量汇总 |
usedNodes | NodeInfoVo | 用户已购买节点汇总 |
readyNodes | NodeInfoVo | 已上线节点信息汇总 |
notReadyNodes | NodeInfoVo | 未上线节点信息汇总 |
错误码
请参照错误返回章节的内容。
请求示例
GET /v1/overview/summary HTTP/1.1
Host: bec.baidubce.com
Content-Type: application/json; charset=utf-8
Authorization: bce-auth-v1/318857a8f08b11e9845ca7e54775a0c2/2019-10-17T03:07:21Z/1800/host/212eef8cfe1ac94be56c4afedb9360bba621ef646c3c8288971d36801d70501a
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Wed, 08 Jul 2019 03:28:11 GMT
x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
X-Bce-Gateway-Region: BJ
{
"ready": 5,
"notReady": 1,
"used": 3,
"resourceUsage": {
"usageMap": {
"CHINA_MOBILE": {
"cpu": 3,
"memory": 6,
"storage": 0
},
"CHINA_TELECOM": {
"cpu": 6,
"memory": 12,
"storage": 0
},
"CHINA_UNICOM": {
"cpu": 4,
"memory": 8,
"storage": 0
}
}
},
"usedNodes": {
"regionList": [
{
"region": "EAST_CHINA",
"name": "华东",
"cityList": [
{
"city": "HANGZHOU",
"name": "杭州",
"serviceProviderList": [
{
"serviceProvider": "CHINA_MOBILE",
"name": "移动"
}
]
}
]
},
{
"region": "NORTH_EAST",
"name": "东北",
"cityList": [
{
"city": "CHANGCHUN",
"name": "长春",
"serviceProviderList": [
{
"serviceProvider": "CHINA_UNICOM",
"name": "联通"
}
]
}
]
},
{
"region": "NORTH_WEST",
"name": "西北",
"cityList": [
{
"city": "XIAN",
"name": "西安",
"serviceProviderList": [
{
"serviceProvider": "CHINA_TELECOM",
"name": "电信"
}
]
}
]
}
],
"nodeSum": 3
},
"readyNodes": {
"regionList": [
{
"region": "NORTH_WEST",
"name": "西北",
"cityList": [
{
"city": "XIAN",
"name": "西安",
"serviceProviderList": [
{
"serviceProvider": "CHINA_TELECOM",
"name": "电信"
}
]
}
]
},
{
"region": "EAST_CHINA",
"name": "华东",
"cityList": [
{
"city": "HANGZHOU",
"name": "杭州",
"serviceProviderList": [
{
"serviceProvider": "CHINA_MOBILE",
"name": "移动"
}
]
}
]
},
{
"region": "SOUTH_CHINA",
"name": "华南",
"cityList": [
{
"city": "GUANGZHOU",
"name": "广州",
"serviceProviderList": [
{
"serviceProvider": "CHINA_UNICOM",
"name": "联通"
}
]
}
]
},
{
"region": "NORTH_EAST",
"name": "东北",
"cityList": [
{
"city": "CHANGCHUN",
"name": "长春",
"serviceProviderList": [
{
"serviceProvider": "CHINA_UNICOM",
"name": "联通"
}
]
}
]
},
{
"region": "SOUTH_WEST",
"name": "西南",
"cityList": [
{
"city": "CHENGDU",
"name": "成都",
"serviceProviderList": [
{
"serviceProvider": "CHINA_MOBILE",
"name": "移动"
}
]
}
]
}
],
"nodeSum": 5
},
"notReadyNodes": {
"regionList": [
{
"region": "EAST_CHINA",
"name": "华东",
"cityList": [
{
"city": "ZHONGWEI",
"name": "中卫",
"serviceProviderList": [
{
"serviceProvider": "CHINA_MOBILE",
"name": "移动"
}
]
}
]
}
],
"nodeSum": 1
}
}
Model对象定义
ResourceUsageInISP
参数名称 | 类型 | 描述 |
---|---|---|
usageMap | Map<ServiceProvider, Usage> | 资源使用量汇总 |
Usage
参数名称 | 类型 | 描述 |
---|---|---|
cpu | Integer | cpu使用量,单位核数 |
memory | Integer | 内存使用量,单位Gi |
storage | long | 存储使用量,单位Gi |
NodeInfoVo
参数名称 | 类型 | 描述 |
---|---|---|
regionList | List<RegionInfo> | 节点信息 |
RegionInfo
参数名称 | 类型 | 描述 |
---|---|---|
region | Region | 节点所属区域英文名称 |
name | String | 节点所属区域中文名称,如region为"CENTRAL_CHINA",对应name为"华中" |
cityList | List<CityInfo> | 节点所在城市信息 |
CityInfo
参数名称 | 类型 | 描述 |
---|---|---|
city | String | 节点所在城市英文名称,格式如"CHENGDU" |
name | String | 节点所在城市中文名称,如city为"CHENGDU",则对应name为"成都" |
serviceProviderList | List<ServiceProviderInfo> | 节点所在运营商信息 |
ServiceProviderInfo
参数名称 | 类型 | 描述 |
---|---|---|
serviceProvider | ServiceProvider | 节点所属运营商英文名称 |
name | String | 节点所属运营商中文名称 |
Region
枚举名称 | 描述 |
---|---|
CENTRAL_CHINA | 华中 |
EAST_CHINA | 华东 |
NORTH_CHINA | 华北 |
SOUTH_CHINA | 华南 |
NORTH_EAST | 东北 |
NORTH_WEST | 西北 |
SOUTH_WEST | 西南 |
ServiceProviderInfo
枚举名称 | 描述 |
---|---|
CHINA_UNICOM | 联通 |
CHINA_MOBILE | 移动 |
CHINA_TELECOM | 电信 |