Rolls back a cloud disk to a specific previous state by using a snapshot.
Operation description
Before you call this operation, read Roll back a cloud disk by using a snapshot carefully.
When you call this operation, note the following items:
The cloud disk must be in the in use (
In_use) or available (Available) state.The instance to which the cloud disk is attached must be in the stopped (
Stopped) state. You can call StopInstances to stop the instance.The specified
SnapshotIdparameter must be a snapshot created from the cloud disk specified byDiskId.When you call DescribeInstances to query ECS instance information, if the response contains
{"OperationLocks": {"LockReason" : "security"}}, no operations are allowed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ResetDisk |
update |
*Disk
*Snapshot
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DiskId |
string |
Yes |
The ID of the cloud disk to be rolled back. |
d-bp199lyny9b3**** |
| SnapshotId |
string |
Yes |
The ID of the snapshot to which the cloud disk is rolled back. |
s-bp199lyny9b3**** |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run on the request. Valid values:
Default value: false. |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
F3CD6886-D8D0-4FEE-B93E-1B732396**** |
Examples
Success response
JSON format
{
"RequestId": "F3CD6886-D8D0-4FEE-B93E-1B732396****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. | |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | Your request is determined as valid when the DryRun parameter is set. |
| 400 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. | |
| 400 | InvalidSnapshotId.Malformed | The specified SnapshotId is not valid. Please verify the format of SnapshotId and try again. | |
| 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 | InvalidOperation.DiskResetInProgress | The operation cannot be performed because the disk has an ongoing reset task. Please try again later. | |
| 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. | Your account balance is insufficient. Top up your account before you perform this operation. |
| 403 | IncorrectDiskStatus.Transferring | The specified device is currently being transferred. Please try again after the transfer is complete. | |
| 404 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. Please verify that the key ID is correct and that the key resides in the current region. | |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. Please verify the DiskId and the current region and try again. | |
| 404 | Disk.NotFound | The specified DiskId does not exist. Please verify the DiskId and the current region and try again. | |
| 404 | InvalidSnapshotId.NotFound | The specified SnapshotId does not exist. Please verify the 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 the DiskId and the current region and try again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.