Configures a 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 automatically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ConfigureSubscription

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

DbList String Yes null

The objects of the change tracking task. The value is a JSON string. For more information, see Objects of DTS tasks.

DtsJobName String Yes MySQL Change Tracking

The name of the change tracking task.

Note We recommend that you specify an informative name for easy identification. You do not need to use a unique task name.
RegionId String Yes cn-hangzhou

The ID of the region where the DTS instance resides. For more information, see DescribeDTSIP.

SubscriptionInstanceNetworkType String Yes classic

The network type of the change tracking task. Valid values:

  • classic: classic network
  • vpc: virtual private cloud (VPC)
Note
  • To use the new version of the change tracking feature, you must specify this parameter. If you use the previous version, you do not need to specify this parameter.
  • The previous version of the change tracking feature supports self-managed MySQL databases, ApsaraDB RDS for MySQL instances, and PolarDB-X V1.0 instances. The new version of the change tracking feature supports self-managed MySQL databases, ApsaraDB RDS for MySQL instances, PolarDB for MySQL clusters, and Oracle databases.
  • If you set this parameter to vpc, you must also specify the SubscriptionInstanceVPCId and SubscriptionInstanceVSwitchID parameters.
DtsInstanceId String No dtsy0zz3t13h7d****

The ID of the change tracking instance. You can call the DescribeDtsJobs operation to query the instance ID.

DtsJobId String No y0zz3t13h7d****

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

SourceEndpointEngineName String No MySQL

The engine of the source database. Valid values: MySQL and Oracle.

Note If the source database is a self-managed database, you must specify this parameter.
SourceEndpointInstanceType String No RDS

The type of the source database. Valid values:

  • RDS: ApsaraDB RDS for MySQL instance
  • PolarDB: PolarDB for MySQL cluster
  • DRDS: PolarDB-X V1.0 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)
  • dg: self-managed database that is connected over Database Gateway
SourceEndpointRegion String No cn-hangzhou

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

Note If the source instance is a self-managed database with a public IP address, you can set the parameter to cn-hangzhou or the ID of the closest region.
SourceEndpointInstanceID String No rm-bp1zc3iyqe3qw****

The ID of the source instance.

Note You must specify this parameter only if the source instance is an ApsaraDB RDS for MySQL instance, a PolarDB-X V1.0 instance, or a PolarDB for MySQL cluster.
SourceEndpointIP String No 172.16.8*.***

The endpoint of the source database.

Note You must specify this parameter only if the source database is a self-managed database.
SourceEndpointPort String No 3306

The service port number of the source database.

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

The system ID (SID) of the Oracle database.

Note You must specify this parameter only if the source database is a self-managed Oracle database and the Oracle database is deployed in a non-RAC architecture.
SourceEndpointDatabaseName String No dtstestdata

The name of the source database.

SourceEndpointUserName String No dtstest

The database account of the source instance.

Note The permissions that are required for the database account vary with the change tracking scenario. For more information, see Prepare the source database account for change tracking.
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 must specify this parameter only when you track data changes across different Alibaba Cloud accounts.
SourceEndpointRole String No ram-for-dts

The authorized RAM role of the source instance. You must specify the RAM role only if the source instance does not belong to the Alibaba Cloud account that you use to configure the change tracking task. In this case, you must allow the Alibaba Cloud account that you use to configure the change tracking task to access the source instance.

Note For information about the permissions and authorization methods of the RAM role, see Configure RAM authorization for cross-account data migration and synchronization.
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 1616902385

The UNIX timestamp that represents the start of change tracking.

Note You can use a search engine to obtain a UNIX timestamp converter.
SubscriptionInstanceVPCId String No vpc-bp1vwnn14rqpyiczj****

The ID of the VPC where the change tracking instance is deployed.

Note You must specify this parameter only if the SubscriptionInstanceNetworkType parameter is set to vpc.
SubscriptionInstanceVSwitchId String No vsw-bp10df3mxae6lpmku****

The ID of the vSwitch in the specified VPC.

Note You must specify this parameter only if the SubscriptionInstanceNetworkType parameter is set to vpc.
SubscriptionDataTypeDDL Boolean No true

Specifies whether to retrieve data definition language (DDL) statements. Valid values:

  • true: (default value) yes
  • false: no
SubscriptionDataTypeDML Boolean No true

Specifies whether to retrieve data manipulation language (DML) statements. Valid values:

  • true: (default value) yes
  • false: no
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

Response parameters

Parameter Type Example Description
DtsInstanceId String dtsy0zz3t13h7d****

The ID of the change tracking instance.

DtsJobId String y0zz3t13h7d****

The ID of the 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 1D6ECADF-C5E9-4C96-8811-77602B31****

The ID of the request.

Success String true

Indicates whether the call was successful.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=ConfigureSubscription
&DbList={"dtstest":{"name":"dtstest","all":true}}
&DtsJobName=MySQL Change Tracking
&JobType=SUBSCRIBE
&SourceEndpointInstanceType=RDS
&SubscriptionInstanceNetworkType=classic
&SourceEndpointInstanceID=rm-bp1zc3iyqe3qw****
&SourceEndpointUserName=dtstest
&SourceEndpointPassword=Test123456
&<Common request parameters>

Sample success responses

XML format

<ConfigureSubscriptionResponse>
      <DtsJobId>y0zz3t13h7d****</DtsJobId>
      <RequestId>1D6ECADF-C5E9-4C96-8811-77602B31****</RequestId>
      <HttpStatusCode>200</HttpStatusCode>
      <DtsInstanceId>dtsy0zz3t13h7d****</DtsInstanceId>
      <Success>true</Success>
</ConfigureSubscriptionResponse>

JSON format

{
    "DtsJobId":"y0zz3t13h7d****",
    "RequestId":"1D6ECADF-C5E9-4C96-8811-77602B31****",
    "HttpStatusCode":200,
    "DtsInstanceId":"dtsy0zz3t13h7d****",
    "Success":true
}

Error codes

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