Changes the billing method or instance class of a Data Transmission Service (DTS) task.
Before you call this operation, make sure that you fully understand the billing methods and pricing of DTS.
- The billing method of subscription instances cannot be changed to pay-as-you-go. To prevent resource waste, determine whether you need to change the billing method of your resources.
- Data migration instances are all pay-as-you-go instances. You do not need to change the billing method of data migration instances.
- After you change the billing method from pay-as-you-go to subscription, the DTS instance is not affected.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | TransferPayType | The operation that you want to perform. Set the value to TransferPayType. |
ChargeType | String | Yes | PostPaid | The billing method that you want to use. Valid values:
Note
|
DtsJobId | String | Yes | o4nh3g7jg56**** | The ID of the data synchronization or change tracking task. You can call the DescribeDtsJobs operation to query the task ID. |
Period | String | No | Year | The billing cycle of the subscription instance. Valid values:
Note You must specify this parameter only if you set the ChargeType parameter to PrePaid. |
BuyCount | String | No | 5 | The subscription length.
Note You must specify this parameter only if you set the ChargeType parameter to PrePaid. |
RegionId | String | No | cn-hangzhou | The ID of the region where the DTS instance resides. For more information, see List of supported regions. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ChargeType | String | PostPaid | The billing method of the DTS instance. Valid values:
|
Code | String | 200 | The error code. This parameter will be removed in the future. |
DtsJobId | String | o4nh3g7jg56**** | The ID of the DTS task. |
DynamicMessage | String | DtsJobId | The dynamic part in the error message. This parameter is used to replace the %s variable in the ErrMessage parameter. Note If the return value of the ErrMessage parameter is The Value of Input Parameter %s is not valid and the return value of the DynamicMessage parameter is DtsJobId, the specified DtsJobId parameter is invalid. |
EndTime | String | 1614916318 | The expiration time of the subscription instance. The value is a UNIX timestamp. Note
|
ErrCode | String | InternalError | The error code returned if the call failed. |
ErrMessage | String | The Value of Input Parameter %s is not valid. | The error message returned if the call failed. |
HttpStatusCode | Integer | 200 | The HTTP status code. |
InstanceId | String | dtso4nh3g7jg56**** | The ID of the DTS instance. |
RequestId | String | 601B6F25-21E7-4484-99D5-3EF2625C**** | The ID of the request. |
Success | Boolean | true | Indicates whether the call was successful. Valid values:
|
Examples
Sample requests
http(s)://dts.aliyuncs.com/?Action=TransferPayType
&ChargeType=PostPaid
&DtsJobId=o4nh3g7jg56****
&<Common request parameters>
Sample success responses
XML
format
<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
format
{
"DtsJobId": "o4nh3g7jg56****",
"RequestId": "601B6F25-21E7-4484-99D5-3EF2625C****",
"InstanceId": "dtso4nh3g7jg56****",
"ChargeType": "PostPaid",
"HttpStatusCode": 200,
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.