查询云主机所有快照
本页目录
https://www.cloudam.cn/vps/cvmresource/snapshot/list?accountId={ACCOUNT_ID}&ip={IP}
请求方式:GET
查询云主机所有快照
URL Parameters
Parameter | Type | Description |
---|---|---|
IP | String | 弹性公网ip地址 Example: 121.41.107.138 |
ACCOUNT_ID | String | 你的Cloudam账户ID, Cloudam会随Token一起提前发送给客户 Example: demoaccount |
Request(请求)
Headers(HTTP头)
注: 请首先联系Cloudam获取API Token,token相当于密码,请妥善保护。
{
"Authorization": "Bearer ${token}",
"Content-Type": "application/json"
}
Response(响应) - 200
Headers(响应头)
{
"Content-Type": "application/json"
}
Body(响应体JSON) -- 正确响应
{
"success": true,
"errorCode": "",
"errorMsg": null,
"snapshots": [
{
"snapshotId": "s-2zeinznetzuyxo478q27",
"createTime": 1575369594000,
"snapshotType": "system",
"status": "success",
"snapshotSize": 20,
"id": "5de63b7c352df30001be04cb",
"username": "subtest",
"instanceId": "i-2ze0mno7pp379pjl9omh",
"deleteTime": 0,
"provider": "ALIYUN",
"region": "cn-beijing",
"deleted": false
},
{
"snapshotId": "s-2zean6oiqkrzwfst3yej",
"createTime": 1575442887000,
"snapshotType": "system",
"status": "success",
"snapshotSize": 20,
"id": "5de759c8ca5b7a0001feeed6",
"username": "subtest",
"instanceId": "i-2ze0mno7pp379pjl9omh",
"deleteTime": 0,
"provider": "ALIYUN",
"region": "cn-beijing",
"deleted": false
}
]
}
Response Body Attributes(响应Body属性)
Attribute | Type | Description |
---|---|---|
success | boolean | 执行成功则返回true,失败则返回false |
errorCode | String | 错误代码,空字符串表示成功,User.NotAllowed 表示请求异常, 如:User.NotAllowed:用户传入不正确的参数。 |
errorMsg | String | 具体的错误信息可能取值如下:The user has no right to do this |
snapshots | Array | 若执行成功则会返回创建的快照列表 |
Snapshot.snapshotId | String | 快照ID |
Snapshot.CreateTime | String | 创建时间 |
Snapshot.snapshotType | String | 快照的磁盘类型 |
Snapshot.status | String | 快照的状态 |
Snapshot.snapshotSize | String | 快照的大小 |
Snapshot.id | String | 快照的云端ID |
Snapshot.username | String | 快照的创建者用户名 |
Snapshot.instanceId | String | 创建快照的实例的ID |
Snapshot.deleteTime | String | 快照的删除时间 |
Snapshot.provider | String | 此快照的云厂商 |
Snapshot.region | String | 此快照的所属地域 |
Snapshot.deleted | boolean | 快照是否已被删除 |