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

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

阿里云如何使用重新初始化磁盘接口

来源:技术员联盟┆发布时间:2017-12-09 00:33┆点击:

  重新初始化磁盘

  描述

  重新初始化磁盘到初始状态,磁盘状态必须为使用中(In_use)的状态,且实例状态必须为 Stopped 时,才能执行此操作。但是如果实例创建后在第一次启动前,挂载在其上的磁盘也不能重新初始化。

  调用此接口,磁盘恢复到创建时的初始状态,即:

  如果为数据盘且是直接创建的空盘,则初始化到空盘状态

  如果为数据盘且是通过快照创建的,则初始化到快照状态

  如果为系统盘,则初始化到镜像的初始状态

  请求参数

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

  返回参数

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

  错误码

错误代码 描述 Http 状态码 语义
MissingParameter   The input parameter "DiskId" that is mandatory for processing this request is not supplied.   400   DiskId 未指定  
InvalidDiskId.NotFound   The specified disk 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   指定的实例被安全锁定  
InvalidSnapshot.TooOld   The disk is created from a snapshotId made before 2013-07-15, it cannot be re-initiated the specified disk any more since the detached first time.   403   指定磁盘的源快照创建于 2013 年 7 月 15 日(含)之前,不能重新初始化  
InvalidSourceSnapshot   The snapshot which is used to create the specified disk has been deleted.   403   指定磁盘的源快照已被删除,不能重新初始化  
InstanceExpiredOrInArrears   The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).   403   指定的实例已欠费  
DiskCreatingSnapshot   The operation is denied due to a snapshot of the specified disk is not completed yet.   403   指定的磁盘正在创建快照  
IncorrectDiskStatus.NeverUsed   The specified disk has never been used after creating.   403   磁盘创建后未被使用,内容没有变化  

  示例

  请求示例

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

  &DiskId=d-23jbf2v5m

  &<公共请求参数>

  返回示例

  XML格式

  

  F3CD6886-D8D0-4FEE-B93E-1B73239673DE

  

  JSON格式

  {

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