TransformDBClusterPayType - 变更数据库集群付费类型

变更PolarDB集群的计费方式。

接口说明

说明
  • PolarDB 集群支持包年包月和按量付费两种计费方式,您可以根据业务需求,将包年包月计费方式转换为按量付费,也可以将按量付费计费方式转换为包年包月。具体请参见包年包月转按量付费按量付费转包年包月

  • 当您的阿里云账号余额不足时,按量付费计费方式无法转换为包年包月。

  • 包年包月计费方式变更为按量付费时,系统会自动退还您已支付费用的余额。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

polardb:TransformDBClusterPayType

update

*DBCluster

acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}

请求参数

名称

类型

必填

描述

示例值

DBClusterId

string

PolarDB 集群 ID。

pc-bp10gr51qasnl****

PayType

string

实例的付费类型。取值:

  • Postpaid:后付费(按量付费)

  • Prepaid:预付费(包年包月)

Prepaid

RegionId

string

地域 ID。

cn-hangzhou

UsedTime

string

购买时长,取值:

  • PeriodYear 时,UsedTime 取值为 1~3。

  • PeriodMonth 时,UsedTime 取值为 1~9。

说明

PayType 取值 Prepaid 时,需要传入该参数。

1

Period

string

指定预付费实例为包年或者包月类型。取值:

  • Year:包年

  • Month:包月

说明

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

实例的付费类型。取值:

  • Postpaid:后付费(按量付费)

  • Prepaid:预付费(包年包月)

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无效

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情