Configures a change tracking instance.

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 dynamically 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 track DDL statements. Default value: true. Valid values:

  • true: tracks DDL statements.
  • false: does not track DDL statements.
SubscriptionDataType.DML Boolean Yes true

Specifies whether to track DML statements. Default value: true. Valid values:

  • true: tracks DML statements.
  • false: does not tack DML statements.
SubscriptionObject String Yes [{ "DBName": "dtstestdata" }]

The objects for 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 in which 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 instance.

Note We recommend that you specify an informative name for easy identification. You do not need to use a unique 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 hosted on an Elastic Compute Service (ECS) instance
  • Express: self-managed database connected over Express Connect
  • CEN: self-managed database connected over Cloud Enterprise Network (CEN)
  • dg: self-managed database connected over Database Gateway
Note 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 database.

Note This parameter is required only when the source database is an ApsaraDB RDS for MySQL instance, a PolarDB-X 1.0 instance, or a PolarDB for MySQL cluster.
SourceEndpoint.IP String No 172.16.88.***

The IP address of the source database.

Note This parameter is required only when the source database is a self-managed database.
SourceEndpoint.Port String No 3306

The service port number of the source database.

Note This parameter is required only when the source database is a self-managed database.
SourceEndpoint.UserName String No dtstestaccount

The username of the account that is used to connect to 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 account that is used to connect to the source database.

SourceEndpoint.OracleSID String No testsid

The system ID (SID) of the Oracle database.

Note This parameter is required only when the source database is a self-managed Oracle database and is not deployed in the Real Application Clusters (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 database belongs.

Note This parameter is required only when you track data changes across different Alibaba Cloud accounts.
SourceEndpoint.Role String No ram-for-dts

The RAM role that is authorized to access the source database. This parameter is required if the source database does not belong to the Alibaba Cloud account that you use to configure the change tracking instance. In this case, you must authorize the Alibaba Cloud account to access the source database by using a RAM role.

Note For more information about the permissions that are required for the RAM role and how to grant permissions to 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 instance. Set the value to vpc. A value of vpc indicates the Virtual Private Cloud (VPC) network type.

Note
  • To use the new version of the change tracking feature, you must specify the SubscriptionInstanceNetworkType parameter. You must also specify the SubscriptionInstance.VPCId and SubscriptionInstance.VSwitchID parameters. If you do not specify the SubscriptionInstanceNetworkType parameter, the previous version of the change tracking feature is used.
  • The previous version of the change tracking feature supports self-managed MySQL databases, ApsaraDB RDS for MySQL instances, and PolarDB-X 1.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.
SubscriptionInstance.VPCId String No vpc-bp1vwnn14rqpyiczj****

The ID of the VPC in which the change tracking instance is deployed.

Note This parameter is required only when the SubscriptionInstanceNetworkType parameter is set to vpc.
SubscriptionInstance.VSwitchId String No vsw-bp10df3mxae6lpmku****

The ID of the vSwitch in the specified VPC.

Note This parameter is required only when 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 is discontinued.

Response parameters

Parameter Type Example Description
ErrCode String InternalError

The error code returned if the request failed.

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

The error message returned if the request failed.

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

The ID of the request.

Success String true

Indicates whether the request 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.