All Products
Search
Document Center

ENS:ResetDisk

Last Updated:Mar 12, 2024

Rolls back a disk by using a snapshot.

Operation description

When you call this operation, take note of the following items:

  • The disk must be in the In Use (In_Use) or Unattached (Available) state.
  • The instance to which the disk is attached must be in the Stopped (Stopped) state. You can call the StopInstance operation to stop an instance.
  • The snapshot specified by the SnapshotId parameter must be created from the disk specified by the DiskId parameter.
  • When you call the DescribeInstance operation to query instance information, if the response contains {"OperationLocks": {"LockReason" : "security"}} for an instance, the instance is locked for security reasons and you cannot perform operations on the instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DiskIdstringYes

The ID of the disk that you want to roll back.

d-bp199lyny9b3****
SnapshotIdstringYes

The ID of the snapshot that you want to use to roll back the disk.

sp-bp199lyny9b3****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

C0003E8B-B930-4F59-ADC0-0E209A9012A8

Examples

Sample success responses

JSONformat

{
  "RequestId": "C0003E8B-B930-4F59-ADC0-0E209A9012A8"
}

Error codes

HTTP status codeError codeError messageDescription
400InstanceNotFoundThe input parameter instancdId that is not found.-
400NoPermissionPermission denied.-
400CallInterfaceCall Interface Happen Error.An error occurred when you call the operation.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-26The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change