All Products
Search
Document Center

Elastic Compute Service:ResetDisks

Last Updated:Apr 16, 2026

Roll back cloud disks from an instance snapshot.

Operation description

This API is deprecated. Use ResetDisk to roll back cloud disks.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:ResetDisks

update

*Disk

acs:ecs:{#regionId}:{#accountId}:disk/{#diskId}

*Snapshot

acs:ecs:{#regionId}:{#accountId}:snapshot/{#snapshotId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID. You can call the DescribeRegions operation to view the latest list of regions.

cn-hangzhou

DryRun

boolean

No

Specifies whether to perform a dry run. Valid values:

  • true: performs a dry run to check the request without rolling back the disks. The dry run checks whether the request parameters are valid, the request format is correct, and the resources are available. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.

  • false: sends the request. If the request passes the check, the disks are rolled back.

Default value: false.

false

Disk

array<object>

Yes

The disks to roll back. You can specify up to 10 disks.

object

No

SnapshotId

string

No

The ID of the snapshot used to roll back the disk.

s-j6cdofbycydvg7ey****

DiskId

string

No

The ID of the disk to roll back.

d-j6cf7l0ewidb78lq****

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

3D66C85C-AA97-4A00-B0ED-2D9A80FE782C

OperationProgressSet

object

OperationProgress

array<object>

An array containing the rollback status of one or more cloud disks.

array<object>

ErrorMsg

string

The error message. This parameter is empty if the rollback is successful.

For error codes and error messages, see the Error Center.

testErrorMsg

ErrorCode

string

The error code. This parameter is empty if the rollback is successful.

For error codes and error messages, see the Error Center.

400

OperationStatus

string

The result of the operation. A value of Success is returned if the operation is successful. If the operation fails, refer to ErrorCode and ErrorMsg for error details.

Success

RelatedItemSet

object

RelatedItem

array<object>

A list of related resources.

object

Name

string

The type of the resource identifier.

SnapshotId

Value

string

The resource ID.

s-j6cdofbycydvg7ey****

Examples

Success response

JSON format

{
  "RequestId": "3D66C85C-AA97-4A00-B0ED-2D9A80FE782C",
  "OperationProgressSet": {
    "OperationProgress": [
      {
        "ErrorMsg": "testErrorMsg",
        "ErrorCode": "400",
        "OperationStatus": "Success",
        "RelatedItemSet": {
          "RelatedItem": [
            {
              "Name": "SnapshotId",
              "Value": "s-j6cdofbycydvg7ey****"
            }
          ]
        }
      }
    ]
  }
}

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 specified disk category does not support this operation.
400 InvalidRegionId.MalFormed The specified RegionId is not valid.
400 DryRunOperation Request validation has been passed with DryRun flag set. Your request is determined as valid when the DryRun parameter is set.
500 InternalError The request processing has failed due to some unknown error.
403 IncorrectDiskStatus The current disk status does not support this operation.
403 IncorrectInstanceStatus The current status of the resource does not support this operation.
403 InstanceLockedForSecurity The instance is locked due to security. 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.
403 InvalidSnapshot.TooOld The snapshotId is created before 2013-07-15, it cannot be restored since the first time the disk detached. 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).
403 OperationDenied The specified snapshot dees not support ResetDisk.
403 InvalidSnapshotId.NotReady The specified snapshot has not completed yet.
403 InvalidAccountStatus.NotEnoughBalance Your account does not have enough balance.
403 InvalidAccountStatus.SnapshotServiceUnavailable Snapshot service has not been opened yet. The operation is not supported while the snapshot service is not activated.
403 Operation.Conflict The operation may conflicts with others.
403 UserNotInTheWhiteList The user is not in disk white list. You are not authorized to manage the disk. Try again when you are authorized.
403 InvalidParameter.KMSKeyId.CMKUnauthorized The CMK needs to be added ECS tag.
403 InvalidParameter.KMSKeyId.CMKNotEnabled The CMK needs to be enabled.
403 InvalidParameter.KMSKeyId.KMSUnauthorized ECS service have no right to access your KMS. ECS is not authorized to access your KMS resources.
403 IncorrectDiskStatus.HasUnfinishedSnapshot The current disk has unfinished snapshot.
403 InvalidRegion.NotSupport The specified region does not support resetting disks.
403 InvalidOperation.MultiAttachDisk Multi attach disk does not support this operation. Disks for which the multi-attach feature is enabled do not support the operation.
403 InvalidDisk.ShareVolume The specified diskId is invalid. The shared volume does not support creating a snapshot group. The specified diskId is invalid. The shared volume does not support creating a snapshot group.
404 InvalidDiskId.NotFound The specified disk does not exist. The specified disk does not exist. Check whether the disk ID is correct.
404 Disk.NotFound The specified disk does not exist. The specified disk does not exist. Check whether the disk ID is correct.
404 InvalidSnapshotId.NotFound The specified SnapshotId does not exist.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The specified instanceId is invalid.
404 InvalidRegionId.NotFound The RegionId provided does not exist in our records. Region information error
404 InvalidSnapshot.NotFound The SnapshotId provided does not exist in our records.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.