Configures a data migration or synchronization task.
- You can make appropriate pre-configurations in the console according to your needs, and then preview the corresponding OpenAPI parameter information to help you complete the request parameters. For more information, see Preview OpenAPI request parameters.
- For Data Transmission Service (DTS) instances that run on a dedicated cluster, you must deploy them first. Then, you can purchase such an instance. Additionally, DTS dedicated clusters do not support DTS tasks configured to migrate or synchronize data across regions.
Debug
You can use OpenAPI Explorer to perform debug operations and generate SDK code examples.
Request parameters
Name |
Type |
Required |
Example |
Description |
Action | String | Yes | ConfigureDtsJob | The operation that you want to perform. Set the value to ConfigureDtsJob. |
DtsJobName | String | Yes | rdsmysql_to_mysql | The name of the DTS task. |
SourceEndpointInstanceType | String | Yes | RDS | The type of the source instance. Valid values: Alibaba Cloud database
Note
|
SourceEndpointInstanceID | String | No | rm-bp1imrtn6fq7h**** | The ID of the source instance. If the source instance is an Alibaba Cloud database instance, you must specify the database instance ID. For example, if the source instance is an ApsaraDB RDS for MySQL instance, you must specify the ID of the ApsaraDB RDS for MySQL instance. If the source instance is a self-managed database, the value of this parameter varies based on the value of SourceEndpointInstanceType. For example, if SourceEndpointInstanceType is set to:
Note If SourceEndpointInstanceType is set to CEN, you must also specify the ID of the CEN instance in the Reserve parameter. For more information about how to configure the parameter, see Description of the Reserve parameter. |
SourceEndpointEngineName | String | No | MYSQL | The database engine of the source instance.
Note
|
SourceEndpointRegion | String | No | cn-hangzhou | The region of the source instance. For more information, see Supported regions. Note If the source instance is an Alibaba Cloud database instance, this parameter is required. |
SourceEndpointIP | String | No | 172.16.**.*** | The IP address of the source instance. Note This parameter is valid and required only if SourceEndpointInstanceType is set to OTHER, EXPRESS, DG, or CEN. |
SourceEndpointPort | String | No | 3306 | The database service port of the source instance. Note This parameter is required only if the source instance is a self-managed database. |
SourceEndpointOracleSID | String | No | testsid | The system ID (SID) of the Oracle database. Note This parameter is valid and required only if SourceEndpointEngineName is set to Oracle and the Oracle database is a non-RAC instance. |
SourceEndpointDatabaseName | String | No | dtstestdatabase | The name of the database from which the objects are migrated or synchronized in the source instance. Note This parameter is required only when the source instance is a PolarDB for PostgreSQL (Compatible with Oracle) cluster, a PostgreSQL database, or a MongoDB database. |
SourceEndpointUserName | String | No | dtstest | The database account of the source database. Note
|
SourceEndpointPassword | String | No | Test123456 | The password of the account that is used to log on to the source database. |
SourceEndpointOwnerID | String | No | 140692647406**** | The ID of the Alibaba Cloud account to which the source database belongs. Note If you specify this parameter, it indicates that you want to perform data migration or synchronization across Alibaba Cloud accounts. In this case, you must also specify the SourceEndpointRole parameter. |
SourceEndpointRole | String | No | ram-for-dts | The name of the Resource Access Management (RAM) role configured for the Alibaba Cloud account that owns the source instance. Note This parameter is required when you perform data migration or synchronization across Alibaba Cloud accounts. For more information about the permissions that are required for the RAM role and how to grant the permissions, see How to configure RAM authorization for data migration or synchronization between Alibaba Cloud accounts. |
DestinationEndpointInstanceType | String | Yes | EXPRESS | The type of the destination instance. Valid values: Alibaba Cloud database
Note
|
DestinationEndpointInstanceID | String | No | vpc-bp1opxu1zkhn00gzv**** | The ID of the destination instance. If the destination instance is an Alibaba Cloud database instance, you must specify the database instance ID. For example, if the destination instance is an ApsaraDB RDS for MySQL instance, you must specify the ID of the ApsaraDB RDS for MySQL instance. If the destination instance is a self-managed database, the value of this parameter varies based on the value of DestinationEndpointInstanceType. For example, if DestinationEndpointInstanceType is set to:
Note If DestinationEndpointInstanceType is set to CEN, you must also specify the ID of the CEN instance in the Reserve parameter. For more information about how to configure the parameter, see Description of the Reserve parameter. |
DestinationEndpointEngineName | String | No | MYSQL | The database engine of the destination instance. Valid values:
Note
|
DestinationEndpointRegion | String | No | cn-hangzhou | The region of the destination instance. For more information, see Supported regions. Note If the destination instance is an Alibaba Cloud database instance, this parameter is required. |
DestinationEndpointIP | String | No | 172.16.**.*** | The IP address of the destination instance. Note This parameter is valid and required only if DestinationEndpointInstanceType is set to OTHER, EXPRESS, DG, or CEN. |
DestinationEndpointPort | String | No | 3306 | The database service port of the destination instance. Note This parameter is required only when the destination instance is a self-managed database. |
DestinationEndpointDataBaseName | String | No | dtstestdata | The name of the database to which the objects are migrated or synchronized in the destination instance. Note
|
DestinationEndpointUserName | String | No | dtstest | The database account of the destination database. Note
|
DestinationEndpointPassword | String | No | Test123456 | The password of the account that is used to log on to the destination database. Note If the destination database is a MaxCompute project, you must specify the AccessKey secret of your Alibaba Cloud account. For more information about how to obtain the AccessKey secret, see Create an AccessKey. |
DestinationEndpointOwnerID | String | No | 140692647406**** | The ID of the Alibaba Cloud account to which the destination ApsaraDB RDS for MySQL instance belongs. Note
|
DestinationEndpointRole | String | No | ram-for-dts | The name of the RAM role configured for the Alibaba Cloud account to which the destination instance belongs. Note This parameter is required when you perform data migration or synchronization across Alibaba Cloud accounts. For more information about the permissions that are required for the RAM role and how to grant the permissions, see How to configure RAM authorization for data migration or synchronization between Alibaba Cloud accounts. |
StructureInitialization | Boolean | Yes | true | Specifies whether to perform schema migration or schema synchronization. Valid values:
Note If JobType is set to CHECK, you can set this parameter only to false. |
DataInitialization | Boolean | Yes | true | Specifies whether to perform full data migration or full data synchronization. Valid values:
Note If JobType is set to CHECK, you can set this parameter only to false. |
DataSynchronization | Boolean | Yes | true | Specifies whether to perform incremental data migration or incremental data synchronization. Valid values:
Note If JobType is set to CHECK, you can set this parameter only to false. |
DbList | String | Yes | {"dtstest":{"name":"dtstest","all":true}} | The objects that you want to migrate or synchronize. The value is a JSON string. For more information about the definition, see Description of objects for migration, synchronization, and subscription. Note The DbList parameter can contain a maximum of 10 MB of data. |
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 CEN instance ID. For more information, see Description of the Reserve parameter. |
Checkpoint | String | No | 1610540493 | The start offset of incremental data migration or data synchronization. This value is a UNIX timestamp representing the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC. Note If you want to specify the Checkpoint parameter, you must make sure that no other running DTS tasks use the same source database as the destination DTS instance. |
DestinationEndpointOracleSID | String | No | testsid | The SID of the Oracle database. Note This parameter is valid and required only if DestinationEndpointEngineName is set to Oracle and the Oracle database is a non-RAC instance. |
JobType | String | Yes | SYNC | The type of the task. Valid values:
Note
|
DtsJobId | String | No | k2gm967v16f**** | The ID of the data migration or synchronization task. Note You can call the DescribeDtsJobs operation to query the task ID. |
DtsInstanceId | String | No | dtsk2gm967v16f**** | The ID of the data migration or synchronization instance. Note You can call the DescribeDtsJobs operation to query the instance ID. |
DelayPhone | String | No | 1361234****,1371234**** | The mobile numbers to which latency-related alerts are sent. Separate multiple mobile numbers with commas (,). Note
|
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 This parameter is required if DelayNotice is set to true. |
DelayNotice | Boolean | No | true | Specifies whether to monitor task latency. Valid values:
|
ErrorPhone | String | No | 1361234****,1371234**** | The mobile phone numbers to which exception-related alerts are sent. Separate multiple mobile phone numbers with commas (,). Note
|
ErrorNotice | Boolean | No | true | Specifies whether to monitor task status. Valid values:
|
SynchronizationDirection | String | No | Forward | The synchronization direction. Valid values:
Note
|
RegionId | String | No | cn-hangzhou | The region of the DTS instance. For more information, see Supported regions. |
DedicatedClusterId | String | No | dtscluster_atyl3b5214uk*** | The ID of the DTS dedicated cluster on which a DTS task runs. Note If this parameter is specified, the task is scheduled to the specified DTS dedicated cluster. |
FileOssUrl | String | No | http://db-list-os-file.oss-cn-shanghai.aliyuncs.com/8e42_121852**********_79dd3aeabe2f43cdb************** | The URL of the Object Storage Service (OSS) bucket that you want to use to store files of the data migration task. |
DataCheckConfigure | String | No | {"fullCheckModel":1,"fullCheckRatio":20,"checkMaximumHourEnable":1,"checkMaximumHour":1,"fullCheckErrorNotice":true,"fullCheckValidFailNotice":true,"fullCheckNoticeValue":8,"incrementalCheckErrorNotice":true,"incrementalCheckValidFailNotice":true,"incrementalCheckValidFailNoticeTimes":2,"incrementalCheckValidFailNoticePeriod":1,"incrementalCheckValidFailNoticeValue":1,"incrementalCheckDelayNotice":true,"incrementalCheckDelayNoticeTimes":2,"incrementalCheckDelayNoticePeriod":1,"incrementalCheckDelayNoticeValue":60,"fullDataCheck":true,"incrementalDataCheck":true,"dataCheckNoticePhone":"13126800****","dataCheckDbList":{"dts":{"name":"dts","all":true}}} | The parameters for data verification, including the configurations for data verification and alerts. The value is a JSON string. For more information, see Description of the DataCheckConfigure parameter. |
DisasterRecoveryJob | Boolean | No | true | Specifies whether the instance is a disaster recovery instance. Valid values:
|
SourceEndpointVSwitchID | String | No | vsw-bp10df3mxae6lpmku**** | The ID of the vSwitch that is used for data shipping. |
DtsBisLabel | String | No | normal | The environment tag of the DTS instance. Valid values:
|
SrcCaCertificateOssUrl | String | No | **** | The path of the certificate authority (CA) certificate that is used if the connection to the source database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
SrcCaCertificatePassword | String | No | **** | The key of the CA certificate that is used if the connection to the source database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
DestCaCertificateOssUrl | String | No | **** | The path of the CA certificate that is used if the connection to the destination database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
DestCaCertificatePassword | String | No | **** | The key of the CA certificate that is used if the connection to the destination database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
MinDu | double | No | 1 | The lower limit of DU. Note This parameter is supported only for serverless instances. |
MaxDu | double | No | 16 | The upper limit of DU. Note This parameter is supported only for serverless instances. |
SrcClientCertOssUrl | String | No | **** | The path to the client certificate that is used if the connection to the source database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
SrcClientKeyOssUrl | String | No | **** | The path to the private key of the client certificate that is used if the connection to the source database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
SrcClientPassword | String | No | **** | The password of the private key of the client certificate that is used if the connection to the source database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
DestClientCertOssUrl | String | No | **** | The path to the client certificate that is used if the connection to the destination database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
DestClientKeyOssUrl | String | No | **** | The path to the private key of the client certificate that is used if the connection to the destination database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
DestClientPassword | String | No | **** | The password of the private key of the client certificate that is used if the connection to the destination database is encrypted by using SSL. Note This feature is not supported. Do not specify this parameter. |
SrcPrimaryVswId | String | No | **** | The primary vSwitch of the source VPCNAT |
SrcSecondaryVswId | String | No | **** | The secondary vSwitch of the source VPCNAT |
DestPrimaryVswId | String | No | **** | The primary vSwitch of the destination VPCNAT |
DestSecondaryVswId | String | No | **** | The secondary vSwitch of the destination VPCNAT |
ResourceGroupId | String | No | rg-acfmzawhxxc**** | The resource group ID. |
Return data
Name |
Type |
Example |
Description |
HttpStatusCode | String | 200 | The HTTP status code that is returned. |
RequestId | String | 224DB9F7-3100-4899-AB9C-C938BCCB**** | The request ID. |
ErrCode | String | InternalError | The error code returned if the request failed. |
DtsJobId | String | k2gm967v16f**** | The ID of the data migration or synchronization task. |
DtsInstanceId | String | dtsk2gm967v16f**** | The ID of the data migration or synchronization instance. |
Success | String | true | Indicates whether the request was successful. Valid values: |
ErrMessage | String | The request processing has failed due to some unknown error. | The error message returned if the request failed. |
Sample
Sample request
http(s)://dts.aliyuncs.com/?Action=ConfigureDtsJob
&RegionId=cn-hangzhou
&SourceEndpointInstanceType=RDS
&DestinationEndpointInstanceType=EXPRESS
&StructureInitialization=true
&DataInitialization=true
&DataSynchronization=true
&DbList={"dtstest":{"name":"dtstest","all":true}}
&JobType=SYNC
&SourceEndpointInstanceID=rm-bp1imrtn6fq7h****
&SourceEndpointEngineName=MYSQL
&SourceEndpointRegion=cn-hangzhou
&SourceEndpointUserName=dtstest
&SourceEndpointPassword=Test123456
&DestinationEndpointInstanceID=vpc-bp1opxu1zkhn00gzv****
&DestinationEndpointEngineName=MYSQL
&DestinationEndpointIP=172.16.**.***
&DestinationEndpointRegion=cn-hangzhou
&DestinationEndpointPort=3306
&DestinationEndpointUserName=dtstest
&DestinationEndpointPassword=Test123456
&DtsJobId=k2gm967v16f****
&DtsInstanceId=dtsk2gm967v16f****
&DtsJobName=ApsaraDB RDS for MySQL to self-managed MySQL database connected over Express Connect
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ConfigureDtsJobResponse>
<DtsJobId>k2gm967v16f****</DtsJobId>
<RequestId>224DB9F7-3100-4899-AB9C-C938BCCB****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<DtsInstanceId>dtsk2gm967v16f****</DtsInstanceId>
<Success>true</Success>
</ConfigureDtsJobResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"DtsJobId" : "k2gm967v16f****",
"RequestId" : "224DB9F7-3100-4899-AB9C-C938BCCB****",
"HttpStatusCode" : 200,
"DtsInstanceId" : "dtsk2gm967v16f****",
"Success" : true
}
Error codes
HttpCode |
Error code |
Error message |
Description |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportGcpGkeScramTls | kafka schema registry url configuration is not support gcp gke scram tls | The Kafka Schema Registry URL configuration does not support GCP GKE SCRAM TLS authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportGcpGkeIamScramTls | kafka schema registry url configuration is not support gcp gke iam scram tls | The Kafka Schema Registry URL configuration does not support GCP GKE IAM SCRAM TLS authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAzure | kafka schema registry url configuration is not support azure | The Kafka Schema Registry URL configuration does not support Azure authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAzureHdinsight | kafka schema registry url configuration is not support azure hdinsight | The Kafka Schema Registry URL configuration does not support Azure HDInsight authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAzureHdinsightIam | kafka schema registry url configuration is not support azure hdinsight iam | The Kafka Schema Registry URL configuration does not support Azure HDInsight IAM authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAzureHdinsightScram | kafka schema registry url configuration is not support azure hdinsight scram | The Kafka Schema Registry URL configuration does not support Azure HDInsight SCRAM authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAzureHdinsightTls | kafka schema registry url configuration is not support azure hdinsight tls | The Kafka Schema Registry URL configuration does not support Azure HDInsight TLS authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAzureHdinsightIamScram | kafka schema registry url configuration is not support azure hdinsight iam scram | The Kafka Schema Registry URL configuration does not support Azure HDInsight IAM SCRAM authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAzureHdinsightIamTls | kafka schema registry url configuration is not support azure hdinsight iam tls | The Kafka Schema Registry URL configuration does not support Azure HDInsight IAM TLS authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAzureHdinsightScramTls | kafka schema registry url configuration is not support azure hdinsight scram tls | The Kafka Schema Registry URL configuration does not support Azure HDInsight SCRAM TLS authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAzureHdinsightIamScramTls | kafka schema registry url configuration is not support azure hdinsight iam scram tls | The Kafka Schema Registry URL configuration does not support Azure HDInsight IAM SCRAM TLS authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAlicloud | kafka schema registry url configuration is not support alicloud | The Kafka Schema Registry URL configuration does not support Alibaba Cloud authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAlicloudKafka | kafka schema registry url configuration is not support alicloud kafka | The Kafka Schema Registry URL configuration does not support Alibaba Cloud Kafka authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAlicloudKafkaIam | kafka schema registry url configuration is not support alicloud kafka iam | The Kafka Schema Registry URL configuration does not support Alibaba Cloud Kafka IAM authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAlicloudKafkaScram | kafka schema registry url configuration is not support alicloud kafka scram | The Kafka Schema Registry URL configuration does not support Alibaba Cloud Kafka SCRAM authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAlicloudKafkaTls | kafka schema registry url configuration is not support alicloud kafka tls | The Kafka Schema Registry URL configuration does not support Alibaba Cloud Kafka TLS authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAlicloudKafkaIamScram | kafka schema registry url configuration is not support alicloud kafka iam scram | The Kafka Schema Registry URL configuration does not support Alibaba Cloud Kafka IAM SCRAM authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAlicloudKafkaIamTls | kafka schema registry url configuration is not support alicloud kafka iam tls | The Kafka Schema Registry URL configuration does not support Alibaba Cloud Kafka IAM TLS authentication. |
403 | InvalidParameter.KafkaSchemaRegistryUrlNotSupportAlicloudKafkaScramTls | kafka schema registry url configuration is not support alicloud kafka scram tls | The Kafka Schema Registry URL configuration does not support Alibaba Cloud Kafka SCRAM TLS authentication. |
Access the Error Center to view more error codes.