获取BEC虚机服务详情
所有文档
menu

边缘计算节点 BEC

获取BEC虚机服务详情

产品详情立即开通

接口描述

本接口用于获取BEC虚机服务详情。

请求结构

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

请求头域

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

请求参数

参数名称 类型 是否必需 参数位置 描述
serviceId String URL参数 虚机服务ID

响应头域

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

响应参数

参数名称 类型 描述
serviceId String 虚机服务ID
serviceName String 虚机服务名称
status String 资源状态(NORMAL、FAILED)
totalCpu Integer CPU数量
totalGpu Integer GPU数量
totalMem Integer 内存数量
totalRootDisk Integer 系统盘数量
totalDisk Integer 数据盘数量
regions Integer 区域数量
deployInstances List<DeploymentInstance> 部署区域列表
totalInstances Integer 总实例数
runningInstances Integer 运行实例数
osImage ImageDetail 系统镜像详情
createTime Date 创建时间
bandwidth String 公网带宽模板大小
totalBandwidth String 总公网带宽大小
tags List<TagModel> 标签信息

错误码

请参照错误返回章节的内容。

请求示例

GET /v1/vm/service/s-lqrs2a7u 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

{
    "serviceId": "s-lqrs2a7u",
    "serviceName": "test",
    "status": "NORMAL",
    "totalCpu": 1,
    "totalMem": 2,
    "totalDisk": 20,
    "totalRootDisk": 40,
    "regions": 1,
    "deployInstances": [
        {
            "region": "SOUTH_CHINA",
            "serviceProvider": "CHINA_UNICOM",
            "replicas": 1,
            "city": "GUANGZHOU"
        }
    ],
    "totalInstances": 1,
    "runningInstances": 1,
    "osImage": {
        "id": "8d3e507f-8b7f-44aa-a3b2-fc52fedecdc3",
        "imageId": "m-IIyr1NaO",
        "name": "ubuntu-18.04-amd64-20201113213429",
        "imageType": "common",
        "snapshotId": "",
        "cpu": 0,
        "memory": 0,
        "osType": "linux",
        "osVersion": "18.04 LTS",
        "osName": "Ubuntu",
        "osBuild": "2020111300",
        "osLang": "ENG",
        "diskSize": 0,
        "createTime": "2020-11-13T13:47:10Z",
        "status": "active",
        "minMem": 1,
        "minCpu": 0,
        "minDiskGb": 20,
        "desc": "ubuntu-18.04-amd64-20201113213429",
        "osArch": "amd64 (64bit)",
        "ephemeralSize": 0,
        "imageDescription": "ubuntu-18.04-amd64-20201113213429",
        "shareToUserNumLimit": 0,
        "sharedToUserNum": 0,
        "fpgaType": "",
        "name_fri": null
    },
    "createTime": "2021-02-08T12:06:33Z",
    "totalGpu": 0,
    "bandwidth": "99Mbps",
    "totalBandwidth": "99Mbps",
    "tags": [
        {
            "tagKey": "tagKey",
            "tagValue": "tagValue"
        }
    ]
}

Model对象定义

ImageDetail

参数名称 类型 描述
id String ID
imageId String imageId
name String 镜像名称
imageType String 镜像类型
snapshotId String 快照ID
cpu Integer CPU数量
memory Integer 内存数量
osType String OS类型
osVersion String OS版本
osName String OS名称
osBuild String OS创建时间
osLang String OS语言
diskSize Integer 磁盘大小
createTime Date 创建时间
minCpu Integer 最小CPU数量
minMem Integer 最小内存数量
minDiskGb Integer 最小磁盘数量
desc String 描述
osArch String osArch
ephemeralSize Integer ephemeralSize
imageDescription String 镜像描述
shareToUserNumLimit Integer 分享数量限制
sharedToUserNum Integer 分享数量

DeploymentInstance

参数名称 类型 描述
region Region 区域
serviceProvider ServiceProvider 运营商
city String 城市
replicas Integer 副本数,最小为1

TagModel

参数名称 类型 描述
tagKey String 标签键
tagValue String 标签值

上一篇
更新BEC虚机服务
下一篇
获取BEC虚机服务列表