Configures a data migration or data synchronization task.

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 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 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:

  • false: (default value) no
  • true: yes
DbList String Yes null

The objects that you want to migrate or synchronize. The value is a JSON string. For more information, see Objects of DTS tasks.

DestinationEndpointInstanceType String Yes RDS

The type of the destination instance. Valid values:

Alibaba Cloud instance or cluster
  • RDS: ApsaraDB RDS for MySQL instance, ApsaraDB RDS for SQLServer instance, ApsaraDB RDS for PostgreSQL instance, or ApsaraDB RDS for MariaDB TX instance
  • POLARDB: PolarDB for MySQL cluster
  • POLARDBX20: PolarDB-X V2.0 instance
  • ADS: AnalyticDB for MySQL V2.0 cluster or AnalyticDB for MySQL V3.0 cluster
  • MONGODB: ApsaraDB for MongoDB instance
  • GREENPLUM: AnalyticDB for PostgreSQL instance
  • DATAHUB: DataHub project
Self-managed database
  • OTHER: 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)
  • DG: self-managed database that is connected over Database Gateway
Note

  • If the destination instance is a PolarDB O Edition cluster, you must set this parameter to OTHER or EXPRESS because you can only use the PolarDB O Edition cluster as a self-managed database connected over the Internet or Express Connect.
  • If the destination instance is a Message Queue for Apache Kafka instance, you must set this parameter to ECS or EXPRESS because you can only use the Message Queue for Apache Kafka instance as a self-managed database connected over ECS or Express Connect.
  • For more information, see Supported databases.
  • If the destination instance is a self-managed database, you must deploy the network environment for the database. For more information, see Preparation overview.
DtsJobName String Yes RDS_TO_RDS_MIGRATION

The name of the DTS task.

JobType String Yes MIGRATION

The type of the DTS task. Valid values:

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

The type of the source instance. Valid values:

Alibaba Cloud instance or cluster
  • RDS: ApsaraDB RDS for MySQL instance, ApsaraDB RDS for SQLServer instance, ApsaraDB RDS for PostgreSQL instance, or ApsaraDB RDS for MariaDB TX instance
  • POLARDB: PolarDB for MySQL cluster
  • POLARDBX20: PolarDB-X V2.0 instance
  • MONGODB: ApsaraDB for MongoDB instance
  • DISTRIBUTED_DMSLOGICDB: Data Management (DMS) logical database
Self-managed database
  • OTHER: 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
  • DG: self-managed database that is connected over Database Gateway
Note
  • If the source instance is a PolarDB O Edition cluster, you must set this parameter to OTHER or EXPRESS because you can only use the PolarDB O Edition cluster as a self-managed database connected over the Internet or Express Connect.
  • For more information, see Supported databases.
  • If the source instance is a self-managed database, you must deploy the network environment for the database. For more information, see Preparation overview.
StructureInitialization Boolean Yes true

Specifies whether to perform schema migration or 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 type of the source instance.

  • MYSQL: ApsaraDB RDS for MySQL instance or self-managed MySQL database
  • POLARDB: PolarDB for MySQL cluster
  • POLARDB_O: PolarDB O Edition cluster
  • POLARDBX20: PolarDB-X V2.0 instance
  • ORACLE: self-managed Oracle database
  • POSTGRESQL: ApsaraDB RDS for PostgreSQL instance or self-managed PostgreSQL database
  • MSSQL: ApsaraDB RDS for SQL Server instance or self-managed SQL Server database
  • MONGODB: ApsaraDB for MongoDB instance or self-managed MongoDB database
  • DB2: self-managed Db2 for LUW database
  • AS400: self-managed Db2 for i database
  • DMSPOLARDB: DMS logical database
  • HBASE: self-managed HBase database
  • TERADATA: Teradata database
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 instance.

Note You must specify this parameter only if the source instance is a self-managed database that is connected over the Internet, Express Connect, or CEN.
SourceEndpointPort String No 3306

The database service port of the source instance.

