呼叫ResetDisks透過執行個體快照回滾一個或多個雲端硬碟。
介面說明
該介面即將棄用,建議您使用 ResetDisk 回滾雲端硬碟。呼叫前,請確保待回滾雲端硬碟所掛載的 ECS 執行個體處於已停止(Stopped)狀態。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:ResetDisks |
update |
*Disk
*Snapshot
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
地域 ID。您可以呼叫 DescribeRegions 查看最新的阿里雲地域清單。 |
cn-hangzhou |
| DryRun |
boolean |
否 |
是否預檢本次請求。取值範圍:
預設值:false。 |
false |
| Disk |
array<object> |
是 |
雲端硬碟清單。 |
|
|
object |
否 |
|||
| SnapshotId |
string |
否 |
執行個體快照中,指定雲端硬碟對應的快照 ID。N 的取值範圍為 1~10。 |
s-j6cdofbycydvg7ey**** |
| DiskId |
string |
否 |
指定待回滾的雲端硬碟 ID。N 的取值範圍為 1~10。 |
d-j6cf7l0ewidb78lq**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
3D66C85C-AA97-4A00-B0ED-2D9A80FE782C |
| OperationProgressSet |
object |
||
| OperationProgress |
array<object> |
回滾一個或多個雲端硬碟時的操作狀態資訊合集。 |
|
|
array<object> |
|||
| ErrorMsg |
string |
錯誤資訊。回滾成功時返回空值。 錯誤碼和錯誤資訊,請參見錯誤中心。 |
testErrorMsg |
| ErrorCode |
string |
錯誤碼。回滾成功時返回空值。 錯誤碼和錯誤資訊,請參見錯誤中心。 |
400 |
| OperationStatus |
string |
操作是否成功。 成功返回 Success,失敗返回 ErrorCode 和 ErrorMsg 資訊。 |
Success |
| RelatedItemSet |
object |
||
| RelatedItem |
array<object> |
資源資訊。 |
|
|
object |
|||
| Name |
string |
資源名稱。 |
SnapshotId |
| Value |
string |
資源 ID。 |
s-j6cdofbycydvg7ey**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "3D66C85C-AA97-4A00-B0ED-2D9A80FE782C",
"OperationProgressSet": {
"OperationProgress": [
{
"ErrorMsg": "testErrorMsg",
"ErrorCode": "400",
"OperationStatus": "Success",
"RelatedItemSet": {
"RelatedItem": [
{
"Name": "SnapshotId",
"Value": "s-j6cdofbycydvg7ey****"
}
]
}
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 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. | 通過「DryRun」檢查,您的請求已通過驗證。 |
| 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. | 磁碟掛載的執行個體因安全原因被鎖定。 |
| 403 | InvalidParameter.Mismatch | The specified snapshot is not created from the specified disk. | |
| 403 | InvalidSnapshot.TooOld | The snapshot was created before 2013-07-15 and cannot be restored since the disk was first 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 conflict with others. Please retry later. | |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | 使用者不在共享區塊儲存白名單中,請您提交工單申請白名單。 |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK has not authorized the ECS service to perform the KMS TagResource and UntagResource operations. Please verify the authorization and try again. | |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service does not have permission to access your KMS key. Please verify that the specified KMS key has authorized the ECS service. | |
| 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. | 開啟多重掛載特性的雲端硬碟不支援該操作。 |
| 403 | InvalidDisk.ShareVolume | The specified diskId is invalid. The shared volume does not support creating a snapshot group. | 指定的diskId無效,共用磁碟區不支援建立快照群組。 |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定的磁碟不存在。請您檢查磁碟 ID 是否正確。 |
| 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. | 指定的執行個體不存在,請您檢查執行個體 ID 是否正確。 |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | 指定的 RegionId 不存在,請您檢查此產品在該地域是否可用。 |
| 404 | InvalidSnapshot.NotFound | The SnapshotId provided does not exist in our records. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。