获取实例详情
描述
根据实例 ID 获取实例的详细信息。
请求路径
GET /v1/instances/:id
请求参数
| 参数名称 | 参数类型 | 是否必填 | 描述 |
|---|---|---|---|
| id | string | 是 | 实例 ID |
响应字段
| 字段名称 | 字段类型 | 描述 |
|---|---|---|
| instanceID | string | 实例 ID |
| name | string | 实例名称 |
| description | string | 实例描述 |
| state | string | 实例状态,可能值:Preparing、Booting、Running、ShuttingDown、Shutdown、Rebooting、Destroyed、Abnormal |
| createdAt | string | 实例创建时间 |
| instanceTypeInfo | object | 实例规格信息 |
| instanceTypeInfo.instanceType | string | 实例规格 ID |
| instanceTypeInfo.cpu | int | vCPU 数量 |
| instanceTypeInfo.memory | float | 内存,单位 GiB |
| instanceTypeInfo.gpuName | string | GPU 型号,仅 GPU 规格返回 |
| instanceTypeInfo.gpuCount | int | GPU 数量,仅 GPU 规格返回 |
| instanceTypeInfo.gpuMemory | float | GPU 显存,单位 GiB,仅 GPU 规格返回 |
| cost | object | 计费信息 |
| cost.chargeType | string | 付费方式,可能值:PostPaid |
| systemDisk | object | 系统盘信息 |
| systemDisk.id | string | 系统盘 ID |
| systemDisk.diskType | string | 系统盘类型,当前为 local.ssd |
| systemDisk.size | int | 系统盘大小,单位 GiB |
| region | object | 区域信息 |
| region.id | string | 区域 ID |
| region.name | string | 区域名称 |
| image | object | 镜像信息 |
| image.id | string | 镜像 ID |
| image.name | string | 镜像名称 |
| privateIPAddresses | object array | 内网 IPv4 地址列表 |
| privateIPAddresses[].ipv4 | string | 内网 IPv4 地址 |
| publicIPAddresses | object array | 公网 IPv4 地址列表,可能为空 |
| publicIPAddresses[].id | string | 公网 IP ID |
| publicIPAddresses[].ipv4 | string | 公网 IPv4 地址 |
| publicIPAddresses[].bandwidth | int | 分配的公网带宽,单位 Mbps |
| operationLocks | object array | 实例当前操作锁列表 |
| operationLocks[].reason | string | 操作锁原因 |
请求示例
GET /v1/instances/i-1234567890abcdef HTTP/1.1
Host: <RegionID>-ecs.qiniuapi.com
Authorization: Qiniu <AccessToken>
响应示例
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"instanceID": "i-1234567890abcdef",
"name": "my-instance",
"description": "我的测试实例",
"state": "Rebooting",
"createdAt": "2024-01-01T00:00:00Z",
"expiredAt": "2024-02-01T00:00:00Z",
"instanceTypeInfo": {
"instanceType": "ecs.c1.large",
"cpu": 4,
"memory": 8,
"gpuName": "",
"gpuCount": 0,
"gpuMemory": 0
},
"cost": {
"chargeType": "PostPaid"
},
"systemDisk": {
"id": "d-1234567890abcdef",
"diskType": "local.ssd",
"size": 40
},
"region": {
"id": "cn-hangzhou",
"name": "杭州一区"
},
"image": {
"id": "img-12345678",
"name": "Ubuntu 20.04"
},
"privateIPAddresses": [
{
"ipv4": "10.0.0.5"
}
],
"publicIPAddresses": [
{
"id": "eip-12345678",
"ipv4": "1.2.3.4",
"bandwidth": 20
}
],
"operationLocks": [
{
"reason": "Rebooting"
}
]
}
文档反馈
(如有产品使用问题,请 提交工单)