Rolls back a disk by using a snapshot.

Description

  • You can call this operation to roll back a disk only when the associated simple application server is in the Stopped state.
  • After a disk is rolled back, all data changes made from when the snapshot was created to when the disk is rolled back are lost. Back up disk data based on your needs before you roll back the disk.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ResetDisk

The operation that you want to perform. Set the value to ResetDisk.

DiskId String Yes d-bp14wq0149cpp2xy****

The ID of the disk to be rolled back.

RegionId String Yes cn-hangzhou

The region ID of the simple application server to which the snapshot corresponds.

SnapshotId String Yes s-bp16oazlsold4dks****

The ID of the snapshot.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The ClientToken value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

Response parameters

Parameter Type Example Description
RequestId String 20758A-585D-4A41-A9B2-28DA8F4F534F

The ID of the request.

Examples

Sample requests

https://swas.cn-hangzhou.aliyuncs.com/?Action=ResetDisk
&DiskId=d-bp14wq0149cpp2xy****    
&SnapshotId=s-bp16oazlsold4dks****
&<Common request parameters>

Sample success responses

XML format

<ResetDiskResponse>
      <RequestId>20758A-585D-4A41-A9B2-28DA8F4F534F</RequestId>
</ResetDiskResponse>

JSON format

{
    "RequestId": "20758A-585D-4A41-A9B2-28DA8F4F534F"
}

Error codes

HTTP status code Error code Error message Description
404 InvalidDiskId.NotFound The specified DiskId does not exist. The error message returned because the specified DiskId parameter does not exist.
404 InvalidSnapshotId.NotFound The specified SnapshotId does not exist. The error message returned because the specified SnapshotId parameter does not exist.
500 InternalError An error occurred while processing your request. The error message returned because an internal error has occurred. Try again later. If the error persists, submit a ticket.
403 IncorrectInstanceStatus.ResetDisk Rolling back the disk requires the instance to operate in a stopped state. The error message returned because the simple application server is not in the Stopped state. The server must be stopped before its disks can be rolled back.

For a list of error codes, visit the API Error Center.