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

ParameterTypeRequiredExampleDescription
ActionStringYesTransferPayType

The operation that you want to perform. Set the value to TransferPayType.

ChargeTypeStringYesPostPaid

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.
DtsJobIdStringYeso4nh3g7jg56****

The ID of the data synchronization or change tracking task. You can call the DescribeDtsJobs operation to query the task ID.

PeriodStringNoYear

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.
BuyCountStringNo5

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.
RegionIdStringNocn-hangzhou

The ID of the region where the DTS instance resides. For more information, see List of supported regions.

Response parameters

ParameterTypeExampleDescription
ChargeTypeStringPostPaid

The billing method of the DTS instance. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
CodeString200

The error code. This parameter will be removed in the future.

DtsJobIdStringo4nh3g7jg56****

The ID of the DTS task.

DynamicMessageStringDtsJobId

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.
EndTimeString1614916318

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.
ErrCodeStringInternalError

The error code returned if the call failed.

ErrMessageStringThe Value of Input Parameter %s is not valid.

The error message returned if the call failed.

HttpStatusCodeInteger200

The HTTP status code.

InstanceIdStringdtso4nh3g7jg56****

The ID of the DTS instance.

RequestIdString601B6F25-21E7-4484-99D5-3EF2625C****

The ID of the request.

SuccessBooleantrue

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****
&<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.