调用ResetDisks通过实例快照回滚一个或多个云盘。
接口说明
该接口即将废弃,建议您使用 ResetDisk 回滚云盘。调用前,请确保待回滚云盘所挂载的 ECS 实例处于已停止(Stopped)状态。
调试
您可以在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 disk category of the specified disk does not support the current operation. Please check the operations supported by the disk category and try again. | |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. Please verify the format of RegionId or call DescribeRegions to query the supported regions and try again. | 指定的RegionId不合法。请检查RegionId格式或调用DescribeRegions查询支持的地域后重试。 |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | 通过“DryRun”校验,您的请求已通过验证。 |
| 500 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. | |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. Please ensure the disk is in the In_use state and try again. | |
| 403 | IncorrectInstanceStatus | The current status of the instance does not support this operation. Please ensure the instance is in the Stopped state and try again. | |
| 403 | InstanceLockedForSecurity | Operation failed because the instance attached to this disk is locked for security reasons. Please open a ticket to contact our security team if you have any questions. | |
| 403 | InvalidParameter.Mismatch | The specified snapshot is not created from the specified disk. | |
| 403 | InvalidSnapshot.TooOld | The snapshot was created before 2013-07-15 and cannot be restored since the disk was first detached. | |
| 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 is still being created. Please wait until the snapshot creation completes and try again. | |
| 403 | InvalidAccountStatus.SnapshotServiceUnavailable | The snapshot service has not been activated. Please activate it and try again. | |
| 403 | Operation.Conflict | The resource is currently busy with a conflicting operation. Please wait for it to complete and try again. | |
| 403 | UserNotInTheWhiteList | The current account is not in the allowlist for this operation. Please submit a ticket to apply for access. | |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK has not authorized the ECS service to perform the KMS TagResource and UntagResource operations. Please verify the authorization and try again. | |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The specified KMS key must be in an enabled state. Please enable the key in the KMS console and try again. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service does not have permission to access your KMS key. Please verify that the specified KMS key has authorized the ECS service. | |
| 403 | IncorrectDiskStatus.HasUnfinishedSnapshot | The specified disk has an unfinished snapshot. Please wait for the snapshot creation to complete and try again. | |
| 403 | InvalidRegion.NotSupport | The specified region does not support resetting disks. | |
| 403 | InvalidOperation.MultiAttachDisk | The specified multi-attach disk does not support the current operation. Please select another disk and try again. | |
| 403 | InvalidDisk.ShareVolume | The specified shared disk does not support this operation. Please remove the shared volume from the specified disks and try again. | |
| 403 | InvalidAccountStatus.NotEnoughBalance | The operation is not allowed due to an overdue payment or insufficient balance. Please top up your account in the Billing Management console and try again. | 您的账户已欠费或余额不足,请前往费用中心充值后重试。 |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. Please verify Disk.N.DiskId and the current region and try again. | |
| 404 | Disk.NotFound | The specified disk does not exist. Please verify Disk.N.DiskId and the current region and try again. | |
| 404 | InvalidSnapshotId.NotFound | The specified Disk.N.SnapshotId does not exist. Please verify the Disk.N.SnapshotId and the current region and try again. | |
| 404 | InvalidInstanceId.NotFound | The instance to which the specified disk is attached does not exist. Please verify Disk.N.DiskId and the current region and try again. | |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist. Please call DescribeRegions to query the supported regions and try again. | |
| 404 | InvalidSnapshot.NotFound | The specified Disk.N.SnapshotId does not exist. Please verify the Disk.N.SnapshotId and the current region and try again. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。