查询实例详情
GET/api/v1/service-instances/:id
- 成功码
10000- 子账号所需权限
- 查看实例与订单
返回单个实例的完整信息,字段与实例列表的元素相同。
请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | 路径 | integer | 是 | 实例 ID(12 位数字,取自实例列表 / 详情的 id)。不是自己名下的实例、或不是有效的实例 ID,按「不存在」处理 |
应答 data
| 字段 | 类型 | 说明 |
|---|---|---|
id | integer | 实例 ID:12 位数字,不连续、不代表开通先后;本平台所有接口里的实例 ID(路径 :id、service_instance_id、instance_id 等)都是它 |
instance_no | string | 实例编号 |
name | string | 实例名称 |
product_id | integer | 商品 ID |
product_name | string | 商品名称(商品已下架也照常给) |
product_line | string | 产品线:ecs 云服务器 / bare_metal 裸金属 / dedicated 物理服务器 / colo 服务器托管 / rack 机柜租赁 / ssl SSL 证书 / maas 模型服务 / iploc IP 属地查询;未归类为空串 |
kind | string | 类别:server = 服务器(云服务器 / 裸金属 / 物理服务器 / 服务器托管)/ other = 其它已购服务(机柜、证书、资源包 / 次数包 / 套餐) |
region_id | integer | 地域 ID;0 = 商品没有地域 |
region_name | string | 地域名称 |
specs | object | 购买时选定的规格(形状随产品不同,只含你自己的选择,不含价格);按配置项售卖的商品另含 labels: [{name, value}](购买时的配置名,只用于展示) |
status | integer | 实例状态:0 待开通 / 1 运行中 / 2 已暂停 / 3 已过期 / 4 已终止。注意 1 表示服务有效,不代表机器此刻已开机(实时电源状态见 remote-status) |
billing_status | string | 计费状态:normal 正常 / grace_period 按需欠费宽限期(按需账单把现金账户扣成负数后进入,照常运行)/ overdue 欠费(宽限期过后仍为负,已暂停;余额回到不小于 0 自动恢复)/ cancelled 已退款取消。status=2 且 overdue = 欠费暂停(结清后自动恢复);status=2 且 normal = 流量超额暂停(购买流量包可恢复) |
provision_status | string | 开通状态:provisioning 开通中 / active 已开通 / abnormal 开通异常处理中 / released 已释放 / group_wait 等待成团(拼团订单成团前不开通,期间 status=0) |
billing_type | integer | 计费类型:1 包周期 / 2 按量 / 3 一次性 / 0 其它 |
billing_cycle | integer | 计费周期:1 月 / 2 季 / 3 半年 / 4 年 / 5 两年 / 6 三年 / 0 其它 |
billing_mode | string | 计费方式:prepaid 包年包月 / on_demand 按需(按小时);其它计费类型为空串 |
main_ip | string | 主 IP;只在已开通时有值,否则空串 |
private_ips | array<string> | 内网 IPv4;没有为空数组 |
current_os_name | string | 当前操作系统名;未知为空串 |
start_at | string | 生效时间(YYYY-MM-DD HH:mm:ss,服务时区;空值为空串,下同) |
expire_at | string | 到期时间;按需实例为空串 |
next_billing_at | string | 下次计费时间 |
auto_renew | integer | 自动续费:0 否 / 1 是 |
current_price | string | 当前续费单价(元,两位小数字符串) |
on_demand_price_per_100h | string | 按需时长单价(元 / 100 小时);非按需实例为空串 |
on_demand_flow_price_per_100gb | string | 按需流量单价(元 / 100GB);非按需实例为空串 |
auto_release_at | string | 按需实例的定时释放时间;没设为空串 |
remote_op | string | 正在进行的运维操作;空串 = 没有。非空时再发起运维操作会被拒绝 |
change_order_id | integer | 待支付的续费 / 变更订单 ID;0 = 没有 |
refund_pending | boolean | 是否有进行中的退订申请 |
tags | array<object> | 实例标签 [{key, value}],按键升序;没有为空数组 |
recurring_discounts | array<object> | 生效中的循环优惠(按指定周期续费时每期再减);没有为空数组 |
created_at | string | 创建时间 |
updated_at | string | 更新时间 |
应答示例(data)
{
"id": 1001,
"instance_no": "vm-abc123",
"name": "web-server-01",
"product_id": 5,
"product_name": "通用型云服务器",
"product_line": "ecs",
"region_id": 1,
"region_name": "华东一区",
"specs": {
"cpu": 2,
"memory": 4
},
"billing_type": 1,
"billing_cycle": 1,
"billing_mode": "prepaid",
"status": 1,
"billing_status": "normal",
"provision_status": "active",
"main_ip": "203.0.113.8",
"private_ips": [],
"current_os_name": "Debian-12",
"start_at": "2026-10-01 10:00:00",
"expire_at": "2026-11-01 10:00:00",
"next_billing_at": "2026-11-01 10:00:00",
"auto_renew": 1,
"current_price": "99.90",
"on_demand_price_per_100h": "",
"on_demand_flow_price_per_100gb": "",
"auto_release_at": "",
"remote_op": "",
"change_order_id": 0,
"refund_pending": false,
"tags": [
{
"key": "环境",
"value": "生产"
}
],
"recurring_discounts": [],
"remark": "",
"extra": {},
"created_at": "2026-10-01 10:00:00",
"updated_at": "2026-10-20 12:30:00"
} 业务码
| code | 说明 |
|---|---|
60501 | 实例不存在,或不属于当前账号 |
签名认证失败与通用业务码见错误码。