ResetDisk_云服务器 ECS_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

调用该接口前,请您仔细阅读使用快照回滚云盘

调用该接口时,您需要注意:

  • 云盘的状态必须为使用中(In_Use)或空闲(Available)的状态。
  • 云盘挂载的实例的状态必须为已停止(Stopped)。您可以调用 StopInstances 停止实例。
  • 指定的参数SnapshotId必须是由DiskId创建的历史快照。
  • 通过 DescribeInstances 查询 ECS 实例信息时,如果返回数据中包含{"OperationLocks": {"LockReason" : "security"}},则禁止一切操作。

流控信息

请求速率为500/60(s)。更多流控信息,请前往配额中心查看

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
ecs:ResetDisk
Update
Disk
acs:ecs:{#regionId}:{#accountId}:disk/{#diskId}
Snapshot
acs:ecs:{#regionId}:{#accountId}:snapshot/{#snapshotId}

请求参数

字段名称字段详情
DiskIdstring

待回滚的云盘 ID。

示例值:d-bp199lyny9b3****参考取值来源:
    CreateDisk
    DescribeDisks
SnapshotIdstring

需要回滚的云盘某一阶段的历史快照 ID。

示例值:s-bp199lyny9b3****参考取值来源:
    CopySnapshot
    CreateSnapshot
    DescribeSnapshots
DryRunboolean

是否预检本次请求。取值范围:展开详情

示例值:false

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:F3CD6886-D8D0-4FEE-B93E-1B732396****

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
DiskCategory.OperationNotSupported
The operation is not supported to the specified disk due to its disk category.诊断
400
InvalidRegionId.MalFormed
The specified RegionId is not valid.诊断
400
DryRunOperation
Request validation has been passed with DryRun flag set.诊断
400
InternalError
The requested services is not available now. Please try again later.诊断
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.诊断
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.诊断
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.诊断
403
Operation.Conflict
The operation may conflicts with others.诊断
403
UserNotInTheWhiteList
The user is not in disk white list.诊断
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.诊断
403
IncorrectDiskStatus.HasUnfinishedSnapshot
The current disk has unfinished snapshot.诊断
403
InvalidOperation.DiskResetInProgress
The operation cannot be performed because the disk has an ongoing reset task, please try again later.诊断
404
InvalidParameter.KMSKeyId.NotFound
The specified KMSKeyId does not exist.诊断
404
InvalidDiskId.NotFound
The specified disk does not exist.诊断
404
Disk.NotFound
The specified disk does not exist.诊断
404
InvalidSnapshotId.NotFound
The specified SnapshotId does not exist.诊断
404
InvalidInstanceId.NotFound
The specified InstanceId does not exist.诊断
500
InternalError
The request processing has failed due to some unknown error.诊断

变更历史

变更时间变更内容概要操作
2025-03-21
变更错误码400
2024-11-23
变更错误码403
2023-08-25
变更错误码400
变更错误码403
2021-06-02
变更错误码404
2024年08月20日