當(dāng)前僅支持對(duì)數(shù)據(jù)盤的擴(kuò)容操作。
只有數(shù)據(jù)盤類型為普通云盤、高效云盤、SSD 云盤,才可以進(jìn)行擴(kuò)容操作。
掛載在實(shí)例上的數(shù)據(jù)盤,只有實(shí)例為 Running 或者 Stopped 狀態(tài)時(shí),才可以進(jìn)行擴(kuò)容操作。
磁盤上如果正在執(zhí)行打快照的操作,則此時(shí)不允許進(jìn)行擴(kuò)容操作。
掛載在實(shí)例上的磁盤,在進(jìn)行擴(kuò)容操作后,需要在控制臺(tái)或者使用 Open API 重啟實(shí)例才能使擴(kuò)容生效。
擴(kuò)容僅做磁盤容量的擴(kuò)大,不做分區(qū)和文件系統(tǒng)的擴(kuò)大,擴(kuò)容完成后,用戶還需要手動(dòng)分配存儲(chǔ)空間。
請(qǐng)求參數(shù)
名稱
類型
是否必須
描述
Action
String
是
系統(tǒng)規(guī)定參數(shù),取值:ResizeDisk
DiskId
String
是
磁盤的編號(hào)
NewSize
Integer
是
希望擴(kuò)容到的磁盤大小。
以 GB 為單位,取值范圍為
Cloud:5 ~ 2000
ClientToken
String
否
用于保證請(qǐng)求的冪等性。由客戶端生成該參數(shù)值,要保證在不同請(qǐng)求間唯一,最大不值過 64 個(gè) ASCII 字符。
返回參數(shù)
全是公共返回參數(shù),詳見公共返回參數(shù)
錯(cuò)誤碼
錯(cuò)誤代碼
描述
Http 狀態(tài)碼
語義
InvalidDiskSize.TooSmall
Specified new disk size is less than the original disk size
403
指定的新磁盤容量比原磁盤容量小
InvalidParameter
The specified parameter "NewSize" is not valid.
403
指定的新磁盤容量超出了限制范圍
OperationDenied
The status of the disk or the instance that the disk is attaching with does not support the operation
403
磁盤或者磁盤所掛載的實(shí)例狀態(tài)不支持?jǐn)U容
OperationDenied
The type of the disk does not support the operation
403
磁盤類型不支持?jǐn)U容
InvalidDiskId.NotFound
The specified disk does not exist.
404
磁盤不存在
InvalidInstanceId.NotFound
The specified instance does not exist.
404
磁盤所掛載的實(shí)例不存在
InstanceExpiredOrInArrears
The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).
403
磁盤掛載的實(shí)例過期
示例
請(qǐng)求示例
https://ecs.aliyuncs.com/?Action=ResizeDisk
&DiskId=xxx
&NewSize=1024
&<公共請(qǐng)求參數(shù)>
返回示例
'XML'格式
F3CD6886-D8D0-4FEE-B93E-1B73239673DE
'JSON'格式
{
"RequestId": "F3CD6886-D8D0-4FEE-B93E-1B73239673DE"