將訂用帳戶ECS執行個體上掛載的資料盤的計費方式在隨用隨付和訂用帳戶之間進行轉換。
介面說明
轉換資料盤計費方式前,請仔細閱讀轉換雲端硬碟計費方式。
使用該介面時,請注意:
不支援修改掛載在隨用隨付執行個體上資料盤的計費方式,隨用隨付執行個體僅支援掛載隨用隨付雲端硬碟。
資料盤掛載的執行個體不能為到期停機狀態。
更換計費方式前後的價格差退款會退還到您的原付費方式中,已使用的代金券不退回。
每塊雲端硬碟成功修改計費方式一次,五分鐘內不能再次修改。
更換計費方式後,預設自動計費。您需要確保賬戶餘額充足,否則會產生異常訂單,此時只能作廢訂單。如果您的賬戶餘額不足,可以將參數 AutoPay 置為 false,此時會產生正常的未支付訂單,您可以登入阿里雲費用與成本後,在訂單管理頁面支付。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:ModifyDiskChargeType |
update |
*Instance
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| InstanceId |
string |
是 |
雲端硬碟掛載的執行個體 ID。 |
i-bp1i778bq705cvx1**** |
| RegionId |
string |
是 |
執行個體所屬的地區 ID。您可以調用 DescribeRegions 查看最新的阿里雲地區列表。 |
cn-hangzhou |
| DiskIds |
string |
是 |
雲端硬碟 ID 列表,一個帶有格式的 JSON Array,最多支援 16 個 ID,用半形逗號(,)隔開。 |
["d-bp67acfmxazb4ph****", "d-bp67acfmxazb4pi****", … "d-bp67acfmxazb4pj****"] |
| AutoPay |
boolean |
否 |
是否自動支付。取值範圍:
|
true |
| ClientToken |
string |
否 |
保證請求等冪性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元,且不能超過 64 個字元。更多資訊,請參見如何保證等冪性。 |
123e4567-e89b-12d3-a456-426655440000 |
| DiskChargeType |
string |
否 |
雲端硬碟計費方式。取值範圍:
說明
轉換隨用隨付雲端硬碟為訂用帳戶時,其容量費用計費周期自動與關聯的 ECS 執行個體同步。 |
PostPaid |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| OrderId |
string |
產生的訂單 ID。 |
123456**** |
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
樣本
正常返回樣本
JSON格式
{
"OrderId": "123456****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidInstanceType.ValueUnauthorized | The specified InstanceType is not authorized. | |
| 400 | InvalidInstanceType.ValueNotSupported | The specified InstanceType is not supported. | 當前不支援您指定的執行個體規格,請選擇其它執行個體規格。 |
| 400 | MissingParameter.RegionId | RegionId should not be null. | 參數 RegionId 不得為空白。 |
| 400 | MissingParameter.InstanceIdNotSupported | InstanceId should not be null. | 參數 InstanceId 不可為空。 |
| 400 | ChargeTypeViolation | The operation is not permitted due to charge type of the instance. | 付費方式不支援該操作,請您檢查執行個體的付費類型是否與該操作衝突。 |
| 400 | InvalidInstanceId.Released | The specified Instance is not exist. | 指定的執行個體不存在,請您檢查執行個體 ID 是否正確。 |
| 400 | InvalidInstance.PurchaseNotFound | The specified Instance has no purchase. | 指定的執行個體無法購買。 |
| 400 | InvalidInstance.UnPaidOrder | The specified Instance has unpaid order. | 指定的執行個體有未支付的訂單,請您先支付再進行操作。 |
| 400 | InvalidClientToken.ValueNotSupported | The ClientToken provided is invalid. | 指定的 ClientToken 不合法。 |
| 400 | Account.Arrearage | Your account has been in arrears. | 賬戶餘額不足,請先儲值再操作。 |
| 400 | Idempotence.SignatureMismatch | There is a idempotence signature mismatch between this and last request. | 作為和上一個等冪參數相同的請求,其他參數也必須完全相匹配。 |
| 400 | OrderCreationFailed | Create Order failed, please check your parameters and try it later. | 建立訂單失敗,請檢查您的參數,然後再試。 |
| 400 | Throttling | Request was denied due to request throttling, please try again after 5 minutes. | 您當前的請求被流控,請5分鐘後重試。 |
| 400 | InstanceDowngrade.QuotaExceed | Quota of instance downgrade is exceed. | 您的執行個體降配已超額度,無法進行此操作。 |
| 400 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | |
| 400 | InvalidDisk.DetachedSystemDisk | The specified disk is a detached system disk, does not support this operation. | |
| 400 | LastOrderProcessing | The previous order is still processing, please try again later. | 訂單正在處理中,稍後重試。 |
| 400 | InvalidAction.WithActiveElasticUpgrade | The instance has active Elastic Upgrade. | |
| 400 | DISK_IN_DEDICATED_BLOCK_STORAGE_CLUSTER | The disk in dedicated block storage cluster is not allowed to do this operation. | |
| 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.DiskMustAttachedToInstance | The specified data disks must have been attached to this instance. | 指定的磁碟必須已經掛載到這台執行個體上。 |
| 400 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | 執行個體已到期或者欠費,請您續約或者結清後再進行操作。 |
| 400 | InvalidOrder.Overdue | The specified account has overdue orders. | 您有欠費賬單,不符合購買條件。請先儲值結清賬單後再購買。 |
| 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. | |
| 403 | InvalidInstanceType.ValueNotSupported | The specified InstanceType is not supported. | |
| 403 | InvalidAccountStatus.NotEnoughBalance | Your account does not have enough balance. | |
| 403 | Throttling | Request was denied due to request throttling, please try again after 5 minutes. | |
| 403 | InvalidInstanceChargeType.NotFound | The chargeType of the instance does not support this operation. | 該付費類型的執行個體不支援該操作。 |
| 403 | InvalidOperation.MultiAttachDisk | Multi attach disk does not support this operation. | 開啟多重掛載特性的雲端硬碟不支援該操作。 |
| 403 | InvalidOperation.UnpaidOrder | The specified instance has unpaid orders and does not support the current operation. | 指定的執行個體有未完成支付的訂單,不支援當前操作。 |
| 403 | OperationDenied | The specified InstanceType or Zone is not available or not authorized. | 指定的執行個體規格或可用性區域不可用或者未授權。 |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist. | 指定的地區不存在,請確認該參數是否正確。 |
| 404 | PaymentMethodNotFound | No billing method has been registered on the account. | 您未註冊任何計費方式,請註冊後重試。 |
| 404 | InvalidZoneId.NotFound | The ZoneId provided does not exist in our records. | |
| 404 | InvalidRamRole.NotFound | The specified parameter "RAMRoleName" does not exist. | RAM角色未被授權用於ECS服務 |
| 404 | InvalidDiskIds.NotFound | Some of the specified data disks do not exist. | 參數 DiskIds 中的一些資料盤,不存在。 |
| 404 | InvalidDiskIds.NotPortable | The specified DiskId is not portable. | |
| 404 | InvalidDataDiskSize.ValueNotSupported | The specified parameter "Size" is not supported. | |
| 404 | InvalidAction.NotSupported | The specified action is not supported. | 不支援指定的 API 操作。 |
| 404 | InvalidInstanceStatus.NotSupported | The status of the specified instance is invalid. | 當前執行個體的狀態不支援此操作。 |
| 404 | InvalidInstanceId.NOT_FOUND | The specified instance is not exist. | 指定的執行個體不存在。 |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | 指定的執行個體ID無效。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。