調用ReInitDisk重新初始化一塊磁盤到創建時的初始狀態。
調試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
授權信息
當前API暫無授權信息透出。
請求參數
名稱 | 類型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DiskId | string | 是 | 指定的磁盤 ID。 | d-bp67acfmxazb4ph**** |
Password | string | 否 | 重新初始化系統盤時,是否重置 ECS 實例的用戶名密碼。長度為 8 至 30 個字符,必須同時包含大小寫英文字母、數字和特殊符號中的三類字符。特殊符號可以是:
其中,Windows 實例不能以斜線號(/)為密碼首字符。 說明
如果傳入 Password 參數,建議您使用 HTTPS 協議發送請求,避免密碼泄露。
| EcsV587! |
KeyPairName | string | 否 | 密鑰對名稱。 說明
該參數僅適用于 Linux 實例。重新初始化系統盤時,您可以為 ECS 實例綁定一個 SSH 密鑰對,作為登錄憑證。使用了 SSH 密鑰對后,用戶名密碼的登錄憑證方式將被禁用。
| testKeyPairName |
AutoStartInstance | boolean | 否 | 重新初始化磁盤后,是否自動啟動實例。 默認值:false。 | true |
SecurityEnhancementStrategy | string | 否 | 當指定的云盤為系統盤時,重新初始化云盤后是否免費使用云安全中心服務。取值范圍:
默認值:Deactive。 | Active |
返回參數
示例
正常返回示例
JSON
格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
錯誤碼
HTTP status code | 錯誤碼 | 錯誤信息 | 描述 |
---|---|---|---|
400 | LoginAsNonRoot.ImageNotSupport | The specified image does not support login as non-root. | 此鏡像不支持NonRoot登錄。 |
400 | DiskHasSnapshotsWithInstantAccessEnabled.OperationNotSupported | The operation is not supported to the specified disk that have snapshots with InstantAccess enabled. | - |
400 | InvalidPassword.Malformed | The specified parameter "Password" is not valid. | - |
400 | InvalidKeyPairName.NotFound | The specified KeyPairName does not exist. | 指定的 KeyPairName 不存在。 |
400 | DependencyViolation.IoOptimize | The specified parameter InstanceId is not valid. | 指定的實例 IO 優化配置不合法。 |
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. | 指定的地域不存在,請檢查該參數是否正確。 |
403 | LoginAsNonRoot.RegionNotSupport | The specified region does not support login as non-root. | - |
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 | 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. | 創建于2013年7月15日之前的快照不支持此操作。 |
403 | OperationDenied | 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 | InvalidSourceSnapshot | The snapshot which is used to create the specified disk has been deleted. | 用于創建指定磁盤的快照已被刪除。 |
403 | SharedImageDeleted | The specified image by others shared is deleted. | 指定的共享鏡像已刪除。 |
403 | DependencyViolation.WindowsInstance | The instance creating is windows, cannot use ssh key pair to login. | - |
403 | UserNotInTheWhiteList | The user is not in volume white list. | 用戶不在共享塊存儲白名單中,請您提交工單申請白名單。 |
403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | 加密云盤設置了 KMSKeyId 后,CMK必須處于啟用狀態。您可以調用密鑰管理服務的 DescribeKey 接口查詢指定CMK的相關信息。 |
403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service have no right to access your KMS. | ECS 服務無權訪問您的 KMS。 |
403 | HibernationConfigured.InstanceOperationForbidden | The operation is not permitted due to limit of the hibernation configured instance. | 不符合開啟休眠選項的實例的相關限制,操作不被允許。 |
403 | InvalidOperation.MultiAttachDisk | Multi attach disk does not support this operation. | 開啟多重掛載特性的云盤不支持該操作。 |
403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK needs to be added ECS tag. | CMK 未授權 |
404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定的磁盤不存在。請您檢查磁盤 ID 是否正確。 |
404 | InvalidImageId.NotFound | The specified ImageId does not exist. | 指定的鏡像在該用戶賬號下不存在,請您檢查鏡像 ID 是否正確。 |
404 | InvalidDiskId.OperationNotSupported | The operation is not supported due to image not exist. | 指定的鏡像不存在。 |
500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 內部錯誤,請重試。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
變更時間 | 變更內容概要 | 操作 |
---|---|---|
2023-08-25 | OpenAPI 錯誤碼發生變更 | 查看變更詳情 |
2021-06-18 | OpenAPI 錯誤碼發生變更 | 查看變更詳情 |