变更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无效 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。