Acme Cloud

云主机详情

GET/v2/instances/{instance_id}

返回实例的规格、网络、磁盘与运行指标快照。

Bearer Token instances:read api.demo.acme-cloud.dev

请求参数

共 1 项
instance_id 必填 路径

string

instance_id 唯一标识

响应

3 种状态

200 OK

响应示例
{
  "id": "ins_4f21b8",
  "name": "web-01",
  "status": "running",
  "spec": {
    "cpu": 4,
    "memory_gb": 8,
    "disk_gb": 80
  },
  "network": {
    "public_ip": "43.129.xx.xx",
    "private_ip": "10.2.4.11",
    "bandwidth_mbps": 100
  },
  "metrics": {
    "cpu_usage_pct": 37.4,
    "memory_usage_pct": 61.2,
    "disk_usage_pct": 44.8,
    "uptime_seconds": 1283400
  },
  "labels": {
    "env": "prod",
    "role": "web"
  }
}

代码示例

cURL
curl -i -X GET 'https://api.demo.acme-cloud.dev/v2/instances/instance_id_7f3a21' \
  -H 'Accept: application/json'