技術員聯(lián)盟提供win764位系統(tǒng)下載,win10,win7,xp,裝機純凈版,64位旗艦版,綠色軟件,免費軟件下載基地!

當前位置:主頁 > 教程 > 服務器類 >

阿里云如何使用回滾磁盤接口

來源:技術員聯(lián)盟┆發(fā)布時間:2017-12-08 18:24┆點擊:

  使用指定磁盤自身的快照回滾磁盤內容。

  實例狀態(tài)必須為 Stopped 時,才可以執(zhí)行此操作。

  磁盤狀態(tài)必須為使用中(In_use)的狀態(tài),才能執(zhí)行此操作。

  指定的 SnapshotId 必須是由 DiskId 創(chuàng)建的快照,否則報錯。

  實例的 OperationLocks 中標記了 "LockReason" : "security" 的鎖定狀態(tài),則報錯。

  請求參數(shù)

名稱 類型 是否必須 描述
Action   String     系統(tǒng)規(guī)定參數(shù),取值:ResetDisk  
DiskId   String     指定的磁盤設備 ID  
SnapshotId   String     恢復磁盤的快照 ID  

  返回參數(shù)

  全是公共返回參數(shù),詳見公共返回參數(shù)

  錯誤碼

錯誤代碼 描述 Http 狀態(tài)碼 語義
MissingParameter   The input parameter "DiskId" that is mandatory for processing this request is not supplied.   400   DiskId 參數(shù)未指定  
MissingParameter   The input parameter "SnapshotId" that is mandatory for processing this request is not supplied.   400   SnapshotId 參數(shù)未指定  
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   磁盤狀態(tài)不正確  
IncorrectInstanceStatus   The current status of the resource does not support this operation.   403   指定的實例狀態(tài)不正確  
InstanceLockedForSecurity   The instance is locked due to security.   403   指定的實例被安全鎖定  
InvalidParameter.Mismatch   The specified snapshot is not created from the specified disk.   403   指定的快照不是創(chuàng)建自指定的磁盤  
InvalidSnapshot.TooOld   The snapshotId is created before 2013-07-15, it cannot be restored since the first time the disk detached.   403   指定的快照創(chuàng)建于 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

  &<公共請求參數(shù)>

  返回示例

  XML格式

  

  F3CD6886-D8D0-4FEE-B93E-1B73239673DE

  

  JSON格式

  {

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