获取BEC服务详情
所有文档

          边缘计算节点 BEC

          获取BEC服务详情

          获取BEC服务详情

          接口描述

          获取BEC服务详情

          请求结构

          GET /v1/service/{serviceId} HTTP/1.1
          Host: bec.baidubce.com
          Authorization: authorization string

          请求头域

          除公共头域外,无其它特殊头域。

          请求参数

          参数名称 类型 是否必需 参数位置 描述
          serviceId String QueryString参数 BEC 服务Id

          响应头域

          除公共头域外,无其它特殊头域。

          响应参数

          参数名称 类型 描述
          result ServiceDetailsVo BEC服务详情
          success boolean 操作是否成功true或者false

          错误码

          请参照前文的统一错误码和平台错误码。

          请求示例

          GET v1/service/s-gwqqa76g HTTP/1.1
          Host: bec.baidubce.com
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

          响应示例

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          Date: Wed, 08 Jul 2015 03:28:11 GMT
          x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
          Server: BWS
          
          {
          "result":{
              "createTime":"2019-11-18T11:15:10Z",
              "deployInstances":[
                  {
                      "region":"EAST_CHINA",
                      "replicas":2,
                      "serviceProvider":"CHINA_TELECOM"
                  },
                  {
                      "region":"EAST_CHINA",
                      "replicas":2,
                      "serviceProvider":"CHINA_MOBILE"
                  }
              ],
              "lastUpdateTime":null,
              "resourceBriefVos":[
                  {
                      "containers":[
                          {
                              "args":null,
                              "commands":null,
                              "cpu":0,
                              "envs":null,
                              "imageAddress":"nginx",
                              "imageVersion":"latest",
                              "memory":0,
                              "name":"container01",
                              "ports":null,
                              "volumeMounts":null,
                              "workingDir":null
                          }
                      ],
                      "createTime":"2019-12-07T14:54:47Z",
                      "deployInstance":{
                          "region":"EAST_CHINA",
                          "replicas":2,
                          "serviceProvider":"CHINA_MOBILE"
                      },
                      "imageList":[
                          "nginx:latest"
                      ],
                      "labels":null,
                      "lastUpdateTime":null,
                      "resourceId":"sts-gwqqa76g-1-m",
                      "resourceName":"afdfa",
                      "runningPods":2,
                      "serviceId":"s-gwqqa76g",
                      "serviceName":"hdtest",
                      "status":"RUNNING",
                      "totalCpu":2,
                      "totalMem":4,
                      "totalPods":2
                  },
                  {
                      "containers":[
                          {
                              "args":null,
                              "commands":null,
                              "cpu":0,
                              "envs":null,
                              "imageAddress":"nginx",
                              "imageVersion":"latest",
                              "memory":0,
                              "name":"container01",
                              "ports":null,
                              "volumeMounts":null,
                              "workingDir":null
                          }
                      ],
                      "createTime":"2019-11-18T03:15:10Z",
                      "deployInstance":{
                          "region":"EAST_CHINA",
                          "replicas":2,
                          "serviceProvider":"CHINA_TELECOM"
                      },
                      "imageList":[
                          "nginx:latest"
                      ],
                      "labels":null,
                      "lastUpdateTime":null,
                      "resourceId":"sts-gwqqa76g-1-t",
                      "resourceName":"afdfa",
                      "runningPods":2,
                      "serviceId":"s-gwqqa76g",
                      "serviceName":"hdtest",
                      "status":"RUNNING",
                      "totalCpu":2,
                      "totalMem":4,
                      "totalPods":2
                  }
              ],
              "serviceId":"s-gwqqa76g",
              "serviceName":"hdtest",
              "status":"RUNNING",
              "totalCpu":4,
              "totalDisk":0,
              "totalMem":8
          },
          "success":true
          }

          Model对象定义

          ServiceDetailsVo

          参数名称 类型 描述
          serviceId String BEC服务ID
          serviceName String BEC服务名称
          status String 资源状态(STOP,RUNNING,PENDING,TERMINATING,FAILED,SUCCEEDED,UNKNOWN,TERMINATED,WAITING)
          totalCpu float cpu总量
          totalMem float 内存总量
          totalDisk int 磁盘总量
          resourceBriefVos List pod详情
          deployInstances List 部署实例信息
          createTime Timestamp 创建时间
          lastUpdateTime Timestamp 更新时间

          DeploymentInstance

          参数名称 类型 描述
          region String 地域(CENTRAL_CHINA,EAST_CHINA,NORTH_CHINA,SOUTH_CHINA,NORTH_EAST,NORTH_WEST,SOUTH_WEST)
          serviceProvider String 服务运营商(CHINA_MOBILE,CHINA_UNICOM,CHINA_TELECOM)
          replicas int 副本数

          ResourceBriefVo

          参数名称 类型 描述
          serviceId String 服务ID
          serviceName String 服务名称
          resourceId String 资源ID
          resourceName String 资源名称
          deployInstance DeploymentInstance 部署实例信息
          status ResourceStatus 资源状态
          containers List 容器详情
          podBriefVos List pod信息
          createTime String 创建时间
          lastUpdateTime String 上次更新时间
          上一篇
          获取BEC服务监控
          下一篇
          启动BEC服务