Configures a data migration, data synchronization, or change tracking 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 ConfigureDtsJob

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

DataInitialization Boolean Yes true

Specifies whether to perform full data migration or initial full data synchronization. Valid values:

  • true: (default value) yes
  • false: no
DataSynchronization Boolean Yes false

Specifies whether to perform incremental data migration or synchronization. Valid values:

  • true: (default value) yes
  • true: yes
DbList String Yes [{"DBName":"dtstestdata","TableIncludes":[{"TableName":"customer"}]}]

The objects that you want to migrate or synchronize. The value is a JSON string and can contain regular expressions.

For more information, see MigrationObject and SynchronizationObjects.

DestinationEndpointInstanceType String Yes RDS

The type of the destination instance. Valid values:

  • RDS: ApsaraDB RDS instance
  • LocalInstance: self-managed database with a public IP address
  • ECS: self-managed database that is hosted on Elastic Compute Service (ECS)
  • Express: self-managed database that is connected over Express Connect
  • CEN: self-managed database that is connected over Cloud Enterprise Network (CEN)
  • DatabaseGateway: self-managed database that is connected over Database Gateway
DtsJobName String Yes Migration between RDS instances

The name of the DTS instance.

JobType String Yes MIGRATION

The type of the DTS instance. Valid values:

  • MIGRATION: data migration instance
  • SYNC: data synchronization instance
SourceEndpointInstanceType String Yes RDS

The type of the source instance. Valid values:

  • RDS: ApsaraDB RDS instance
  • LocalInstance: self-managed database with a public IP address
  • ECS: self-managed database that is hosted on ECS
  • Express: self-managed database that is connected over Express Connect
  • CEN: self-managed database that is connected over CEN
  • DatabaseGateway: self-managed database that is connected over Database Gateway
StructureInitialization Boolean Yes true

Specifies whether to perform schema migration or initial schema synchronization. Valid values:

  • true: (default value) yes
  • false: no
SourceEndpointInstanceID String No rm-bp1imrtn6fq7h****

The ID of the source instance.

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-O cluster
  • polardb_pg: PolarDB for PostgreSQL cluster
  • Redis: ApsaraDB for Redis instance or self-managed Redis database
  • DRDS: PolarDB-X instance V1.0 or V2.0
  • 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 cluster V2.0
  • ADB30: AnalyticDB for MySQL cluster V3.0
  • 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
  • clickhouse: ApsaraDB for ClickHouse cluster
  • DB2: self-managed Db2 for Linux, UNIX, and Windows (LUW) database
  • as400: AS/400
  • Tablestore: Tablestore instance
Note
SourceEndpointRegion String No cn-hangzhou

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

SourceEndpointIP String No 172.16.88.***

The IP address of the source database.

Note You must specify this parameter only if the SourceEndpointInstanceType parameter is set to LocalInstance, ECS, Express, DatabaseGateway, or CEN.
SourceEndpointPort String No 3306

The database service port of the source instance.

Note You must specify this parameter only if the SourceEndpointInstanceType parameter is set to LocalInstance, ECS, Express, DatabaseGateway, or CEN.
SourceEndpointOracleSID String No testsid

The system ID (SID) of the Oracle database.

Note You must specify this parameter only if the SourceEndpointEngineName parameter is set to Oracle and the Oracle database is deployed in a non-RAC architecture.
SourceEndpointDatabaseName String No dtstestdatabase

The name of the source database or the authentication database.

Note
  • You must specify this parameter only if the SourceEndpointEngineName parameter is set to PostgreSQL or MongoDB.
  • If the SourceEndpointEngineName parameter is set to PostgreSQL, specify the name of the source database. If the SourceEndpointEngineName parameter is set to MongoDB, specify the name of the authentication database.
SourceEndpointUserName String No dtstest

The database account of the source database.

Note The permissions that are required for database accounts vary with the migration or synchronization scenario. For more information, see Overview of data migration scenarios and Overview of data synchronization scenarios.
SourceEndpointPassword String No Test123456

The password of the source database account.

SourceEndpointOwnerID String No 140692647406****

The ID of the Alibaba Cloud account that owns the source RDS instance.

Note You can specify this parameter to migrate or synchronize data across different Alibaba Cloud accounts. In this case, you also need to specify the SourceEndpointRole parameter.
SourceEndpointRole String No ram-for-dts

The name of the RAM role configured for the Alibaba Cloud account that owns the source instance.

Note You must specify this parameter when you migrate or synchronize data across different Alibaba Cloud accounts. For information about the permissions and authorization methods of the RAM role, see Configure RAM authorization for cross-account data migration and synchronization.
DestinationEndpointInstanceID String No rm-bp1162kryivb8****

The ID of the destination instance.

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-O cluster
  • polardb_pg: PolarDB for PostgreSQL cluster
  • Redis: ApsaraDB for Redis instance or self-managed Redis database
  • DRDS: PolarDB-X instance V1.0 or V2.0
  • 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 cluster V2.0
  • ADB30: AnalyticDB for MySQL cluster V3.0
  • 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
  • clickhouse: ApsaraDB for ClickHouse cluster
  • DB2: self-managed Db2 for LUW database
  • as400: AS/400
  • Tablestore: Tablestore instance
Note
DestinationEndpointRegion String No cn-hangzhou

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

DestinationEndpointIP String No 172.16.88.***

