获取BEC服务列表
更新时间:2022-05-17
接口描述
本接口用获取BEC容器服务列表。
请求结构
无
请求参数
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
marker | 标记查询的起始位置 | query | 否 | string |
maxKeys | 每页包含的最大数量,1-1000,默认1000 | query | 否 | integer |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 参数说明 | 类型 |
---|---|---|
isTruncated | true表示后面还有数据,false表示已经是最后一页 | boolean |
marker | 标记查询的起始位置 | string |
maxKeys | 每页包含的最大数量 | integer |
nextMarker | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现 | string |
services | Service列表 | array |
deployInstances | 服务部署实例信息 | array |
city | 城市 | string |
cityName | 城市中文名 | string |
country | 国家 | string |
countryName | 国家中文名 | string |
networkType | 网络类型 | string |
region | 区域 | string |
regionName | 区域中文名 | string |
replicas | 副本数量 | integer |
serviceProvider | 运营商,可用值:BGP,CHINA_MOBILE,CHINA_UNICOM, CHINA_TELECOM,TRIPLE_LINE,INTRA |
string |
spName | 运营商中文名 | string |
regions | 服务部署区域个数 | integer |
runningPods | 服务RUNNING POD数 | integer |
serviceId | 服务Id | string |
serviceName | 服务名称 | string |
status | 资源状态,可用值:STARTING,RUNNING,PENDING,EXCEPTION, FAILED,UNKNOWN,TERMINATED,WAITING,STOP,BINDING,STOPPING, TERMINATING,DELETING,NORMAL |
string |
totalCpu | 服务CPU总数 | integer |
totalDisk | 服务磁盘总数 | integer |
totalGpu | 服务GPU总数 | integer |
totalMem | 服务内存总数 | integer |
totalPods | 服务POD总数 | integer |
错误码
请参照错误返回章节的内容。
请求示例
GET /v2/service?marker=test HTTP/1.1
Host: bec.baidubce.com
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
{
"marker": "test",
"isTruncated": false,
"nextMarker": null,
"maxKeys": 1000,
"services": [
{
"serviceId": "s-fmha06tt",
"serviceName": "kata-***",
"level": null,
"status": "RUNNING",
"totalCpu": 2,
"totalMem": 4,
"totalGpu": 0,
"totalDisk": 3,
"regions": 1,
"totalPods": 1,
"runningPods": 1,
"tagsMap": [
{
"tagKey": "a",
"tagValue": "1"
}
],
"deployInstances": [
{
"regionId": "cn-hangzhou-cm",
"replicas": 1,
"region": "EAST_CHINA",
"serviceProvider": "CHINA_MOBILE",
"city": "HANGZHOU",
"regionName": "华东",
"spName": "移动",
"cityName": "杭州",
"country": "CHINA",
"countryName": "中国"
}
],
"createTime": "2022-05-07T14:22:49Z",
"lastUpdateTime": null
},
{
"serviceId": "s-lp6z7jmk",
"serviceName": "z***",
"level": null,
"status": "RUNNING",
"totalCpu": 4,
"totalMem": 8,
"totalGpu": 0,
"totalDisk": 0,
"regions": 1,
"totalPods": 1,
"runningPods": 1,
"tagsMap": null,
"deployInstances": [
{
"regionId": "cn-hangzhou-cm",
"replicas": 1,
"region": "EAST_CHINA",
"serviceProvider": "CHINA_MOBILE",
"city": "HANGZHOU",
"regionName": "华东",
"spName": "移动",
"cityName": "杭州",
"country": "CHINA",
"countryName": "中国"
}
],
"createTime": "2022-05-09T05:58:50Z",
"lastUpdateTime": null
},
{
"serviceId": "s-ux1yo52o",
"serviceName": "**am",
"level": null,
"status": "RUNNING",
"totalCpu": 1,
"totalMem": 2,
"totalGpu": 0,
"totalDisk": 0,
"regions": 1,
"totalPods": 1,
"runningPods": 1,
"tagsMap": null,
"deployInstances": [
{
"regionId": "cn-hangzhou-cm",
"replicas": 1,
"region": "EAST_CHINA",
"serviceProvider": "CHINA_MOBILE",
"city": "HANGZHOU",
"regionName": "华东",
"spName": "移动",
"cityName": "杭州",
"country": "CHINA",
"countryName": "中国"
}
],
"createTime": "2022-05-09T10:16:05Z",
"lastUpdateTime": null
}
......
]
}