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
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DiskId | string | Yes | The ID of the disk that you want to roll back. | d-bp199lyny9b3**** |
SnapshotId | string | Yes | The ID of the snapshot that you want to use to roll back the disk. | sp-bp199lyny9b3**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "C0003E8B-B930-4F59-ADC0-0E209A9012A8"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InstanceNotFound | The input parameter instancdId that is not found. | - |
400 | NoPermission | Permission denied. | - |
400 | CallInterface | Call Interface Happen Error. | An error occurred when you call the operation. |
400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-12-26 | The Error code has changed | View Change Details |