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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer automatically generates the sample code of the operation for different SDKs.

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:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
Note
  • 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.
  • If you do not need to change the billing method, specify the current billing method.
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:

  • Year
  • Month (default value)
Note You must specify this parameter only if you set the ChargeType parameter to PrePaid.
BuyCount String No 5

The subscription length.

  • If the Period parameter is set to Year, the value range is 1 to 5.
  • If the Period parameter is set to Month, the value range is 1 to 60.
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:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
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
  • If the DTS instance is a pay-as-you-go instance, the value of this parameter is empty.
  • You can use a search engine to obtain a UNIX timestamp converter.
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:

  • true: The call was successful.
  • false: The call failed.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=TransferPayType
&ChargeType=PostPaid
&DtsJobId=o4nh3g7jg56****
&Period=Year
&BuyCount=5
&<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.