變更PolarDB叢集的計費方式。
介面說明
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
polardb:TransformDBClusterPayType |
update |
*DBCluster
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| DBClusterId |
string |
是 |
PolarDB 叢集 ID。 |
pc-bp10gr51qasnl**** |
| PayType |
string |
是 |
執行個體的付費類型。取值:
|
Prepaid |
| RegionId |
string |
是 |
地區 ID。 |
cn-hangzhou |
| UsedTime |
string |
否 |
購買時間長度,取值:
說明
當 PayType 取值 Prepaid 時,需要傳入該參數。 |
1 |
| Period |
string |
否 |
指定預付費執行個體為包年或者包月類型。取值:
說明
當 PayType 取值為 Prepaid 時,需要傳入該參數。 |
Month |
| ResourceGroupId |
string |
否 |
資源群組 ID。 |
rg-acfm3f4un32**** |
| ClientToken |
string |
否 |
該參數用於保證請求的等冪性。由用戶端產生該參數值,保證在不同請求間該參數值的唯一性。該參數區分大小寫、長度不超過 64 個 ASCII 字元。 |
6000170000591aed949d0f5******************** |
| AutoUseCoupon |
boolean |
否 |
||
| PromotionCode |
string |
否 |
727xxxxxx934 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
5E71541A-6007-4DCC-A38A-F872C31FEB45 |
| ChargeType |
string |
執行個體的付費類型。取值:
|
Prepaid |
| DBClusterId |
string |
PolarDB 叢集 ID。 |
pc-bp10gr51qasnl**** |
| ExpiredTime |
string |
執行個體的到期時間。 說明
當 PayType 取值為 Prepaid 時,才支援該返回參數。 |
2020-04-20T10:00:00Z |
| OrderId |
string |
訂單 ID。 |
20515760028**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "5E71541A-6007-4DCC-A38A-F872C31FEB45",
"ChargeType": "Prepaid",
"DBClusterId": "pc-bp10gr51qasnl****",
"ExpiredTime": "2020-04-20T10:00:00Z",
"OrderId": "20515760028****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidOrderCharge.NotSupport | The specified order charge does not support in PolarDB. | |
| 400 | InvalidOrderTask.NotSupport | The Current ClusterId exist Order Task in PolarDB. | |
| 400 | InvalidPaymentMethod.Incomplete | No payment method is specified for your account. We recommend that you add a payment method. | 當前賬戶暫無有效支付方式(代金券),請添加支付方式。 |
| 400 | InvalidPayType.Malformed | The specified parameter PayType is not valid. | 指定的參數PayType無效。 |
| 400 | InvalidPeriod.Malformed | The specified parameter Period is not valid. | 指定的參數Period無效。 |
| 400 | InvalidUsedTime.Malformed | The specified parameter UsedTime is not valid. | 指定的參數UsedTime無效。 |
| 400 | InvalidPeriodUnit.Malformed | The specified parameter PeriodUnit is not valid. | 指定的參數PeriodUnit無效。 |
| 403 | OperationDenied.LockMode | The operation is not permitted when the instance is locked. | 操作失敗,狀態為鎖定的執行個體不支援該操作。 |
| 403 | OperationDenied.DBClusterDeletionLock | The operation is not permitted due to the deletion lock of cluster. | 操作失敗,叢集存在刪除鎖不支援當前操作。 |
| 404 | InvalidDBCluster.NotFound | The specified DBClusterId is not found. | 操作失敗,指定的叢集執行個體ID不存在。 |
| 404 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | 指定的參數DBClusterId無效 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。