通过实例快照回滚一个或多个云盘。
接口说明
该接口即将废弃,建议您使用 ResetDisk 回滚云盘。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:ResetDisks |
update |
*Disk
*Snapshot
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| DryRun |
boolean |
否 |
是否预检本次请求。取值范围:
默认值:false。 |
false |
| Disk |
array<object> |
是 |
云盘列表。 |
|
|
object |
否 |
|||
| SnapshotId |
string |
否 |
实例快照中,指定云盘对应的快照 ID。N 的取值范围为 1~10。 |
s-j6cdofbycydvg7ey**** |
| DiskId |
string |
否 |
指定待回滚的云盘 ID。N 的取值范围为 1~10。 |
d-j6cf7l0ewidb78lq**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
3D66C85C-AA97-4A00-B0ED-2D9A80FE782C |
| OperationProgressSet |
object |
||
| OperationProgress |
array<object> |
回滚一个或多个云盘时的操作状态信息合集。 |
|
|
array<object> |
|||
| ErrorMsg |
string |
错误信息。回滚成功时返回空值。 错误码和错误信息,请参见错误中心。 |
testErrorMsg |
| ErrorCode |
string |
错误码。回滚成功时返回空值。 错误码和错误信息,请参见错误中心。 |
400 |
| OperationStatus |
string |
操作是否成功。 成功返回 Success,失败返回 ErrorCode 和 ErrorMsg 信息。 |
Success |
| RelatedItemSet |
object |
||
| RelatedItem |
array<object> |
资源信息。 |
|
|
object |
|||
| Name |
string |
资源名称。 |
SnapshotId |
| Value |
string |
资源 ID。 |
s-j6cdofbycydvg7ey**** |
示例
正常返回示例
JSON格式
{
"RequestId": "3D66C85C-AA97-4A00-B0ED-2D9A80FE782C",
"OperationProgressSet": {
"OperationProgress": [
{
"ErrorMsg": "testErrorMsg",
"ErrorCode": "400",
"OperationStatus": "Success",
"RelatedItemSet": {
"RelatedItem": [
{
"Name": "SnapshotId",
"Value": "s-j6cdofbycydvg7ey****"
}
]
}
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | DiskCategory.OperationNotSupported | The operation is not supported to the specified disk due to its disk category. | 由于磁盘种类限制,指定的磁盘不支持该操作。 |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | 通过“DryRun”校验,您的请求已通过验证。 |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. | |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | InstanceLockedForSecurity | The instance is locked due to security. | 您的资源被安全锁定,拒绝操作。 |
| 403 | InvalidParameter.Mismatch | The specified snapshot is not created from the specified disk. | |
| 403 | InvalidSnapshot.TooOld | The snapshotId is created before 2013-07-15, it cannot be restored since the first time the disk detached. | 创建于2013年7月15日之前的快照不支持此操作。 |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | OperationDenied | The specified snapshot dees not support ResetDisk. | |
| 403 | InvalidSnapshotId.NotReady | The specified snapshot has not completed yet. | |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | InvalidAccountStatus.SnapshotServiceUnavailable | Snapshot service has not been opened yet. | 快照服务未开通,操作无法执行。 |
| 403 | Operation.Conflict | The operation may conflicts with others. | |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | 您不在磁盘白名单中,请加入白名单后重试。 |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK needs to be added ECS tag. | CMK 未授权 |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service have no right to access your KMS. | ECS 服务无权访问您的 KMS。 |
| 403 | IncorrectDiskStatus.HasUnfinishedSnapshot | The current disk has unfinished snapshot. | 当前磁盘有未完成快照。 |
| 403 | InvalidRegion.NotSupport | The specified region does not support resetting disks. | |
| 403 | InvalidOperation.MultiAttachDisk | Multi attach disk does not support this operation. | 开启多重挂载特性的云盘不支持该操作。 |
| 403 | InvalidDisk.ShareVolume | The specified diskId is invalid. The shared volume does not support creating a snapshot group. | 指定的diskId无效,共享卷不支持创建快照组。 |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定的磁盘不存在。请您检查磁盘 ID 是否正确。 |
| 404 | Disk.NotFound | The specified disk does not exist. | 指定的磁盘不存在,请您检查磁盘是否正确。 |
| 404 | InvalidSnapshotId.NotFound | The specified SnapshotId does not exist. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | 指定的实例ID无效。 |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | 地域信息错误 |
| 404 | InvalidSnapshot.NotFound | The SnapshotId provided does not exist in our records. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。