调用TransferPayType接口修改DTS产品的付费方式或实例规格。
请确保在使用该接口前,已充分了解云数据库DTS产品的收费方式和价格。
- 包年包月的实例无法转换为按量付费的实例,为避免您的资源浪费,在实例转换付费方式操作前确认要进行转换操作。
- 数据迁移任务只支持按量付费,无需转换。
- 按量付费转包年包月只是进行付费方式的切换,对于底层运行链路不会有任何影响。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | TransferPayType |
系统规定参数,取值:TransferPayType。 |
ChargeType | String | 是 | PostPaid |
修改后的付费方式,取值:
说明
|
DtsJobId | String | 是 | o4nh3g7jg56**** |
迁移、同步或订阅任务ID,可调用DescribeDtsJobs查询。 |
Period | String | 否 | Year |
预付费实例的计费方式,取值:
说明 当ChargeType为PrePaid(预付费)时,该参数才有效且必须传入。
|
BuyCount | String | 否 | 5 |
预付费实例购买时长。
说明 当ChargeType为Prepaid(预付费)时,该参数才有效且必须传入。
|
RegionId | String | 否 | cn-hangzhou |
实例所属的地域,请参见支持的地域列表。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ChargeType | String | PostPaid |
修改后的付费方式,返回值:
|
Code | String | 200 |
错误码,本参数即将下线。 |
DtsJobId | String | o4nh3g7jg56**** |
任务ID。 |
DynamicMessage | String | DtsJobId |
动态错误信息,用于替换返回参数ErrMessage错误信息中的%s。 说明 如果ErrMessage返回The Value of Input Parameter %s is not valid,且DynamicMessage返回DtsJobId,则代表所传入的请求参数DtsJobId不合法。
|
EndTime | String | 1614916318 |
预付费实例到期时间,格式为Unix时间戳。 说明
|
ErrCode | String | InternalError |
调用错误时返回的错误码。 |
ErrMessage | String | The Value of Input Parameter %s is not valid. |
调用错误时返回的错误信息。 |
HttpStatusCode | Integer | 200 |
状态码。 |
InstanceId | String | dtso4nh3g7jg56**** |
实例ID。 |
RequestId | String | 601B6F25-21E7-4484-99D5-3EF2625C**** |
请求ID。 |
Success | Boolean | true |
请求是否成功,返回值:
|
示例
请求示例
http(s)://dts.aliyuncs.com/?Action=TransferPayType
&ChargeType=PostPaid
&DtsJobId=o4nh3g7jg56****
&Period=Year
&BuyCount=5
&<公共请求参数>
正常返回示例
XML
格式
<TransferPayTypeResponse>
<DtsJobId>o4nh3g7jg56****</DtsJobId>
<RequestId>601B6F25-21E7-4484-99D5-3EF2625C****</RequestId>
<InstanceId>dtso4nh3g7jg56****</InstanceId>
<ChargeType>PostPaid</ChargeType>
<HttpStatusCode>200</HttpStatusCode>
<Success>true</Success>
</TransferPayTypeResponse>
JSON
格式
{
"DtsJobId": "o4nh3g7jg56****",
"RequestId": "601B6F25-21E7-4484-99D5-3EF2625C****",
"InstanceId": "dtso4nh3g7jg56****",
"ChargeType": "PostPaid",
"HttpStatusCode": 200,
"Success": true
}
错误码
访问错误中心查看更多错误码。