Purchases a Data Transmission Service (DTS) instance.

  • Before you call this operation, make sure that you fully understand the billing methods and pricing of DTS.
  • If you want to run a DTS task on a DTS dedicated cluster, you must configure the task before you purchase a DTS instance. You can call the ConfigureDtsJob operation to configure a DTS task.

Debugging

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

Request parameters

Parameter Type Required Example Description
Action String Yes CreateDtsInstance

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

JobId String No bi6e22ay243****

The ID of the task. You can call the ConfigureDtsJob operation to obtain the task ID from the DtsJobId parameter.

Note If this parameter is specified, you do not need to specify the SourceRegion, DestinationRegion, Type, SourceEndpointEngineName, or DestinationEndpointEngineName parameter. Even if these parameters are specified, the value of the JobId parameter takes precedence.
InstanceClass String No xxlarge

The instance class.

  • DTS supports the following instance classes for a data migration instance: xxlarge, xlarge, large, medium, and small.
  • DTS supports the following instance classes for a data synchronization instance: large, medium, small, and micro.
Note For more information about the test performance of each instance class, see Specifications of data migration instances and Specifications of data synchronization instances.
PayType String No PrePaid

The billing method. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
Note This parameter must be specified.
Period String No Month

The unit of the subscription duration. Valid values: Year and Month.

Note You must specify this parameter only if the PayType parameter is set to PrePaid.
SyncArchitecture String No oneway

The synchronization topology. Valid values:

  • oneway: one-way synchronization. This is the default value.
  • bidirectional: two-way synchronization.
AutoStart Boolean No false

Specifies whether to automatically start the task after the DTS instance is purchased. Valid values:

  • false: does not automatically start the task after the DTS instance is purchased. This is the default value.
  • true: automatically starts the task after the DTS instance is purchased.
UsedTime Integer No 5

The subscription duration.

  • Valid values if the Period parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
  • Valid values if the Period parameter is set to Year: 1, 2, 3, and 5.
    Note
    • You must specify this parameter only if the PayType parameter is set to PrePaid.
    • You can set the Period parameter to specify the unit of the subscription duration.
Quantity Integer No 1

The number of DTS instances that you want to purchase.

Note Only a single instance can be purchased each time.
AutoPay Boolean No false

Specifies whether to automatically renew the DTS instance when it expires. Valid values:

  • false: does not automatically renew the DTS instance when it expires. This is the default value.
  • true: automatically renews the DTS instance when it expires.
Type String No SYNC

The type of the DTS instance. Valid values:

  • MIGRATION: data migration instance
  • SYNC: data synchronization instance
  • SUBSCRIBE: change tracking instance
    Note You must specify one of this parameter and the JobId parameter.
DatabaseCount Integer No 3

The number of private custom ApsaraDB RDS instances in a PolarDB-X instance. Default value: 1.

Note You must specify this parameter only if the SourceEndpointEngineName parameter is set to drds.
SourceRegion String No cn-hangzhou

The ID of the region in which the source instance resides. For more information, see List of supported regions.

Note You must specify one of this parameter and the JobId parameter.
DestinationRegion String No cn-hangzhou

The ID of the region in which the destination instance resides. For more information, see List of supported regions.

Note You must specify one of this parameter and the JobId parameter.
SourceEndpointEngineName String No MYSQL

The database engine of the source instance.

  • MySQL: ApsaraDB RDS for MySQL instance or self-managed MySQL database
  • PolarDB: PolarDB for MySQL cluster
  • polardb_o: PolarDB for Oracle cluster
  • polardb_pg: PolarDB for PostgreSQL cluster
  • Redis: ApsaraDB for Redis instance or self-managed Redis database
  • DRDS: PolarDB-X 1.0 or PolarDB-X 2.0 instance
  • PostgreSQL: self-managed PostgreSQL database
  • odps: MaxCompute project
  • oracle: self-managed Oracle database
  • mongodb: ApsaraDB for MongoDB instance or self-managed MongoDB database
  • tidb: TiDB database
  • ADS: AnalyticDB for MySQL V2.0 cluster
  • ADB30: AnalyticDB for MySQL V3.0 cluster
  • Greenplum: AnalyticDB for PostgreSQL instance
  • MSSQL: ApsaraDB RDS for SQL Server instance or self-managed SQL Server database
  • kafka: Message Queue for Apache Kafka instance or self-managed Kafka cluster
  • DataHub: DataHub project
  • DB2: self-managed Db2 for LUW database
  • as400: AS/400
  • Tablestore: Tablestore instance
Note
DestinationEndpointEngineName String No MySQL

