ResetDisk

Last Updated: Sep 13, 2017

Description

Roll back the disk content by using the snapshot of the disk.

  • The operation is only possible for instances in the Stopped status.
  • This operation is only possible when the disk status In_use.
  • The specified SnapshotId must be the snapshot of DiskId. Otherwise, an error will be returned.
  • If OperationLocks of the instance indicates LockReason: security, an error will be returned.

Request Parameters

Name Type Required Description
Action String Yes Required parameter, with a value: ResetDisk.
DiskId String Yes The ID of the specified disk device.
SnapshotId String Yes The snapshot ID of the disk to be restored.

Return Parameters

All are public return parameters. For details, see Public Return Parameters.

Error Code

Error Code Description Http status code Meaning
MissingParameter The input parameter DiskId that is mandatory for processing this request is not supplied. 400 The DiskId parameter not specified.
MissingParameter The input parameter SnapshotId that is mandatory for processing this request is not supplied. 400 The SnapshotId parameter not specified.
InvalidDiskId.NotFound The specified disk does not exist. 404 The specified disk does not exist.
InvalidSnapshotId.NotFound The specified SnapshotId does not exist. 404 The specified SnapshotId does not exist.
IncorrectDiskStatus The current disk status does not support this operation. 403 The disk status is incorrect.
IncorrectInstanceStatus The current status of the resource does not support this operation. 403 The status of the specified instance is incorrect.
InstanceLockedForSecurity The instance is locked due to security. 403 The specified instance has a safety lock.
InvalidParameter.Mismatch The specified snapshot is not created from the specified disk. 403 The specified snapshot is not a snapshot of the specified disk.
InvalidSnapshot.TooOld The snapshotId is created before 2013-07-15, it cannot be restored since the first time the disk detached. 403 The specified snapshot was created on or before July 15, 2013, so the disk cannot be rolled back.
InstanceExpiredOrInArrears The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). 403 The source snapshot of the specified disk has been deleted, so the disk cannot be reinitialized.
OperationDenied The specified snapshot dees not support ResetDisk. 403 The specified snapshot cannot be used for rollback.
InvalidSnapshotId.NotReady The specified snapshot has not completed yet. 403 The specified snapshot is not completed.

Examples

Request Example

  1. https://ecs.aliyuncs.com/?Action=ResetDisk
  2. &DiskId= d-23jbf2v5m
  3. &SnapshotId=s-snapshot1
  4. &<Public Request Parameters>

Return Example

XML format

  1. <ResetDiskResponse>
  2. <RequestId>F3CD6886-D8D0-4FEE-B93E-1B73239673DE</RequestId>
  3. </ResetDiskResponse>

JSON format

  1. {
  2. "RequestId":"F3CD6886-D8D0-4FEE-B93E-1B73239673DE"
  3. }
Thank you! We've received your feedback.