最新活动 七周年庆典

产品

硅云帮助文档中心

搜索文档

热门搜索词:

根据实例id获取实例

更新时间:2020-07-14 14:32  版本:v1.2
分享到:
我要反馈 
收藏 我的收藏

简要描述:


    根据实例id获取实例


请求url:


/ncs-server/api/v1/host/getById


请求方式:


GET


请求参数:


字段
类型最大长度参数位置默认选填
描述
idstring32query
实例id



请求示例:


GET /ncs-server/api/v1/host/getById?id=cvm-3hdk8be2b2225 HTTP/1.1
Content-Type: application/json
request_id: 2942183558593ffc9d75fb8e16793ff
api_key: 1706006863049654272
signature: 4f7e239ac2f96a956f6b4deee26245a9c96ea5d0dba9242829cf927689684839


返回示例:


data返回实例信息


{
    "status": 2000,
    "message": "success",
    "data": {
        "userAccount": "z8z87878",
        "remoteId": "4f5b978e-5631-4dd1-8b1f-a38f202bbadd",
        "productId": "cvm.g1.c1m1.large",
        "projectId": "0",
        "projectName": "默认",
        "latestOrderId": "1706449695652184065",
        "cpuNum": 1,
        "memSize": 1024,
        "systemDiskInfo": "{\"remoteId\":\"9076ee10-2d39-4c23-be59-8fe1a7e5072d\",\"productId\":\"standard_cloud_disk\",\"productName\":\"高效云盘\",\"diskSize\":20,\"status\":\"OK\",\"remoteHostName\":\"computer2\",\"id\":\"disk-3hdk8be2b2222\"}",
        "areaMark": "test",
        "areaName": "测试环境",
        "hostType": "g1",
        "hostTypeName": "通用型",
        "floatIpId": "54a49d4b-a126-4895-bca2-d8548fbfc46b",
        "floatIp": "192.168.34.243",
        "floatIpLong": 3232244467,
        "innerIp": "172.16.1.27",
        "bandwidthStatus": "OK",
        "bandwidthProductId": "default",
        "bandwidthTypeName": "默认",
        "bandwidth": 1,
        "imageId": "CentOS-6-x86_64-6.8",
        "imageName": "CentOS 6.8 64位",
        "imageType": "public",
        "securityGroupStatus": "ok",
        "securityGroupInfo": "guiyun-system-template-open-all",
        "beginTime": 1589188908832,
        "endTime": 1594459308832,
        "status": "OK",
        "remoteHostStatus": "ACTIVE",
        "buildStatus": "build_success",
        "remoteHostName": "computer2",
        "autoRenew": false,
        "supportNoReasonRefund": false,
        "refundStatus": "NONE",
        "configuration": "",
        "networkName": "selfservice",
        "createTime": 1589188908833,
        "updateTime": 1589255127596,
        "id": "cvm-3hdk8be2b2225"
    }
}


实例数据结构:


字段类型
描述
idstring实例id
userAccount
string用户名
projectId
string实例所属项目id  0为默认项目
projectNamestring实例项目名
systemDiskInfostringjson字符串,系统盘信息
status
string实例状态
remoteHostStatusstring实例运行状态
buildStatusint实例创建状态
bandwidthStatus
string带宽设置状态
securityGroupStatusstring安全组设置状态
bindDiskCountint绑定续费的磁盘数量
hasBootbooleantrue为实例有系统盘,false为没有,没有系统盘,主机不能正常使用
endTimelong到期时间时间戳,精确到毫秒
createTimelong创建时间时间戳,精确到毫秒











您对该文档有什么建议?

您对该文档的评分:

本文导航

简要描述:

请求url:

请求方式:

请求参数:

请求示例:

返回示例:

搜索文档