技术员联盟提供win764位系统下载,win10,win7,xp,装机纯净版,64位旗舰版,绿色软件,免费软件下载基地!

当前位置:主页 > 教程 > 服务器类 >

阿里云如何使用回滚磁盘接口

来源:技术员联盟┆发布时间:2017-12-08 18:24┆点击:

  使用指定磁盘自身的快照回滚磁盘内容。

  实例状态必须为 Stopped 时,才可以执行此操作。

  磁盘状态必须为使用中(In_use)的状态,才能执行此操作。

  指定的 SnapshotId 必须是由 DiskId 创建的快照,否则报错。

  实例的 OperationLocks 中标记了 "LockReason" : "security" 的锁定状态,则报错。

  请求参数

名称 类型 是否必须 描述
Action   String     系统规定参数,取值:ResetDisk  
DiskId   String     指定的磁盘设备 ID  
SnapshotId   String     恢复磁盘的快照 ID  

  返回参数

  全是公共返回参数,详见公共返回参数

  错误码

错误代码 描述 Http 状态码 语义
MissingParameter   The input parameter "DiskId" that is mandatory for processing this request is not supplied.   400   DiskId 参数未指定  
MissingParameter   The input parameter "SnapshotId" that is mandatory for processing this request is not supplied.   400   SnapshotId 参数未指定  
InvalidDiskId.NotFound   The specified disk does not exist.   404   指定的磁盘不存在  
InvalidSnapshotId.NotFound   The specified snapshot does not exist.   404   指定的快照不存在  
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   指定的快照创建于 2013 年 7 月 15 日(含)之前,不能回滚磁盘  
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   指定的快照未完成  

  示例

  请求示例

  https://ecs.aliyuncs.com/?Action=ResetDisk

  &DiskId= d-23jbf2v5m

  &SnapshotId=s-snapshot1

  &<公共请求参数>

  返回示例

  XML格式

  

  F3CD6886-D8D0-4FEE-B93E-1B73239673DE

  

  JSON格式

  {

  "RequestId":"F3CD6886-D8D0-4FEE-B93E-1B73239673DE"