Configures a change tracking task.

Before you call this operation, you must call the CreateSubscriptionInstance operation to create a change tracking instance.

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 ConfigureSubscriptionInstance

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

SubscriptionDataType.DDL Boolean Yes true

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

  • true: (default value) yes
  • false: no
SubscriptionDataType.DML Boolean Yes true

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

  • true: (default value) yes
  • false: no
SubscriptionObject String Yes [{ "DBName": "dtstestdata" }]

The objects from which you want to track data changes. The value is a JSON string and can contain regular expressions. For more information, see SubscriptionObjects.

SubscriptionInstanceId String Yes dtshp8n2ze4r5x****

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

RegionId String No cn-hangzhou

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

SubscriptionInstanceName String No 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.
SourceEndpoint.InstanceType String No RDS

The type of the source database. Valid values:

  • RDS: ApsaraDB RDS for MySQL instance
  • PolarDB: PolarDB for MySQL cluster
  • 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
Note
  • The default value is MySQL.
  • The engine of a self-managed database can be MySQL or Oracle. You must specify the engine type when you call the CreateSubscriptionInstance operation.
SourceEndpoint.InstanceID 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 instance V1.0, or a PolarDB for MySQL cluster.
SourceEndpoint.IP String No 172.16.88.***

The endpoint of the source database.

Note You must specify this parameter only if the source database is a self-managed MySQL or Oracle database.
SourceEndpoint.Port 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 MySQL or Oracle database.
SourceEndpoint.UserName String No dtstestaccount

The database account of the source database.

Note The permissions that are required for the database account vary with the change tracking scenario. For more information, see Overview of change tracking scenarios.
SourceEndpoint.Password String No Test123456

The password of the source database account.

SourceEndpoint.OracleSID 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.
SourceEndpoint.DatabaseName String No dtstestdata

The name of the source database.

SourceEndpoint.OwnerID 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.
SourceEndpoint.Role String No ram-for-dts

The authorized Resource Access Management (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.
SubscriptionInstanceNetworkType String No vpc

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

  • classic: the 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 DRDS 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 SubscriptionInstance.VPCId and SubscriptionInstance.VSwitchID parameters.
SubscriptionInstance.VPCId 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.
SubscriptionInstance.VSwitchId 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.
AccountId String No 12323344****

The ID of the Alibaba Cloud account. You do not need to specify this parameter because this parameter will be removed in the future.

Response parameters

Parameter Type Example Description
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.

RequestId String 0CC15092-8957-4532-B559-B4FB80AC****

The ID of the request.

Success String true

Indicates whether the call was successful.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=ConfigureSubscriptionInstance
&SubscriptionDataType.DDL=true
&SubscriptionDataType.DML=true
&SubscriptionInstanceId=dtshp8n2ze4r5x****
&SubscriptionObject=[{"DBName":"dtstestdata","TableIncludes":[{"TableName":"customer"}]}]
&<Common request parameters>

Sample success responses

XML format

<ConfigureSubscriptionInstanceResponse>
      <RequestId>0CC15092-8957-4532-B559-B4FB80AC****</RequestId>
      <Success>true</Success>
</ConfigureSubscriptionInstanceResponse>

JSON format

{
	"RequestId": "0CC15092-8957-4532-B559-B4FB80AC****",
	"Success": true
}

Error codes

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