Note You must specify this parameter only if the source instance is a self-managed database.
SourceEndpointOracleSID String No testsid

The system ID (SID) of the source 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 database to which the object in the source instance belongs.

Note You must specify this parameter only if the source instance is a PolarDB O Edition cluster, a PostgreSQL database, or a MongoDB database.
SourceEndpointUserName String No dtstest

The database account of the source database.

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

The password of the source database account.

SourceEndpointOwnerID String No 140692647406****

The ID of the Alibaba Cloud account to which the source instance belongs.

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 type of the destination instance.

  • MYSQL: ApsaraDB RDS for MySQL instance or self-managed MySQL database
  • POLARDB: PolarDB for MySQL cluster
  • POLARDB_O: PolarDB O Edition cluster
  • POLARDBX20: PolarDB-X V2.0 instance
  • ORACLE: self-managed Oracle database
  • POSTGRESQL: ApsaraDB RDS for PostgreSQL instance or self-managed PostgreSQL database
  • MSSQL: ApsaraDB RDS for SQL Server instance or self-managed SQL Server database
  • ADB20: AnalyticDB for MySQL V2.0 cluster
  • ADB30: AnalyticDB for MySQL V3.0 cluster
  • MONGODB: ApsaraDB for MongoDB instance or self-managed MongoDB database
  • GREENPLUM: AnalyticDB for PostgreSQL instance
  • KAFKA: Message Queue for Apache Kafka instance or self-managed Kafka cluster
  • DATAHUB: DataHub project
  • DB2: self-managed Db2 for LUW database
  • AS400: self-managed Db2 for i database
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 instance.

Note You must specify this parameter only if the destination instance is a self-managed database that is connected over the Internet, Express Connect, or CEN.
DestinationEndpointPort String No 3306

The database service port of the destination instance.

Note You must specify this parameter only if the destination instance is a self-managed database.
DestinationEndpointDataBaseName String No dtstestdata

The name of the database to which the object in the destination instance belongs.

Note You must specify this parameter only if the destination instance is a PolarDB O Edition cluster, an AnalyticDB for PostgreSQL instance, a PostgreSQL database, or a MongoDB database.
DestinationEndpointUserName String No dtstest

The database account of the destination database.

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

The password of the destination database account.

Reserve String No { "srcInstanceId": "cen-9kqshqum*******" }

The reserved parameter of DTS. The value is a JSON string. You can specify this parameter to add more configurations of the source or destination instance to the DTS task. For example, you can specify the data storage format of the destination Kafka database and the ID of the CEN instance. For more information, see Reserve.

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 destination 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 or data synchronization task.

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

The ID of the data migration or data synchronization instance.

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

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

Note
  • This parameter is available only for China site (aliyun.com) users. Only mobile numbers in mainland China are supported. Up to 10 mobile 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. Unit: seconds. The value must be an integer. You can set the threshold based on your business needs. To prevent jitters caused by network and database overloads, we recommend that you set the threshold to more than 10 seconds.

Note You must specify this parameter only if you set the DelayNotice parameter 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 numbers that receive status-related alerts. Separate multiple mobile numbers with commas (,).

Note
  • This parameter is available only for China site (aliyun.com) users. Only mobile numbers in mainland China are supported. Up to 10 mobile 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
SynchronizationDirection String No Forward

The synchronization direction. Valid values:

  • Forward
  • Reverse
Note
  • Default value: Forward.
  • The value Reverse takes effect only if the topology of the data synchronization task is two-way synchronization.
RegionId String No cn-hangzhou

The ID of the region where the data migration or data synchronization instance resides. For more information, see List of supported regions.

Response parameters

Parameter Type Example Description
DtsInstanceId String dtsl3m1213ye7l****

The ID of the data migration or data synchronization instance.

DtsJobId String l3m1213ye7l****

The ID of the data migration or data synchronization 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={"dtstest":{"name":"dtstest","all":true}}
&DestinationEndpointInstanceType=RDS
&DtsJobName=RDS_TO_RDS_MIGRATION
&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.