變更一塊雲端硬碟類型,或者修改一塊ESSD雲端硬碟的效能層級。ESSD同城冗餘雲端硬碟、普通雲端硬碟、彈性臨時盤和本地碟均不支援變更雲端硬碟類型。
介面說明
為了減少變更配置操作對您業務帶來的影響,請您在業務低峰期進行變更配置。
調用該介面時,您需要注意:
-
修改 ESSD 雲端硬碟效能層級:
-
訂用帳戶 ESSD 雲端硬碟僅支援升級效能層級。
-
隨用隨付 ESSD 雲端硬碟支援升級和降低效能層級,但不支援降配到 PL0。
-
ESSD 雲端硬碟的狀態必須是使用中(In_use)狀態或者待掛載(Available)狀態。
-
若 ESSD 雲端硬碟已掛載到 ECS 執行個體上,執行個體必須處於運行中(Running)狀態或者已停止(Stopped)狀態,不能處於到期或者帳號欠費狀態。
-
由於 ESSD 雲端硬碟效能層級受容量限制,如果您無法升級效能層級,可以擴容( ResizeDisk )後重新操作。更多資訊,請參見 ESSD 雲端硬碟。
-
-
變更一塊雲端硬碟類型的注意事項,請參見變更雲端硬碟類型。
-
不同類型的雲端硬碟支援變更配置的情況,請參見雲端硬碟支援變更配置情況。
雲端硬碟變更配置後,計費變化情況如下:
-
隨用隨付雲端硬碟:按照新的雲端硬碟類型計費。
-
訂用帳戶雲端硬碟:在計費周期內,會根據新舊配置的價格差和剩餘天數(從次日 0 點到有效期間結束)來計算應補繳的費用。
關於雲端硬碟的計費資訊,請參見Block Storage計費。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:ModifyDiskSpec |
update |
*Disk
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| DiskId |
string |
是 |
雲端硬碟的 ID。 |
d-bp131n0q38u3a4zi**** |
| PerformanceLevel |
string |
否 |
修改一塊 ESSD 雲端硬碟的效能層級。取值範圍:
預設值:PL1。 |
PL2 |
| DiskCategory |
string |
否 |
變更一塊雲端硬碟的類型。取值範圍:
預設值:空,表示不變更配置雲端硬碟。 說明
|
cloud_essd |
| DryRun |
boolean |
否 |
是否只預檢此次請求。取值範圍:
預設值:false。 |
false |
| ProvisionedIops |
integer |
否 |
是否修改 ESSD AutoPL 雲端硬碟預配置讀寫 IOPS。 取值範圍:0~min{50000, 1000*容量-基準效能}。 基準效能=min{1,800+50*容量, 50,000}。 說明
當 |
50000 |
| PerformanceControlOptions |
object |
否 |
磁碟效能控制參數集合。 |
|
| IOPS |
integer |
否 |
目標雲端硬碟 IOPS。僅支援修改專屬儲存叢集雲端硬碟 IOPS。 取值範圍:900~單盤最大 IOPS,步長 100。 更多資訊,請參見雲端硬碟效能。 |
2000 |
| Throughput |
integer |
否 |
目標雲端硬碟輸送量,僅支援修改專屬儲存叢集雲端硬碟輸送量,單位 MB/s。 取值範圍:60~單盤最大輸送量。 更多資訊,請參見雲端硬碟效能。 |
200 |
| Recover |
string |
否 |
重設雲端硬碟效能,僅支援專屬儲存叢集雲端硬碟。 設定該參數後,PerformanceControlOptions.IOPS 和 PerformanceControlOptions.Throughput 參數不生效。 目前僅支援設定為 All(重設雲端硬碟 IOPS 和輸送量到初始值)。 |
All |
| DestinationZoneId |
string |
否 |
說明
該參數正在邀測中,暫不支援使用。 |
cn-hangzhou-g |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TaskId |
string |
變更配置雲端硬碟的任務 ID。 說明
如果您只修改了一塊 ESSD 雲端硬碟的效能層級,則不會返回該參數。 |
t-bp67acfmxazb4p**** |
| OrderId |
string |
產生的訂單 ID。 說明
僅在變更或修改訂用帳戶雲端硬碟時會返回訂單 ID。 |
20413515388**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TaskId": "t-bp67acfmxazb4p****",
"OrderId": "20413515388****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidPerformanceLevel.Malformed | The specified parameter PerformanceLevel is not valid. | 指定的參數 PerformanceLevel 無效。 |
| 400 | InvalidDiskCategory.ValueNotSupported | The specified parameter "DiskCategory" is not valid. | 指定的參數雲端硬碟類型DiskCategory無效。 |
| 400 | InvalidPerformanceLevelParam.Mismatch | The specified parameter PerformanceLevel should be null when DiskCategory is not cloud_essd. | |
| 400 | OperationDenied.DiskInDedicatedBlockStorageCluster | The disk in dedicated block storage cluster is not allowed to do this operation. | |
| 400 | IncorrectDiskStatus.ReplicationStatusNotFound | Disk replication status not found. | |
| 400 | IncorrectDiskStatus.InReplication | Disk already in replication. | |
| 400 | ProvisionedIopsForDiskCategoryUnsupported | The specified disk category does not support provisioned iops. | 指定的磁碟類型不支援預配置IOPS。 |
| 400 | InvalidProvisionedIops.LimitExceed | The provisioned iops exceeds the limit. | 填寫的ProvisionedIops參數超限。 |
| 400 | QuotaExceed.DiskCapacity | The used capacity of disk type has exceeded the quota in the zone, %s. | 指定磁碟類型的已用容量超出可用性區域配額限制,您可以前往配額中心查詢和申請提升磁碟容量配額。 |
| 400 | MalformedParameter.PerformanceControlOptions | Parameter invalid, %s. | 參數不合法 |
| 400 | InvalidPerformanceControlOptions.ModifyOperationUnsupported | The specified performance control options are conflicts with disk category or performance level or ProvisionIOPS. | 磁碟效能控制參數與磁碟類型、磁碟效能等級、預配置IOPS參數衝突。 |
| 400 | NoPermission.Price | The operation requires price permission. Please either apply for permission from your main account, or set the parameter AutoPay as true. | 該操作需要價格許可權。請向您的主賬戶申請許可權,或將參數AutoPay設定為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 | InvalidOperation.InstanceStatusUnsupported | The specified instance status is not supported for this operation, expect status is Running or Stopped. | 指定的執行個體的狀態不滿足,執行個體的狀態須為 Running 或 Stopped。 |
| 400 | MissingParameter.DestinationZoneId | The parameter DestinationZoneId must be specified when modifying the disk specification from a regional disk to a zone disk. | 同城冗餘磁碟變更配置到可用性區域層級磁碟時,一定要指定 DestinationZoneId |
| 400 | InvalidDestinationZoneId.Mismatch | The specified DestinationZoneId of the regional disk with 'In-use' status should remain consistent with the ZoneId of instance. | 掛載中的同城冗餘磁碟執行變更配置操作,要求指定的 DestinationZoneId 必須和執行個體一致 |
| 400 | InvalidOperation.MultiAttachRegionalDiskUnsupported | The multi-attach regional disk with 'In-use' status attached to more than one instance is not allowed to modify disk spec. | 掛載中的多重掛載同城冗餘磁碟,要求磁碟僅能掛載到一台執行個體上,才能執行變更配置操作 |
| 400 | InvalidDestinationZoneId.DiskCategoryUnsupported | The specified disk category does not allow the DestinationZoneId parameter for this operation. | 該磁碟的磁碟類型不支援在變更配置時指定 DestinationZoneId |
| 400 | IncorrectInstanceStatus | The current status of the instance does not support this operation. | 當前執行個體狀態不支援此操作。 |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 內部錯誤,請重試。 |
| 403 | DiskInArrears | The specified operation is denied as your disk owing fee. | |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. | |
| 403 | DiskCreatingSnapshot | The operation is denied due to a snapshot of the specified disk is not completed yet. | |
| 403 | OperationDenied | The type of the disk does not support the operation. | 此磁碟種類不支援指定的操作。 |
| 403 | InvalidPerformanceLevel.TooLow | Specified new performance level is lower than the original performance level. | |
| 403 | OperationDenied.PerformanceLevelNotMatch | The specified PerformanceLevel and disk size do not match. | 指定的效能等級與磁碟大小不匹配。 |
| 403 | UserNotInTheWhiteList | The user is not in modify disk category white list. | |
| 403 | InvalidRegion.NotSupport | The specified region does not support modify disk category. | |
| 403 | InvalidDiskCategory.ValueNotSupported | The current disk category of the resource does not support this operation. | 指定的資源上的磁碟類型不支援此操作。 |
| 403 | Downgrade.NotSupported | Downgrade operation for prepay resource is not supported. | |
| 403 | InvalidInstanceType.NotSupportDiskCategory | The instanceType of the specified instance does not support this disk category. | 指定的執行個體規格(InstanceType)不支援當前執行個體的雲端硬碟類別。請嘗試更換其它執行個體規格。關於執行個體規格支援的雲端硬碟類型,請參見執行個體規格類型系列文檔。 |
| 403 | ModifyingDiskCategoryLimitExceed | The amount of modifying disk category exceeds the limit. | 當前地區正在變更配置的磁碟個數超過上限 |
| 403 | DiskInCoolingPeriod | There is a cooling period after the disk is successfully modified. | 雲端硬碟處於變更配置周期限制中,不可再次發起變更配置 |
| 403 | DiskHasFlashSnapshot | The specified disk with flash snapshots do not support modify disk category. | |
| 403 | NoChangeInDiskCategoryAndPerformanceLevel | There is no change between the parameters transmitted and the current. | 您所傳的磁碟種類和效能等級與當前磁碟一致 |
| 403 | OperationDenied.NoStock | The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. | 庫存不足。 |
| 403 | InvalidOperation.MultiAttachDisk | Multi attach disk does not support this operation. | 開啟多重掛載特性的雲端硬碟不支援該操作。 |
| 403 | OperationDenied.DiskExpansionUnfinished | The instance has not been restarted after a previous disk expansion. | |
| 403 | InvalidDiskCategory.NotSupported | The specified disk category is not supported. | 指定的雲端硬碟類型不支援當前操作。 |
| 403 | InvalidPerformanceParameter.DiskNotInDedicatedStorageCluster | The specified disk not in dedicated storage cluster, can not modify performance control options. | 非專屬儲存叢集磁碟不支援修改磁碟效能控制參數。 |
| 403 | InvalidStatus.DiskUnderPerformanceControl | The specified disk is under performance control, any modifications to the category or performance level of the specified disk are unsupported.. | 磁碟處於效能控制狀態,無法進行磁碟類型、效能等級變更。 |
| 403 | InvalidStatus.DiskNotReady | This specified disk is not ready, status needs to be either In_use or Available. | 指定磁碟的狀態必須是In_use或Available。 |
| 403 | InvalidOperation.DiskInReplicaPairsUnsupported | The disk in replication pairs does not support this operation. | 非同步複製對中的磁碟不支援當前操作。 |
| 403 | InvalidDisk.DetachedSystemDisk | The specified resource is/has a detached system disk %s , not support current operation. | 指定的磁碟是一塊被卸載的系統硬碟,不支援當前操作。 |
| 403 | InvalidDiskCategory.InstanceTypeUnsupported | The current instance type does not support the specified disk category. Please check the list of disk category supported by the instance type and select an appropriate disk category for configuration. | 當前執行個體類型不支援指定的磁碟類別。請檢查該執行個體類型支援的磁碟類型列表,並選擇合適的磁碟類別進行配置。 |
| 403 | InvalidOperation.CMKNotEnabled | The CMK (Customer Master Key) must be in an active state. | 主要金鑰必須處於啟用狀態。 |
| 403 | InvalidOperation.CMKUnauthorized | The CMK(Customer Master Key) lacks authorization to add tags to the ECS service. | 主要金鑰需要授權ECS服務添加標籤許可權。 |
| 403 | InstanceLockedForSecurity | The instance is locked for security reasons. Please contact Security Technical Support for assistance. | 該執行個體由於安全原因被鎖定,您可以聯絡安全支援人員。 |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定的磁碟不存在。請您檢查磁碟 ID 是否正確。 |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | 指定的執行個體ID無效。 |
| 404 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 404 | InvalidDiskCategory.ValueUnauthorized | The specified DiskCategory is not authorized. | |
| 404 | OperationDenied | The specified InstanceType or Zone is not available or not authorized. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。