擴充一塊磁碟,支援擴充系統磁碟和資料磁碟。
介面說明
擴充前,請務必查詢雲端硬碟採用的分割區格式。如果是 MBR 格式,不支援擴充到 2 TiB 以上,否則會造成資料遺失。對於 MBR 分割區擴充,建議您重新建立並掛載一塊資料磁碟,採用 GPT 分割區格式後,再將現有資料複製至新的資料磁碟上。更多詳情,請參見擴充雲端硬碟容量。
-
支援擴充的磁碟類型包括普通雲端硬碟(
cloud)、高效能雲端硬碟(cloud_efficiency)、SSD 雲端硬碟(cloud_ssd)、ESSD 雲端硬碟(cloud_essd)、ESSD AutoPL 雲端硬碟(cloud_auto)、彈性臨時碟-標準版(elastic_ephemeral_disk_standard)和彈性臨時碟-進階版(elastic_ephemeral_disk_premium)、ESSD 同城冗餘雲端硬碟(cloud_regional_disk_auto)。 -
正在建立快照的雲端硬碟不支援擴充。請您等待快照建立完成後,再開始執行擴充操作。
-
該介面無法擴充分割區和檔案系統,您需要在擴充雲端硬碟容量後自行分配分割區和檔案系統,具體操作,請參見擴充分割區與檔案系統(Linux)和擴充分割區與檔案系統(Windows)。
-
開啟多重掛載特性的雲端硬碟支援線上擴充和離線擴充,請確保磁碟掛載的執行個體滿足以下條件:
線上擴充時,執行個體狀態為執行中(
Running)。離線擴充時,執行個體狀態為執行中(
Running)或已停止(Stopped)。
-
請確保雲端硬碟滿足以下條件:
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:ResizeDisk |
update |
*Disk
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| DiskId |
string |
是 |
磁碟 ID。您可以呼叫 DescribeDisks 查詢磁碟 ID。 |
d-bp67acfmxazb4p**** |
| Type |
string |
否 |
擴充磁碟的方式。取值範圍:
|
offline |
| NewSize |
integer |
是 |
希望擴充到的磁碟容量大小。單位為 GiB。取值範圍:
說明
指定的新磁碟容量必須比原磁碟容量大,否則呼叫介面將報錯。 |
1900 |
| ClientToken |
string |
否 |
保證請求冪等性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元,且不能超過 64 個字元。更多資訊,請參見如何保證冪等性。 |
123e4567-e89b-12d3-a456-426655440000 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| OrderId |
string |
產生的訂單 ID。 說明
僅在擴充包年包月雲端硬碟時會返回訂單 ID。 |
20413515388**** |
| RequestId |
string |
請求 ID。 |
F3CD6886-D8D0-4FEE-B93E-1B732396**** |
樣本
正常返回樣本
JSON格式
{
"OrderId": "20413515388****",
"RequestId": "F3CD6886-D8D0-4FEE-B93E-1B732396****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidDataDiskSize.ValueNotSupported | The specified DataDisk.n.Size is beyond the permitted range; or the capacity of the snapshot exceeds the size limit of the specified disk category. | |
| 400 | InvalidParameter.Conflict | %s | 目前操作不允許同時設定 diskId 和 imageId,請確保 diskId 或 imageId 有一個不為空。 |
| 400 | IncompleteParamter | Some fields can not be null in this request. | 請求中缺少參數。 |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 400 | InvalidParam.Type | The specified type is not supported. | 指定的參數 Type 無效。 |
| 400 | LastOrderProcessing | The previous order is still processing. Please try again later. | |
| 400 | InvalidStatus.Upgrading | The instance which the disk attachs is upgrading; please try again later. | |
| 400 | InvalidSystemDiskSize.ImageNotSupportResize | The image of the instance does not support resize. | |
| 400 | InvalidDisk.DetachedSystemDisk | The specified disk is a detached system disk. This operation is not supported. | |
| 400 | OperationDenied.NotEnoughCapacity | The capacity of the current dedicated block storage cluster is not enough to expand. | |
| 400 | IncorrectDiskStatus.ReplicationStatusNotFound | Disk replication status not found. | |
| 400 | IncorrectDiskStatus.InReplication | Disk already in replication. | |
| 400 | QuotaExceed.DiskCapacity | The used capacity of disk type has exceeded the quota in the zone, %s. | 指定磁碟類型的已用容量超出可用區配額限制,您可以前往配額中心查詢和申請提升磁碟容量配額。 |
| 400 | NoPermission.Price | The operation requires price permission. Please either apply for permission from your main account or set the parameter AutoPay to true. | |
| 400 | NoPermission.Refund | The operation requires refund permission. Please apply for permission from your main account. | 該帳號無權限操作退款,主帳號需要授權退款相關權限。 |
| 400 | InvalidOperation.InstanceRenewWithDowngradeInPlan | The operation is denied due to the specified instance has renew with downgrade record in plan. | 存在未生效的續費降配訂單。訂單生效前不允許此操作。 |
| 400 | InvalidSystemDiskSize.ValueNotSupported | The specified system disk size is invalid. | 指定的 SystemDisk.Size 不合法。 |
| 400 | OperationDenied.UnfinishedOrder | The current instance has an unfinished refund order. This operation is denied. | |
| 400 | AccountForbidden.CreateOrder | Order cannot be created due to abnormal account. | 目前帳號不允許建立訂單。 |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | InvalidDataDiskSize.ValueNotSupported | The specified DataDisk.n.Size is beyond the permitted range; or the capacity of the snapshot exceeds the size limit of the specified disk category. | |
| 403 | OperationDenied | The type of the disk does not support the operation. | 指定的 EIP 不可用或未獲授權。 |
| 403 | InvalidDiskSize.TooSmall | Specified new disk size is less than the original disk size. | |
| 403 | InvalidDiskSize.TooLarge | Specified new disk size is beyond the permitted range. | |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | DiskError | Incorrect disk status. | |
| 403 | DiskInArrears | The specified operation is denied because the disk has overdue payments. Please settle the outstanding balance. | |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | DiskCreatingSnapshot | The operation is denied due to a snapshot of the specified disk is not completed yet. | |
| 403 | InvalidDiskSize | Specified new disk size is less than or equal the original disk size. | 指定的新磁碟大小必須大於原始磁碟大小。 |
| 403 | Operation.Conflict | The operation may conflict with others. Please retry later. | |
| 403 | InstanceLockedForSecurity | The instance is locked due to security. | 該執行個體由於安全原因被鎖定,您可以聯絡安全技術支援。 |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. | |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | 使用者不在 Arn 相關參數操作清單中。 |
| 403 | InvalidDiskCategory.NotSupported | The specified disk category is not supported. | 指定的雲端硬碟類型在當前可用區不支援。請修改雲端硬碟類型或更換可用區並重試。 |
| 403 | InvalidRegion.NotSupport | The specified region does not support resize online. | 該地域不支援 BYOK。 |
| 403 | InvalidInstanceStatus.NotRunning | The status of instance to which the disk attachs must be running when resizing online. | 線上調整磁碟大小時,磁碟連接到的執行個體狀態必須為執行中。 |
| 403 | InvalidOperation.InstanceTypeNotSupportOnlineResize | The instance type of the specified instance does not support resize online. | |
| 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 | InstanceSpecModification.NotEffective | The instance which the disk attachs has been reserved for making a spec modification and not taken effective in the current contract period. | |
| 403 | InvalidDiskSize.NotSupportResizeOnline | The current size of the resource does not support resize online. | |
| 403 | SecurityRisk.3DVerification | We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email. | 我們偵測到您的預設信用卡或金融卡存在安全風險。請透過電子郵件中的連結進行驗證。 |
| 403 | QuotaExceeded.PostpaidDataDiskCapacity | The quota of postpaid data disk capacity exceeds. | 隨需付費資料磁碟使用容量超出配額。 |
| 403 | InvalidOperation.MultiAttachDiskNotSupportResizeOnline | Multi attach disk does not support resize online. | 開啟多重掛載特性的雲端硬碟不支援線上擴容。 |
| 403 | InvalidDataDiskCategory.ValueNotSupported | The specified Category of Data Disk is not valid. | 指定參數 DataDisk.Category 錯誤。 |
| 403 | InvalidDiskSize.NotSupportMultiAttachDisk | The specified disk size exceeds the maximum limit 65536 for enabling multi-attach. | 大於 64 TB 的磁碟不支援開啟多重掛載。 |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定的磁碟不存在。 |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | 指定的執行個體 ID 無效。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。