The database engine of the destination instance.

  • MySQL: ApsaraDB RDS for MySQL instance or self-managed MySQL database
  • PolarDB: PolarDB for MySQL cluster
  • polardb_o: PolarDB for Oracle cluster
  • polardb_pg: PolarDB for PostgreSQL cluster
  • Redis: ApsaraDB for Redis instance or self-managed Redis database
  • DRDS: PolarDB-X 1.0 or PolarDB-X 2.0 instance
  • PostgreSQL: self-managed PostgreSQL database
  • odps: MaxCompute project
  • oracle: self-managed Oracle database
  • mongodb: ApsaraDB for MongoDB instance or self-managed MongoDB database
  • tidb: TiDB database
  • ADS: AnalyticDB for MySQL V2.0 cluster
  • ADB30: AnalyticDB for MySQL V3.0 cluster
  • Greenplum: AnalyticDB for PostgreSQL instance
  • MSSQL: ApsaraDB RDS for SQL Server instance or self-managed SQL Server database
  • kafka: Message Queue for Apache Kafka instance or self-managed Kafka cluster
  • DataHub: DataHub project
  • DB2: self-managed Db2 for LUW database
  • as400: AS/400
  • Tablestore: Tablestore instance
Note
ComputeUnit Integer No 5

The specifications of the extract, transform, and load (ETL) instance. The unit is compute unit (CU). One CU is equal to 1 vCPU and 4 GB of memory. The value of this parameter must be an integer greater than or equal to 2.

RegionId String No cn-hangzhou

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

FeeType String No ONLY_CONFIGURATION_FEE

The billing type for a change tracking instance. Valid values: ONLY_CONFIGURATION_FEE and CONFIGURATION_FEE_AND_DATA_FEE. ONLY_CONFIGURATION_FEE: charges only configuration fees. CONFIGURATION_FEE_AND_DATA_FEE: charges configuration fees and data traffic fees.

Du Integer No 30

The number of DTS units (DUs) that are assigned to a DTS task that is run on a DTS dedicated cluster. Valid values: 1 to 100.

Note
  • The value of this parameter must be within the range of the number of DUs available for the DTS dedicated cluster.

ResourceGroupId String No rg-acfmzawhxxc****

The ID of the resource group.

Response parameters

Parameter Type Example Description
RequestId String C166D79D-436B-45F0-B5A5-25E1****

The ID of the request.

ErrCode String InternalError

The error code returned if the request failed.

Success String true

Indicates whether the request was successful.

JobId String bi6e22ay243****

The ID of the task.

ErrMessage String The request processing has failed due to some unknown error.

The error message returned if the request failed.

InstanceId String dtsbi6e22ay243****

The ID of the DTS instance.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=CreateDtsInstance
&InstanceClass=large
&PayType=PostPaid
&SyncArchitecture=oneway
&AutoStart=false
&Quantity=1
&AutoPay=false
&Type=SYNC
&SourceRegion=cn-hangzhou
&DestinationRegion=cn-hangzhou
&SourceEndpointEngineName=MySQL
&DestinationEndpointEngineName=MySQL
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateDtsInstanceResponse>
    <RequestId>C166D79D-436B-45F0-B5A5-25E1****</RequestId>
    <InstanceId>dtsmne11yo2j9n****</InstanceId>
    <Success>true</Success>
    <JobId>mne11yo2j9n****</JobId>
</CreateDtsInstanceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "C166D79D-436B-45F0-B5A5-25E1****",
  "InstanceId" : "dtsmne11yo2j9n****",
  "Success" : true,
  "JobId" : "mne11yo2j9n****"
}

Error codes

HTTP status code Error code Error message Description
403 LXCreateOrderError Failed to create order, failure message: The module is invalid The error message returned because DTS supports cross-border data synchronization only in specific scenarios. To purchase a data synchronization instance used to synchronize data across countries, fill in the <a href="https://page.aliyun.com/form/act409679078/index.htm" target="_blank">Application for DTS cross-border data synchronization</a>.
403 LXCreateOrder.NotFoundPricePlan Pricing plan price result not found, please check the parameters of the task configuration. The error message returned because an order failed to be created. No pricing plans are found. Possible causes include invalid parameters and a lack of pricing.
403 LXPayOrder.InsufficientBalance Insufficient balance, order payment failed. The error message returned because the payment failed to be made due to insufficient balance. Add funds to your account and try again later.
403 DTS.Msg.LXCreateOrderError Failed to create order, failure message: The module is invalid The error message returned because DTS supports cross-border data synchronization only in specific scenarios. To purchase a data synchronization instance used to synchronize data across countries, fill in the <a href="https://page.aliyun.com/form/act409679078/index.htm" target="_blank">Application for DTS cross-border data synchronization</a>.
403 DTS.Msg.LXCreateOrder.NotFoundPricePlan Pricing plan price result not found, please check the parameters of the task configuration. The error message returned because an order failed to be created. No pricing plans are found. Possible causes include invalid parameters and a lack of pricing.
403 DTS.Msg.LXPayOrder.InsufficientBalance Insufficient balance, order payment failed. The error message returned because the payment failed to be made due to insufficient balance. Add funds to your account and try again later.
403 InvalidSecurityToken.Expired Specified SecurityToken is expired. The error message returned because the signature expired. Use a new signature.
400 Throttling.User Request was denied due to user flow control. The error message returned because the number of requests exceeds the limit and the request is rejected. Try again later.
500 ServiceUnavailable The request has failed due to a temporary failure of the server. The error message returned because the response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support.

For a list of error codes, visit the API Error Center.