The IP address of the destination database.

Note You must specify this parameter only if the DestinationEndpointInstanceType parameter is set to LocalInstance, ECS, Express, DatabaseGateway, or CEN.
DestinationEndpointPort String No 3306

The database service port of the destination instance.

Note You must specify this parameter only if the DestinationEndpointInstanceType parameter is set to LocalInstance, ECS, Express, DatabaseGateway, or CEN.
DestinationEndpointDataBaseName String No dtstestdata

The name of the destination database or the authentication database.

Note
  • You must specify this parameter only if the DestinationEndpointEngineName parameter is set to PostgreSQL, DRDS, or MongoDB.
  • If the DestinationEndpointEngineName parameter is set to PostgreSQL or DRDS, specify the name of the destination database. If the DestinationEndpointEngineName parameter is set to MongoDB, specify the name of the authentication database.
DestinationEndpointUserName String No dtstest

The database account of the destination database.

Note The permissions that are required for database accounts vary with the migration or synchronization scenario. For more information, see Overview of data migration scenarios and Overview of data synchronization scenarios.
DestinationEndpointPassword String No Test123456

The password of the destination database account.

Reserve String No { "autoStartModulesAfterConfig": "none", "targetTableMode": 2 }

The reserved parameter of DTS. The value is a JSON string. You can specify this parameter to meet special requirements, for example, whether to automatically start a precheck. For more information, see MigrationReserved.

Checkpoint String No 1610540493

The start offset of incremental data migration or data synchronization. The value is a UNIX timestamp. Unit: seconds.

DestinationEndpointOracleSID String No testsid

The SID of the Oracle database.

Note You must specify this parameter only if the DestinationEndpointEngineName parameter is set to Oracle and the Oracle database is deployed in a non-RAC architecture.
DtsJobId String No l3m1213ye7l****

The ID of the data migration, data synchronization, or change tracking task.

Note You must specify at least one of the DtsJobId and DtsInstanceId parameters.
DtsInstanceId String No dtsl3m1213ye7l****

The ID of the data migration, data synchronization, or change tracking instance.

Note You must specify at least one of the DtsJobId and DtsInstanceId parameters.
DelayPhone String No 1361234****,1371234****

The mobile phone numbers that receive latency-related alerts. Separate mobile phone numbers with commas (,).

Note
  • This parameter is available only for China site (aliyun.com) users. Only mobile phone numbers in mainland China are supported. Up to 10 mobile phone numbers can be specified.
  • International site (alibabacloud.com) users cannot receive alerts by using mobile phones, but can set alert rules for DTS tasks in the CloudMonitor console.
DelayRuleTime Long No 10

The threshold for triggering latency alerts. The unit is seconds and the value must be an integer. You can set the threshold based on your business needs. To avoid delay fluctuations caused by network and database loads, we recommend that you set the threshold to more than 10 seconds.

Note This parameter is required if the DelayNotice parameter is set to true.
DelayNotice Boolean No true

Specifies whether to monitor task latency. Valid values:

  • true: yes
  • false: no
ErrorPhone String No 1361234****,1371234****

The mobile phone numbers that receive status-related alerts. Separate mobile phone numbers with commas (,).

Note
  • This parameter is available only for China site (aliyun.com) users. Only mobile phone numbers in mainland China are supported. Up to 10 mobile phone numbers can be specified.
  • International site (alibabacloud.com) users cannot receive alerts by using mobile phones, but can set alert rules for DTS tasks in the CloudMonitor console.
ErrorNotice Boolean No true

Specifies whether to monitor task status. Valid values:

  • true: yes
  • false: no

Response parameters

Parameter Type Example Description
DtsInstanceId String dtsl3m1213ye7l****

The ID of the data migration, data synchronization, or change tracking instance.

DtsJobId String l3m1213ye7l****

The ID of the data migration, data synchronization, or change tracking task.

ErrCode String InternalError

The error code returned if the call failed.

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

The error message returned if the call failed.

HttpStatusCode String 200

The HTTP status code.

RequestId String 224DB9F7-3100-4899-AB9C-C938BCCB****

The ID of the request.

Success String true

Indicates whether the call was successful.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=ConfigureDtsJob
&DataInitialization=true
&DataSynchronization=false
&DbList=[{"DBName":"dtstestdata","TableIncludes":[{"TableName":"customer"}]}]
&DestinationEndpointInstanceType=RDS
&DtsJobName=Migration between RDS instances
&JobType=MIGRATION
&SourceEndpointInstanceType=RDS
&StructureInitialization=true
&<Common request parameters>

Sample success responses

XML format

<ConfigureDtsJobResponse>
      <DtsJobId>l3m1213ye7l****</DtsJobId>
      <RequestId>224DB9F7-3100-4899-AB9C-C938BCCB****</RequestId>
      <HttpStatusCode>200</HttpStatusCode>
      <DtsInstanceId>dtsl3m1213ye7l****</DtsInstanceId>
      <Success>true</Success>
</ConfigureDtsJobResponse>

JSON format

{
    "DtsJobId":"l3m1213ye7l****",
    "RequestId":"224DB9F7-3100-4899-AB9C-C938BCCB****",
    "HttpStatusCode":200,
    "DtsInstanceId":"dtsl3m1213ye7l****",
    "Success":true
}

Error codes

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