變更一塊雲端硬碟類型,或者修改一塊ESSD雲端硬碟的效能等級。ESSD同城冗餘雲端硬碟、普通雲端硬碟、彈性臨時磁碟和本機磁碟均不支援變更雲端硬碟類型。
介面說明
為了減少變更設定操作對您業務帶來的影響,請您在業務離峰期進行變更設定。
呼叫該介面時,您需要注意:
-
修改 ESSD 雲端硬碟效能等級:
-
包年包月 ESSD 雲端硬碟僅支援升級效能等級。
-
按量付費 ESSD 雲端硬碟支援升級和降低效能等級,但不支援降級至 PL0。
-
ESSD 雲端硬碟的狀態必須是使用中(In_use)狀態或者待掛載(Available)狀態。
-
若 ESSD 雲端硬碟已掛載到 ECS 執行個體上,執行個體必須處於執行中(Running)狀態或者已停止(Stopped)狀態,不能處於過期或者帳號欠費狀態。
-
由於 ESSD 雲端硬碟效能等級受容量限制,如果您無法升級效能等級,可以擴容( ResizeDisk )後重新操作。更多資訊,請參見 ESSD 雲端硬碟。
-
-
變更一塊雲端硬碟類型的注意事項,請參見變更雲端硬碟類型。
-
不同類型的雲端硬碟支援變更設定的情況,請參見雲端硬碟支援變更設定情況。
雲端硬碟變更設定後,計費變化情況如下:
-
按量付費雲端硬碟:按照新的雲端硬碟類型計費。
-
包年包月雲端硬碟:在計費週期內,會根據新舊設定的價格差和剩餘天數(從次日 0 點到有效期結束)來計算應補繳的費用。
關於雲端硬碟的計費資訊,請參見區塊儲存計費。
調試
您可以在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 |
| Recover |
string |
否 |
重設雲端硬碟效能,僅支援專屬儲存叢集雲端硬碟。 設定該參數後,PerformanceControlOptions.IOPS 和 PerformanceControlOptions.Throughput 參數不生效。 目前僅支援設定為 All(重設雲端硬碟 IOPS 和吞吐量至初始值)。 |
All |
| Throughput |
integer |
否 |
目標雲端硬碟吞吐量,僅支援修改專屬儲存叢集雲端硬碟吞吐量,單位 MB/s。 取值範圍:60~單碟最大吞吐量。 更多資訊,請參見雲端硬碟效能。 |
200 |
| DestinationZoneId |
string |
否 |
說明
該參數正在邀測中,暫不支援使用。 |
cn-hangzhou-g |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| OrderId |
string |
產生的訂單 ID。 說明
僅在變更或修改包年包月雲端硬碟時會傳回訂單 ID。 |
20413515388**** |
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TaskId |
string |
變更雲端硬碟設定的任務 ID。 說明
如果您只修改了一塊 ESSD 雲端硬碟的效能等級,則不會傳回該參數。 |
t-bp67acfmxazb4p**** |
樣本
正常返回樣本
JSON格式
{
"OrderId": "20413515388****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TaskId": "t-bp67acfmxazb4p****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidPerformanceLevel.Malformed | The specified parameter PerformanceLevel is not valid. | 指定的參數 PerformanceLevel 無效。 |
| 400 | InvalidDiskCategory.ValueNotSupported | The specified parameter "DiskCategory" is not valid. | 指定的系統磁碟類型和資料磁碟類型不支援。 |
| 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 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 | InvalidOperation.InstanceStatusUnsupported | The specified instance status is not supported for this operation. The expected status is Running or 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. | 目前執行個體狀態不支援此類操作。 |
| 400 | InvalidOperation.DiskStatusNotSupported | The specified disk is not in a valid status for the current operation. Ensure the disk is in a valid status before you modify its specification. | |
| 500 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. | |
| 403 | DiskInArrears | The specified operation is denied because the disk has overdue payments. Please settle the outstanding balance. | |
| 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 is not in a dedicated storage cluster. Performance control options cannot be modified. | |
| 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 | The specified disk is not ready. The status must be either In_use or 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 specified KMS key must be in an enabled state. Please enable the key in the KMS console and try again. | |
| 403 | InvalidOperation.CMKUnauthorized | The specified KMS key is not authorized for the ECS service. Please grant the ECS service permission to use the key in the KMS console and try again. | |
| 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 an internal error and you may retry later or contact support with the request ID. | |
| 404 | InvalidDiskCategory.ValueUnauthorized | The specified DiskCategory is not authorized. | |
| 404 | OperationDenied | The specified InstanceType or Zone is not available or not authorized. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。