Rolls back one or more disks by using an instance snapshot.

Description

Before you call this operation to roll back disks, you must understand the precautions of using instance snapshots to roll back disks. For more information, see Roll back a disk by using an instance snapshot.

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 No ResetDisks

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

RegionId String Yes cn-hangzhou

The ID of the region. You can call the DescribeRegions operation to query the most recent region list.

DryRun Boolean No false

Specifies whether to check the validity of the request without actually making the request. Valid values:

  • true: The validity of the request is checked but the request is not made. Check items include the required parameters, request format, and resource status limits. If the check fails, the corresponding error message is returned. If the check succeeds, the DryRunOperation error code is returned.
  • false: The validity of the request is checked. If the check succeeds, the request is made.

Default value: false.

Disk.N.SnapshotId String No s-j6cdofbycydvg7ey****

The ID of the snapshot contained in the instance snapshot for disk N. Valid values of N: 1 to 10.

Disk.N.DiskId String No d-j6cf7l0ewidb78lq****

The ID of disk N to be rolled back. Valid values of N: 1 to 10.

Response parameters

Parameter Type Example Description
RequestId String 3D66C85C-AA97-4A00-B0ED-2D9A80FE782C

The ID of the request.

OperationProgressSet Array of OperationProgress

Details about the rollback operation.

OperationProgress
ErrorMsg String testErrorMsg

The error message. This parameter is empty when the operation was successful.

For information about error codes and error messages, visit the API error center.

ErrorCode String 400

The error code. This parameter is empty when the operation was successful.

For information about error codes and error messages, visit the API error center.

OperationStatus String Success

Indicates whether the operation was successful.

If the operation was successful, a value of Success is returned. If the operation failed, an error code and an error message are returned.

RelatedItemSet Array of RelatedItem

Detail about the resources.

RelatedItem
Name String SnapshotId

The name of the resource.

Value String s-j6cdofbycydvg7ey****

The ID of the resource.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=ResetDisks
&RegionId=cn-hangzhou
&Disk.1.DiskId=d-j6cf7l0ewidb78lq****
&Disk.1.SnapshotId=s-j6cdofbycydvg7ey****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ResetDisksResponse>
    <RequestId>5C4160C1-C77D-4FD0-9C47-DB9FFA3D1220</RequestId>
    <OperationProgressSet>
        <OperationProgress>
            <OperationStatus>Success</OperationStatus>
            <ErrorMsg/>
            <RelatedItemSet>
                <RelatedItem>
                    <Value>s-j6cdofbycydvg7ey****</Value>
                    <Name>SnapshotId</Name>
                </RelatedItem>
                <RelatedItem>
                    <Value>d-j6cf7l0ewidb78lq****</Value>
                    <Name>DiskId</Name>
                </RelatedItem>
            </RelatedItemSet>
            <ErrorCode/>
        </OperationProgress>
    </OperationProgressSet>
</ResetDisksResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "5C4160C1-C77D-4FD0-9C47-DB9FFA3D1220",
  "OperationProgressSet" : {
    "OperationProgress" : [ {
      "OperationStatus" : "Success",
      "ErrorMsg" : "",
      "RelatedItemSet" : {
        "RelatedItem" : [ {
          "Value" : "s-j6cdofbycydvg7ey****",
          "Name" : "SnapshotId"
        }, {
          "Value" : "d-j6cf7l0ewidb78lq****",
          "Name" : "DiskId"
        } ]
      },
      "ErrorCode" : ""
    } ]
  }
}

Error codes

HTTP status code Error code Error message Description
400 DiskCategory.OperationNotSupported The operation is not supported to the specified disk due to its disk category The error message returned because the specified disk category does not support this operation.
400 InvalidRegionId.MalFormed The specified RegionId is not valid The error message returned because the specified RegionId parameter is invalid.
400 DryRunOperation Request validation has been passed with DryRun flag set. The error message returned because your request is determined as valid when the DryRun flag is set to true.
403 IncorrectDiskStatus The current disk status does not support this operation. The error message returned because the operation is not supported while the disk is in the current state. Make sure that the disk is available and you have no overdue payments for it.
403 IncorrectInstanceStatus The current status of the resource does not support this operation. The error message returned because the operation is not supported while the resource is in the current state.
403 InstanceLockedForSecurity The instance is locked due to security. The error message returned because the operation is not supported while the instance is locked for security reasons.
403 InvalidParameter.Mismatch The specified snapshot is not created from the specified disk. The error message returned because an encrypted snapshot cannot be used to roll back an unencrypted disk.
403 InvalidSnapshot.TooOld The snapshotId is created before 2013-07-15, it cannot be restored since the first time the disk detached. The error message returned because snapshots created before July 15, 2013 do not support this operation.
403 InstanceExpiredOrInArrears The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). The error message returned because the subscription instance has expired. Renew the instance and try again.
403 OperationDenied The specified snapshot dees not support ResetDisk. The error message returned because the specified snapshot does not support this operation.
403 InvalidSnapshotId.NotReady The specified snapshot has not completed yet. The error message returned because the specified snapshot is being created.
403 InvalidAccountStatus.NotEnoughBalance Your account does not have enough balance. The error message returned because your account balance is insufficient. Add funds to your account and try again.
403 InvalidAccountStatus.SnapshotServiceUnavailable Snapshot service has not been opened yet. The error message returned because the operation is not supported while the snapshot service is not activated.
403 Operation.Conflict The operation may conflicts with others. The error message returned because the operation conflicts with other operations.
403 UserNotInTheWhiteList The user is not in disk white list. The error message returned because you are not authorized to manage the disk. Try again when you are authorized.
403 InvalidParameter.KMSKeyId.CMKNotEnabled The CMK needs to be enabled. The error message returned because the customer master key (CMK) is not enabled when a KMS key ID is specified for a disk. You can call the DescribeKey operation of KMS to query the information of the specified CMK.
403 InvalidParameter.KMSKeyId.KMSUnauthorized ECS service have no right to access your KMS. The error message returned because Elastic Compute Service (ECS) is not authorized to access your KMS resources.
403 InvalidOperation.MultiAttachDisk Multi attach disk does not support this operation. The error message returned because the disk that has the multi-attach feature enabled does not support the operation.
404 InvalidDiskId.NotFound The specified disk does not exist. The error message returned because the specified DiskId parameter does not exist. Check whether the disk ID is correct.
404 Disk.NotFound The specified disk does not exist. The error message returned because the specified DiskId parameter does not exist. Check whether the disk ID is correct.
404 InvalidSnapshotId.NotFound The specified SnapshotId does not exist. The error message returned because the specified SnapshotId parameter does not exist. Check whether the snapshot ID is correct.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The error message returned because the specified InstanceId parameter does not exist. Check whether the instance ID is correct.
500 InternalError The request processing has failed due to some unknown error. The error message returned because an internal error has occurred. Try again later. If the error persists, submit a ticket.
500 InternalError The request processing has failed due to some unknown error, exception or failure. The error message returned because an internal error has occurred. Try again later. If the error persists, submit a ticket.

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