Use the ALIYUN::DTS::SynchronizationJob2 type to configure a synchronization job.
Syntax
{
"Type": "ALIYUN::DTS::SynchronizationJob2",
"Properties": {
"Status": String,
"Reserve": Map,
"DataSynchronization": Boolean,
"DelayPhone": String,
"DedicatedClusterId": String,
"ErrorNotice": Boolean,
"DtsJobName": String,
"DelayRuleTime": Integer,
"DtsInstanceId": String,
"DbList": Map,
"FileOssUrl": String,
"DataCheckConfigure": Map,
"DtsBisLabel": String,
"Checkpoint": String,
"DisasterRecoveryJob": Boolean,
"DtsJobId": String,
"DelayNotice": Boolean,
"DataInitialization": Boolean,
"DestinationEndpoint": Map,
"SourceEndpoint": Map,
"ErrorPhone": String,
"StructureInitialization": Boolean,
"SynchronizationDirection": String,
"SrcPrimaryVswId": String,
"MaxDu": Integer,
"DestPrimaryVswId": String,
"DestSecondaryVswId": String,
"SrcSecondaryVswId": String,
"MinDu": Integer,
"ResourceGroupId": String
}
}
Properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraints |
|
Status |
String |
No |
Yes |
The status of the resource. |
Valid values:
|
|
Reserve |
Map |
No |
Yes |
Reserved parameters for DTS. |
Use this parameter to specify additional configurations for the source or destination instance. For example, you can specify the data storage format for a destination Kafka database and the ID of a Cloud Enterprise Network (CEN) instance. |
|
DataSynchronization |
Boolean |
Yes |
Yes |
Specifies whether to perform incremental data migration or incremental data synchronization. |
Valid values:
|
|
DelayPhone |
String |
No |
No |
The mobile phone numbers of contacts who receive latency alerts. |
Separate multiple mobile phone numbers with a comma (,). Note
|
|
DedicatedClusterId |
String |
No |
No |
The ID of the DTS dedicated cluster. |
Used to schedule the data synchronization task to run on the specified DTS dedicated cluster. |
|
ErrorNotice |
Boolean |
No |
No |
Specifies whether to enable error alerts. |
Valid values:
|
|
DtsJobName |
String |
Yes |
Yes |
The name of the data synchronization task. |
We recommend using a descriptive name for easy identification. The name does not need to be unique. |
|
DelayRuleTime |
Integer |
No |
No |
The threshold for triggering a latency alert. |
The value must be an integer. Unit: seconds. To prevent false alarms caused by factors like network jitter and high database workloads, we recommend setting a threshold of 10 seconds or more. Note
This parameter is required if |
|
DtsInstanceId |
String |
No |
No |
The ID of the data synchronization instance. |
None |
|
DbList |
Map |
Yes |
Yes |
The synchronization objects. |
The value is a JSON-formatted string. For more information, see Objects to migrate, synchronize, or subscribe to. |
|
FileOssUrl |
String |
No |
Yes |
The URL of the task file in Object Storage Service (OSS). |
None |
|
DataCheckConfigure |
Map |
No |
No |
The configuration for the data verification task of a data migration or synchronization instance. |
The value is a JSON-formatted string that specifies configurations such as parameter limits and alert settings. For more information, see DataCheckConfigure properties. |
|
DtsBisLabel |
String |
No |
No |
The environment tag of the DTS instance. |
Valid values:
|
|
Checkpoint |
String |
No |
No |
The checkpoint for incremental data migration or data synchronization. |
A UNIX timestamp in seconds. |
|
DisasterRecoveryJob |
Boolean |
No |
No |
Specifies whether the instance is a disaster recovery instance. |
Valid values:
|
|
DtsJobId |
String |
No |
No |
The ID of the data synchronization task. |
None |
|
DelayNotice |
Boolean |
No |
No |
Specifies whether to enable latency alerts. |
Valid values:
|
|
DataInitialization |
Boolean |
Yes |
Yes |
Specifies whether to perform full data migration or initial full data synchronization. |
Valid values:
|
|
DestinationEndpoint |
Map |
Yes |
Yes |
The configuration of the destination instance. |
For more information, see DestinationEndpoint properties. |
|
SourceEndpoint |
Map |
Yes |
Yes |
The configuration of the source instance. |
For more information, see SourceEndpoint properties. |
|
ErrorPhone |
String |
No |
No |
The mobile phone numbers of contacts who receive error alerts. |
Separate multiple mobile phone numbers with a comma (,). Note
|
|
StructureInitialization |
Boolean |
Yes |
Yes |
Specifies whether to perform schema migration or initialization. |
Valid values:
|
|
SynchronizationDirection |
String |
No |
Yes |
The synchronization direction. |
Valid values:
Note
The value Reverse applies only to data synchronization tasks with a two-way topology. |
|
SrcPrimaryVswId |
String |
No |
No |
The ID of the primary VSwitch for the NAT gateway at the source. |
None |
|
MaxDu |
Integer |
No |
No |
The maximum number of DUs. |
This parameter applies only to serverless instances. |
|
DestPrimaryVswId |
String |
No |
No |
The ID of the primary VSwitch for the NAT gateway at the destination. |
None |
|
DestSecondaryVswId |
String |
No |
No |
The ID of the secondary VSwitch for the NAT gateway at the destination. |
None |
|
SrcSecondaryVswId |
String |
No |
No |
The ID of the secondary VSwitch for the NAT gateway at the source. |
None |
|
MinDu |
Integer |
No |
No |
The minimum number of DUs. |
This parameter applies only to serverless instances. |
|
ResourceGroupId |
String |
No |
No |
The ID of the resource group. |
None |
DataCheckConfigure syntax
"DataCheckConfigure": {
"fullCheckMaxReadRps": Integer,
"dataCheckNoticePhone": String,
"incrementalCheckDelayNotice": Boolean,
"incrementalCheckDelayNoticeValue": Integer,
"incrementalCheckDelayNoticePeriod": Integer,
"dataCheckDbList": String,
"checkMaximumHourEnable": Integer,
"fullCheckRatio": Integer,
"checkMaximumHour": Integer,
"fullCheckFixData": Boolean,
"fullCheckModel": Integer,
"incrementalCheckValidFailNoticeValue": Integer,
"incrementalDataCheck": Boolean,
"incrementalCheckValidFailNoticeTimes": Integer,
"fullCheckMaxReadBps": Integer,
"fullCheckValidFailNotice": Boolean,
"fullCheckErrorNotice": Boolean,
"incrementalCheckValidFailNoticePeriod": Integer,
"incrementalCheckDelayNoticeTimes": Integer,
"fullCheckReferEndpoint": String,
"fullDataCheck": Boolean,
"incrementalCheckValidFailNotice": Boolean,
"fullCheckNoticeValue": Integer,
"incrementalCheckErrorNotice": Boolean
}
DataCheckConfigure properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
fullCheckMaxReadRps |
Integer |
No |
No |
The maximum number of data rows read per second. |
The value must be an integer from 0 to 9007199254740991. Note
A value of 0 indicates no limit. |
|
dataCheckNoticePhone |
String |
No |
No |
The mobile phone number of the alert contact for full or incremental data verification tasks. |
When a data verification task triggers an alert, the system sends an SMS notification to the alert contact. |
|
incrementalCheckDelayNotice |
Boolean |
No |
No |
Specifies whether to enable latency alerts for incremental data verification. |
Valid values:
|
|
incrementalCheckDelayNoticeValue |
Integer |
No |
No |
The latency alert threshold for the incremental data verification task. |
Unit: seconds. Note
This parameter is required when incrementalCheckDelayNotice is set to true. |
|
incrementalCheckDelayNoticePeriod |
Integer |
No |
No |
The statistical period for the latency alert of the incremental data verification task. |
Valid values:
Note
This parameter is required when incrementalCheckDelayNotice is set to true. |
|
dataCheckDbList |
String |
No |
No |
The objects for data verification. |
None |
|
checkMaximumHourEnable |
Integer |
No |
No |
Specifies whether to configure a timeout setting for the full data verification task. |
Valid values:
Note
This parameter is required when fullCheckModel is set to 1. |
|
fullCheckRatio |
Integer |
No |
No |
The sampling ratio for the full data verification task. |
The value must be an integer from 10 to 100, representing a percentage. Note
This parameter is required when fullCheckModel is set to 1. |
|
checkMaximumHour |
Integer |
No |
No |
The timeout for the full data verification task. |
Unit: hours. The value must be an integer from 1 to 72. If a task does not complete within this period, the system terminates it. |
|
fullCheckFixData |
Boolean |
No |
No |
Specifies whether to correct inconsistent data. |
Valid values:
|
|
fullCheckModel |
Integer |
No |
No |
The mode of the full data verification task. |
Valid values:
|
|
incrementalCheckValidFailNoticeValue |
Integer |
No |
No |
The alert threshold for inconsistent data in an incremental data verification task. |
This parameter is required when incrementalCheckValidFailNotice is set to true. |
|
incrementalDataCheck |
Boolean |
No |
No |
Specifies whether to perform incremental data verification. |
Valid values:
|
|
incrementalCheckValidFailNoticeTimes |
Integer |
No |
No |
The number of consecutive statistical periods with inconsistent data required to trigger an alert for an incremental data verification task. |
This parameter is required when incrementalCheckValidFailNotice is set to true. |
|
fullCheckMaxReadBps |
Integer |
No |
No |
The maximum data read rate, in bytes per second. |
The value must be an integer from 0 to 9007199254740991. Note
A value of 0 indicates no limit. |
|
fullCheckValidFailNotice |
Boolean |
No |
No |
Specifies whether to enable alerts for inconsistent data found during a full data verification task. |
Valid values:
|
|
fullCheckErrorNotice |
Boolean |
No |
No |
Specifies whether to enable an alert if the full data verification task fails. |
Valid values:
|
|
incrementalCheckValidFailNoticePeriod |
Integer |
No |
No |
The statistical period for inconsistent data alerts during the incremental data verification task. |
Valid values:
Note
This parameter is required when incrementalCheckValidFailNotice is set to true. |
|
incrementalCheckDelayNoticeTimes |
Integer |
No |
No |
The number of consecutive statistical periods of high latency required to trigger a latency alert for an incremental data verification task. |
This parameter is required when incrementalCheckDelayNotice is set to true. |
|
fullCheckReferEndpoint |
String |
No |
No |
The benchmark for full data verification. |
Valid values:
|
|
fullDataCheck |
Boolean |
No |
No |
Specifies whether to perform full data verification. |
Valid values:
|
|
incrementalCheckValidFailNotice |
Boolean |
No |
No |
Specifies whether to enable alerts for inconsistent data found during an incremental data verification task. |
Valid values:
|
|
fullCheckNoticeValue |
Integer |
No |
No |
The alert threshold for inconsistent data in a full data verification task. |
This parameter is required when fullCheckValidFailNotice is set to true. |
|
incrementalCheckErrorNotice |
Boolean |
No |
No |
Specifies whether to enable an alert if the incremental data verification task fails. |
Valid values:
|
Destination endpoint syntax
"DestinationEndpoint": {
"Role": String,
"OracleSID": String,
"UserName": String,
"OwnerID": String,
"InstanceID": String,
"IP": String,
"Port": String,
"DatabaseName": String,
"Region": String,
"InstanceType": String,
"EngineName": String,
"Password": String
}
DestinationEndpoint properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
InstanceType |
String |
Yes |
No |
The type of the destination instance. |
Valid values:
|
|
Role |
String |
No |
No |
The name of the Resource Access Management (RAM) role for the Alibaba Cloud account that owns the destination instance. |
You must specify this property when you migrate or synchronize data across different Alibaba Cloud accounts. |
|
OracleSID |
String |
No |
No |
The system ID (SID) of the Oracle database. |
This property is available and required only when EngineName is set to Oracle and the Oracle database is not a Real Application Clusters (RAC) instance. |
|
UserName |
String |
No |
No |
The database account for the destination database. |
The required permissions for the database account vary based on the migration scenario. For more information, see the configuration examples in Migration scenarios. |
|
OwnerID |
String |
No |
No |
The ID of the Alibaba Cloud account that owns the destination database. |
This property is available and required only for cross-account data migration. |
|
InstanceID |
String |
No |
No |
The ID of the destination instance. |
Set this property to the corresponding instance ID. For example, if InstanceType is set to ECS, specify the ECS instance ID. |
|
IP |
String |
No |
No |
The IP address of the destination database. |
This property is available and required only when InstanceType is set to LocalInstance. |
|
Port |
String |
No |
No |
The service port of the destination database. |
This property is available and required only when InstanceType is set to ECS or LocalInstance. |
|
DatabaseName |
String |
No |
No |
The name of the destination database or the authentication database. |
Valid values:
|
|
Region |
String |
No |
No |
The region ID of the destination instance. |
If InstanceType is set to LocalInstance, you can specify cn-hangzhou or the ID of the region geographically closest to your self-managed database. For more information, see Supported regions. |
|
EngineName |
String |
No |
No |
The engine type of the destination database. |
Valid values:
Note
This property is available and required only when InstanceType is set to RDS, PolarDB, ECS, or LocalInstance. |
|
Password |
String |
No |
Yes |
The password for the destination database account. |
None |
SourceEndpoint syntax
"SourceEndpoint": {
"OracleSID": String,
"UserName": String,
"InstanceID": String,
"IP": String,
"Port": String,
"VSwitchID": String,
"DatabaseName": String,
"EngineName": String,
"Role": String,
"OwnerID": String,
"Region": String,
"InstanceType": String,
"Password": String
}
SourceEndpoint parameters
|
Parameter |
Type |
Required |
Editable |
Description |
Constraint |
|
InstanceType |
String |
Yes |
No |
The type of the source instance. |
Valid values:
|
|
OracleSID |
String |
No |
No |
The system ID (SID) of the Oracle database. |
This parameter is required only if SourceEndpoint.EngineName is set to Oracle and the source database is a non-RAC instance. |
|
UserName |
String |
No |
No |
The source database account. |
The required permissions for the database account vary based on the migration scenario. For more information, see the configuration examples in Migration scenarios. |
|
InstanceID |
String |
No |
No |
The source instance ID. |
|
|
IP |
String |
No |
No |
The IP address of the source database. |
Required if SourceEndpoint.InstanceType is LocalInstance or Express. |
|
Port |
String |
No |
No |
The service port of the source database. |
Required if SourceEndpoint.InstanceType is ECS, LocalInstance, or Express. |
|
VSwitchID |
String |
No |
No |
The ID of the vSwitch used by the data transmission link. |
None |
|
DatabaseName |
String |
No |
No |
The name of the source database or the authentication database. |
|
|
EngineName |
String |
No |
No |
The engine of the source database. |
Valid values:
Note
Required if SourceEndpoint.InstanceType is RDS, PolarDB, ECS, LocalInstance, or Express. |
|
Role |
String |
No |
No |
The RAM role attached to the source instance. |
Required when the source and destination instances belong to different Alibaba Cloud accounts. This RAM role grants the account that owns the destination instance access to the source instance. Note
For more information about the required permissions and how to grant them, see Configure RAM authorization for cross-account data transmission tasks. |
|
OwnerID |
String |
No |
No |
The ID of the Alibaba Cloud account to which the source instance belongs. |
Required for data migration or synchronization across different Alibaba Cloud accounts. |
|
Region |
String |
No |
No |
The ID of the region in which the source database resides. |
If SourceEndpoint.InstanceType is LocalInstance, you can set this parameter to cn-hangzhou or the ID of the region that is geographically closest to your self-managed database. For more information, see Supported regions. |
|
Password |
String |
No |
Yes |
The password for the source database account. |
None |
Return value
Fn::GetAtt
-
DtsJobId: The task ID.
-
DtsJobName: The name of the DTS job.
-
DtsInstanceId: The ID of the DTS instance.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SourceEndpoint:
AssociationPropertyMetadata:
Parameters:
UserName:
Default: null
Type: String
Description:
en: >-
The database account for the source database.
Note: This parameter is required in most cases. The
permissions required for the database account depend on the
migration or synchronization scenario.
Password:
Default: null
Type: String
Description:
en: The password for the source database account.
InstanceID:
Default: null
Type: String
Description:
en: >-
The ID of the source instance.
- If the source instance is an Alibaba Cloud database instance,
such as an ApsaraDB RDS for MySQL instance, specify the ID of the
instance.
- If the source instance is a self-managed database, the value of
this parameter depends on the value of InstanceType:
- If InstanceType is ECS, specify the ID of the ECS
instance.
- If InstanceType is DG, specify the ID of the database
gateway.
- If InstanceType is EXPRESS or CEN, specify the ID
of the VPC to which the source instance is connected.
Note: If DestinationEndpoint.InstanceType is set to
CEN, you must also specify the ID of the CEN instance in the
Reserve parameter.
IP:
Default: null
Type: String
Description:
en: >-
The IP address of the source instance.
Note: This parameter is required only when InstanceType is
set to OTHER, EXPRESS, DG, or CEN.
Region:
Default: null
Type: String
Description:
en: >-
The ID of the region where the source instance is located.
Note: This parameter is required if the source instance is an
Alibaba Cloud database instance.
InstanceType:
Type: String
Description:
en: >-
The type of the source instance. Valid values:
Alibaba Cloud database instances:
- RDS: An ApsaraDB RDS for MySQL, ApsaraDB RDS for SQL Server,
ApsaraDB RDS for PostgreSQL, or ApsaraDB RDS for MariaDB instance.
- PolarDB: A PolarDB for MySQL cluster.
- REDIS: An ApsaraDB for Redis instance.
- DISTRIBUTED_POLARDBX10: A PolarDB-X 1.0 (formerly DRDS)
instance.
- POLARDBX20: A PolarDB-X 2.0 instance.
- MONGODB: An ApsaraDB for MongoDB instance.
- DISTRIBUTED_DMSLOGICDB: A Data Management (DMS) logical
database.
Self-managed databases:
- OTHER: A self-managed database with a public IP address.
- ECS: A self-managed database hosted on an Elastic Compute
Service (ECS) instance.
- EXPRESS: A self-managed database connected over an Express
Connect circuit.
- CEN: A self-managed database connected over Cloud Enterprise
Network (CEN).
- DG: A self-managed database connected over Database Gateway.
Note:
- If the source instance is a PolarDB for PostgreSQL (compatible
with Oracle) cluster, set this parameter to OTHER or
EXPRESS. This allows DTS to connect to the cluster by using a
public IP address or an Express Connect circuit.
- If the source instance is a self-managed database, you must
prepare the required network environment.
VSwitchID:
Default: null
Type: String
Description:
en: The ID of the vSwitch used for the data transmission link.
DatabaseName:
Default: null
Type: String
Description:
en: >-
The name of the database in the source instance that contains the
objects to migrate.
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.
EngineName:
Default: null
Type: String
Description:
en: >-
The database engine of the source instance. Valid values:
- MYSQL: An ApsaraDB RDS for MySQL instance or a self-managed
MySQL database.
- MARIADB: An ApsaraDB RDS for MariaDB TX instance.
- PolarDB: A PolarDB for MySQL cluster.
- POLARDB_O: A PolarDB for PostgreSQL (compatible with Oracle)
cluster.
- POLARDBX10: A PolarDB-X 1.0 instance.
- POLARDBX20: A PolarDB-X 2.0 instance.
- ORACLE: A self-managed Oracle database.
- POSTGRESQL: An ApsaraDB RDS for PostgreSQL instance or a
self-managed PostgreSQL database.
- MSSQL: An ApsaraDB RDS for SQL Server instance or a
self-managed SQL Server database.
- MONGODB: An ApsaraDB for MongoDB instance or a self-managed
MongoDB database.
- DB2: A self-managed Db2 for LUW database.
- AS400: A self-managed Db2 for i database.
- DMSPOLARDB: A DMS logical database.
- HBASE: A self-managed HBase database.
- TERADATA: A Teradata database.
- TiDB: A TiDB database.
- REDIS: An ApsaraDB for Redis instance or a self-managed
Redis database.
Note: The default value is MYSQL. If EngineName is set
to MONGODB, you must also specify the architecture type of the
MongoDB database in the Reserve parameter.
Role:
Default: null
Type: String
Description:
en: >-
The name of the Resource Access Management (RAM) role that is
configured for the Alibaba Cloud account that owns the source
instance.
Note: This parameter is required when you migrate or
synchronize data across different Alibaba Cloud accounts.
OwnerID:
Default: null
Type: String
Description:
en: >-
The ID of the Alibaba Cloud account to which the source database
belongs.
Note: You can specify this parameter to migrate or synchronize
data across different Alibaba Cloud accounts. In this case, you
must also specify the Role parameter.
OracleSID:
Default: null
Type: String
Description:
en: >-
The system ID (SID) of the Oracle database.
Note: This parameter is required only when EngineName is
set to ORACLE and the Oracle database is not deployed in a
Real Application Cluster (RAC) architecture.
Port:
Default: null
Type: String
Description:
en: >-
The port number of the source instance.
Note: This parameter is required only when the source instance
is a self-managed database.
Type: Json
Description:
en: The configuration of the source instance.
Checkpoint:
Default: null
Type: String
Description:
en: >-
The starting point of incremental data migration or synchronization.
This value is a UNIX timestamp that represents the number of seconds
that have elapsed since 00:00:00 UTC on January 1, 1970.
Status:
Default: null
Type: String
Description:
en: |-
The status of the task. You can change the status of the task by changing the value of this parameter. Valid values:
- Synchronizing: Starts the task.
- Suspending: Suspends the task.
- Stopping: Stops the task.
AllowedValues:
- Synchronizing
- Suspending
- Stopping
DisasterRecoveryJob:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether the task is for disaster recovery. Valid values:
true and false.
DtsJobId:
Default: null
Type: String
Description:
en: The ID of the DTS task.
DtsJobName:
Type: String
Description:
en: The name of the DTS task.
DataSynchronization:
Type: Boolean
Description:
en: >-
Specifies whether to perform incremental data migration or
synchronization. Default value: false. Valid values: true and
false.
SynchronizationDirection:
Default: null
Type: String
Description:
en: >-
The synchronization direction. Valid values:
- Forward: Data is synchronized from the source database to the
destination database. This is the default value.
- Reverse: Data is synchronized from the destination database to the
source database.
Note: The Reverse option is valid only if the data
synchronization task is configured for a two-way synchronization
topology.
DataCheckConfigure:
Default: null
AssociationPropertyMetadata:
Parameters:
fullCheckErrorNotice:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to trigger an alert if the full data
verification task fails. Valid values: true and false.
fullCheckValidFailNotice:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to trigger an alert if inconsistent data is
found during full data verification. If you set this parameter to
true, an alert is triggered when the number of inconsistent
data entries is greater than or equal to the specified threshold.
Valid values: true and false.
incrementalCheckValidFailNotice:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to trigger an alert if inconsistent data is
found during incremental data verification. If you set this
parameter to true, an alert is triggered when the cumulative
number of inconsistent data entries across several statistical
periods is greater than or equal to the specified threshold. Valid
values: true and false.
dataCheckNoticePhone:
Default: null
Type: String
Description:
en: >-
The mobile phone number of the contact person for data
verification alerts. If an alert is triggered, a text message is
sent to this number.
fullCheckReferEndpoint:
Default: null
Type: String
Description:
en: >-
The benchmark for full data verification. Valid values:
- all: Verifies data consistency based on all objects in both
the source and destination databases.
- src: Verifies data consistency based on the objects in the
source database. Objects that exist only in the destination
database are not verified.
- dest: Verifies data consistency based on the objects in the
destination database. Objects that exist only in the source
database are not verified.
fullCheckModel:
Default: null
Type: Number
Description:
en: |-
The mode for full data verification. Valid values:
- 1: Verifies a sample of the data.
- 2: Verifies all data row by row.
AllowedValues:
- 1
- 2
incrementalCheckDelayNotice:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to trigger an alert for incremental data
verification latency. If you set this parameter to true, an
alert is triggered when the cumulative latency across several
statistical periods is greater than or equal to the specified
threshold. Valid values: true and false.
incrementalCheckValidFailNoticePeriod:
Default: null
Type: Number
Description:
en: >-
The statistical period for detecting inconsistent data during
incremental verification. This parameter is required if the
incrementalCheckValidFailNotice parameter is set to true.
Unit: minutes. Valid values:
- 1: 1 minute
- 2: 5 minutes
- 3: 10 minutes
- 4: 30 minutes
AllowedValues:
- 1
- 2
- 3
- 4
incrementalCheckDelayNoticeTimes:
Default: null
Type: Number
Description:
en: >-
The number of consecutive statistical periods where latency is
detected before an alert is triggered.
Note: This parameter is required if the
incrementalCheckDelayNotice parameter is set to true.
fullCheckMaxReadBps:
Default: null
MinValue: 0
Type: Number
Description:
en: >-
The maximum read throughput for full data verification, in bytes
per second. Valid values are integers from 0 to 9007199254740991.
MaxValue: 9007199254740991
incrementalCheckValidFailNoticeTimes:
Default: null
Type: Number
Description:
en: >-
The number of consecutive statistical periods where inconsistent
data is detected before an alert is triggered.
Note: This parameter is required if the
incrementalCheckValidFailNotice parameter is set to true.
fullCheckMaxReadRps:
Default: null
MinValue: 0
Type: Number
Description:
en: >-
The maximum number of rows read per second during full data
verification. Valid values are integers from 0 to
9007199254740991.
MaxValue: 9007199254740991
incrementalCheckValidFailNoticeValue:
Default: null
Type: Number
Description:
en: >-
The number of inconsistent data entries that triggers an alert
during incremental verification.
Note: This parameter is required if the
incrementalCheckValidFailNotice parameter is set to true.
fullDataCheck:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to perform a full data verification task. Valid
values: true and false.
fullCheckRatio:
Default: null
MinValue: 10
Type: Number
Description:
en: >-
The sampling rate for full data verification. Unit: percent.
Note: This parameter is required if the fullCheckModel
parameter is set to 1.
MaxValue: 100
incrementalCheckDelayNoticeValue:
Default: null
Type: Number
Description:
en: >-
The latency threshold that triggers an alert during incremental
verification. Unit: seconds.
Note: This parameter is required if the
incrementalCheckDelayNotice parameter is set to true.
checkMaximumHourEnable:
Default: null
Type: Number
Description:
en: >-
Specifies whether to enable a timeout for the full data
verification task. Valid values:
- 0: Disables the timeout.
- 1: Enables the timeout.
Note: This parameter is required if the fullCheckModel
parameter is set to 1.
AllowedValues:
- 0
- 1
dataCheckDbList:
Default: null
Type: String
Description:
en: >-
The database objects to verify. The value must be a
JSON-formatted string.
incrementalCheckErrorNotice:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to trigger an alert if the incremental data
verification task fails. Valid values: true and false.
checkMaximumHour:
Default: null
MinValue: 1
Type: Number
Description:
en: >-
The timeout period for the full data verification task, in hours.
The countdown starts when the task begins. If the task does not
complete within this period, it is forcibly stopped. Valid values:
1 to 72.
MaxValue: 72
incrementalCheckDelayNoticePeriod:
Default: null
Type: Number
Description:
en: >-
The statistical period for an alert on the data latency of the
incremental data verification task. Unit: minutes. Valid values:
- 1: 1 minute
- 2: 5 minutes
- 3: 10 minutes
- 4: 30 minutes
Note: This parameter is required if the
incrementalCheckDelayNotice parameter is set to true.
AllowedValues:
- 1
- 2
- 3
- 4
fullCheckFixData:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to automatically correct inconsistent data. If
set to true, data in the destination database that is
inconsistent with the source database is overwritten with the
source data. Default value: false. Valid values: true and
false.
fullCheckNoticeValue:
Default: null
Type: Number
Description:
en: >-
The number of inconsistent data entries that triggers an alert
during full verification.
Note: This parameter is required if the
fullCheckValidFailNotice parameter is set to true.
incrementalDataCheck:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to perform an incremental data verification
task. Valid values: true and false.
Type: Json
Description:
en: >-
The configuration for the data verification task.
StructureInitialization:
Type: Boolean
Description:
en: >-
Specifies whether to perform schema migration or synchronization.
Default value: true. Valid values: true and false.
DelayRuleTime:
Default: null
Type: Number
Description:
en: >-
The latency threshold for triggering an alert, in seconds. You can set
this value based on your business requirements. We recommend that you
set the threshold to more than 10 seconds to avoid false alarms caused
by transient network or database load fluctuations.
ErrorPhone:
Default: null
Type: String
Description:
en: >-
The mobile phone numbers to which task status alerts are sent. Separate
multiple numbers with commas (,).
Note: This parameter is available only for accounts on the Alibaba
Cloud China site (aliyun.com). Only mobile phone numbers in mainland
China are supported. You can specify up to 10 numbers. Users on the
Alibaba Cloud International site (alibabacloud.com) cannot receive SMS
alerts. Instead, you can configure alert rules for DTS tasks in the
CloudMonitor console.
DtsInstanceId:
Default: null
Type: String
Description:
en: The ID of the DTS instance.
DestinationEndpoint:
AssociationPropertyMetadata:
Parameters:
UserName:
Default: null
Type: String
Description:
en: >-
The database account for the destination database.
Note: This parameter is required in most cases. The
permissions required for the database account depend on the
migration or synchronization scenario.
Password:
Default: null
Type: String
Description:
en: The password for the destination database account.
InstanceID:
Default: null
Type: String
Description:
en: >-
The ID of the destination instance.
- If the destination instance is an Alibaba Cloud database
instance, such as an ApsaraDB RDS for MySQL instance, specify the
ID of the instance.
- If the destination instance is a self-managed database, the
value of this parameter depends on the value of InstanceType:
- If InstanceType is ECS, specify the ID of the ECS
instance.
- If InstanceType is DG, specify the ID of the database
gateway.
- If InstanceType is EXPRESS or CEN, specify the ID
of the VPC to which the destination instance is connected.
Note: If DestinationEndpoint.InstanceType is set to
CEN, you must also specify the ID of the CEN instance in the
Reserve parameter.
IP:
Default: null
Type: String
Description:
en: >-
The IP address of the destination instance.
Note: This parameter is required only when InstanceType is
set to OTHER, EXPRESS, DG, or CEN.
Region:
Default: null
Type: String
Description:
en: >-
The ID of the region where the destination instance is located.
Note: This parameter is required if the destination instance
is an Alibaba Cloud database instance.
InstanceType:
Type: String
Description:
en: >-
The type of the destination instance. Valid values:
Alibaba Cloud database instances:
- RDS: An ApsaraDB RDS for MySQL, ApsaraDB RDS for SQL Server,
ApsaraDB RDS for PostgreSQL, or ApsaraDB RDS for MariaDB instance.
- PolarDB: A PolarDB for MySQL cluster.
- DISTRIBUTED_POLARDBX10: A PolarDB-X 1.0 (formerly DRDS)
instance.
- POLARDBX20: A PolarDB-X 2.0 instance.
- REDIS: An ApsaraDB for Redis instance.
- ADS: An AnalyticDB for MySQL V2.0 or V3.0 cluster.
- MONGODB: An ApsaraDB for MongoDB instance.
- GREENPLUM: An AnalyticDB for PostgreSQL instance.
- DATAHUB: A DataHub project.
- ELK: An Elasticsearch cluster.
- Tablestore: A Tablestore instance.
- ODPS: A MaxCompute project.
Self-managed databases:
- OTHER: A self-managed database with a public IP address.
- ECS: A self-managed database hosted on an ECS instance.
- EXPRESS: A self-managed database connected over an Express
Connect circuit.
- CEN: A self-managed database connected over CEN.
- DG: A self-managed database connected over Database Gateway.
Note:
- If the destination instance is a PolarDB for PostgreSQL
(compatible with Oracle) cluster, you must set this parameter to
OTHER or EXPRESS.
- If the destination instance is a Message Queue for Apache Kafka
instance, you must set this parameter to ECS or EXPRESS.
- If the destination instance is a self-managed database, you must
prepare the required network environment.
Role:
Default: null
Type: String
Description:
en: >-
The name of the RAM role that is configured for the Alibaba Cloud
account that owns the destination instance.
Note: This parameter is required when you migrate or
synchronize data across different Alibaba Cloud accounts.
DatabaseName:
Default: null
Type: String
Description:
en: >-
The name of the database in the destination instance that contains
the objects to migrate.
Note: This parameter is required only when the destination
instance is a PolarDB for PostgreSQL (compatible with Oracle)
cluster, a PostgreSQL database, or a MongoDB database.
EngineName:
Default: null
Type: String
Description:
en: >-
The database engine of the destination instance. Valid values:
- MYSQL: An ApsaraDB RDS for MySQL instance or a self-managed
MySQL database.
- MARIADB: An ApsaraDB RDS for MariaDB TX instance.
- PolarDB: A PolarDB for MySQL cluster.
- POLARDB_O: A PolarDB for PostgreSQL (compatible with Oracle)
cluster.
- POLARDBX10: A PolarDB-X 1.0 instance.
- POLARDBX20: A PolarDB-X 2.0 instance.
- ORACLE: A self-managed Oracle database.
- POSTGRESQL: An ApsaraDB RDS for PostgreSQL instance or a
self-managed PostgreSQL database.
- MSSQL: An ApsaraDB RDS for SQL Server instance or a
self-managed SQL Server database.
- ADS: An AnalyticDB for MySQL V2.0 cluster.
- ADB30: An AnalyticDB for MySQL V3.0 cluster.
- MONGODB: An ApsaraDB for MongoDB instance or a self-managed
MongoDB database.
- GREENPLUM: An AnalyticDB for PostgreSQL instance.
- KAFKA: A Message Queue for Apache Kafka instance or a
self-managed Kafka cluster.
- DATAHUB: A DataHub project.
- DB2: A self-managed Db2 for LUW database.
- AS400: A self-managed Db2 for i database.
- ODPS: A MaxCompute project.
- Tablestore: A Tablestore instance.
- ELK: An Elasticsearch cluster.
- REDIS: An ApsaraDB for Redis instance or a self-managed
Redis database.
Note: The default value is MYSQL. If this parameter is set
to KAFKA, MONGODB, or PolarDB, you must also specify
the database information in the Reserve parameter.
OwnerID:
Default: null
Type: String
Description:
en: >-
The ID of the Alibaba Cloud account to which the destination
database belongs.
Note: You can specify this parameter to migrate or synchronize
data across different Alibaba Cloud accounts. In this case, you
must also specify the Role parameter.
OracleSID:
Default: null
Type: String
Description:
en: >-
The system ID (SID) of the Oracle database.
Note: This parameter is required only when EngineName is
set to ORACLE and the Oracle database is not deployed in a
Real Application Cluster (RAC) architecture.
Port:
Default: null
Type: String
Description:
en: >-
The port number of the destination instance.
Note: This parameter is required only when the destination
instance is a self-managed database.
Type: Json
Description:
en: The configuration of the destination instance.
ErrorNotice:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to enable alerts for task errors. Valid values:
true and false.
FileOssUrl:
Default: null
Type: String
Description:
en: >-
The URL of the Object Storage Service (OSS) bucket that stores files
related to the DTS task.
Reserve:
Default: null
Type: Json
Description:
en: >-
A reserved parameter that allows you to specify additional
configurations for the DTS task. For example, you can specify the data
storage format for a destination Kafka instance or the ID of a CEN
instance.
DelayPhone:
Default: null
Type: String
Description:
en: >-
The mobile phone numbers to which latency-related alerts are sent.
Separate multiple numbers with commas (,).
Note: This parameter is available only for accounts on the Alibaba
Cloud China site (aliyun.com). Only mobile phone numbers in mainland
China are supported. You can specify up to 10 numbers. Users on the
Alibaba Cloud International site (alibabacloud.com) cannot receive SMS
alerts. Instead, you can configure alert rules for DTS tasks in the
CloudMonitor console.
DelayNotice:
Default: null
Type: Boolean
Description:
en: >-
Specifies whether to enable alerts for task latency. Valid values:
true and false.
DataInitialization:
Type: Boolean
Description:
en: >-
Specifies whether to perform full data migration or synchronization.
Default value: true. Valid values: true and false.
DtsBisLabel:
Default: null
Type: String
Description:
en: >-
The environment tag of the DTS instance. Valid values: normal and
online.
DbList:
Type: Json
Description:
en: >-
The database objects to migrate or synchronize. The value must be a
JSON-formatted string.
DedicatedClusterId:
Default: null
Type: String
Description:
en: The ID of the DTS dedicated cluster on which the task runs.
Resources:
SynchronizationJob:
Type: 'ALIYUN::DTS::SynchronizationJob2'
Properties:
SourceEndpoint:
Ref: SourceEndpoint
Checkpoint:
Ref: Checkpoint
Status:
Ref: Status
DisasterRecoveryJob:
Ref: DisasterRecoveryJob
DtsJobId:
Ref: DtsJobId
DtsJobName:
Ref: DtsJobName
DataSynchronization:
Ref: DataSynchronization
SynchronizationDirection:
Ref: SynchronizationDirection
DataCheckConfigure:
Ref: DataCheckConfigure
StructureInitialization:
Ref: StructureInitialization
DelayRuleTime:
Ref: DelayRuleTime
ErrorPhone:
Ref: ErrorPhone
DtsInstanceId:
Ref: DtsInstanceId
DestinationEndpoint:
Ref: DestinationEndpoint
ErrorNotice:
Ref: ErrorNotice
FileOssUrl:
Ref: FileOssUrl
Reserve:
Ref: Reserve
DelayPhone:
Ref: DelayPhone
DelayNotice:
Ref: DelayNotice
DataInitialization:
Ref: DataInitialization
DtsBisLabel:
Ref: DtsBisLabel
DbList:
Ref: DbList
DedicatedClusterId:
Ref: DedicatedClusterId
Outputs:
DtsJobName:
Description: The name of the DTS task.
Value:
'Fn::GetAtt':
- SynchronizationJob
- DtsJobName
DtsInstanceId:
Description: The ID of the DTS instance.
Value:
'Fn::GetAtt':
- SynchronizationJob
- DtsInstanceId
DtsJobId:
Description: The ID of the DTS task.
Value:
'Fn::GetAtt':
- SynchronizationJob
- DtsJobId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SourceEndpoint": {
"AssociationPropertyMetadata": {
"Parameters": {
"UserName": {
"Default": null,
"Type": "String",
"Description": {
"en": "The account of the source database.\nNote: This parameter is required in most cases. The permissions required for the database account depend on the migration or synchronization scenario."
}
},
"Password": {
"Default": null,
"Type": "String",
"Description": {
"en": "The password of the source database account."
}
},
"InstanceID": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the source instance. If the source instance is an Alibaba Cloud database instance, you must specify its 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.\nIf the source instance is a self-managed database, the value of this parameter depends on the value of InstanceType:\n- If InstanceType is set to ECS, specify the ID of the ECS instance.\n- If InstanceType is set to DG, specify the ID of the database gateway.\n- If InstanceType is set to EXPRESS or CEN, specify the ID of the VPC that is connected to the source instance.\nNote: If DestinationEndpoint.InstanceType is set to CEN, you must also specify the ID of the CEN instance in the Reserve parameter."
}
},
"IP": {
"Default": null,
"Type": "String",
"Description": {
"en": "The IP address of the source instance.\nNote: This parameter is required only when InstanceType is set to OTHER, EXPRESS, DG, or CEN."
}
},
"Region": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the region in which the source instance resides.\nNote: This parameter is required if the source instance is an Alibaba Cloud database instance."
}
},
"InstanceType": {
"Type": "String",
"Description": {
"en": "The type of the source instance. Valid values:\n\nAlibaba Cloud database instances:\n- RDS: An ApsaraDB RDS for MySQL, ApsaraDB RDS for SQL Server, ApsaraDB RDS for PostgreSQL, or ApsaraDB RDS for MariaDB TX instance.\n- PolarDB: A PolarDB for MySQL cluster.\n- REDIS: An ApsaraDB for Redis instance.\n- DISTRIBUTED_POLARDBX10: A PolarDB-X 1.0 (formerly DRDS) instance.\n- POLARDBX20: A PolarDB-X 2.0 instance.\n- MONGODB: An ApsaraDB for MongoDB instance.\n- DISTRIBUTED_DMSLOGICDB: A Data Management (DMS) logical database.\n\nSelf-managed databases:\n- OTHER: A self-managed database that has a public IP address.\n- ECS: A self-managed database that is hosted on an Elastic Compute Service (ECS) instance.\n- EXPRESS: A self-managed database that is connected over Express Connect.\n- CEN: A self-managed database that is connected over Cloud Enterprise Network (CEN).\n- DG: A self-managed database that is connected over Database Gateway.\n\nNote: If the source instance is a PolarDB for PostgreSQL (compatible with Oracle) cluster, you must set this parameter to OTHER or EXPRESS. This allows you to connect the cluster to DTS as a self-managed database by using a public IP address or an Express Connect circuit. If the source instance is a self-managed database, you must configure the required network environment."
}
},
"VSwitchID": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the vSwitch that is used for the data transmission link."
}
},
"DatabaseName": {
"Default": null,
"Type": "String",
"Description": {
"en": "The name of the source database that contains the objects to be migrated.\nNote: 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."
}
},
"EngineName": {
"Default": null,
"Type": "String",
"Description": {
"en": "The database engine of the source instance. Valid values:\n- MYSQL: An ApsaraDB RDS for MySQL instance or a self-managed MySQL database.\n- MARIADB: An ApsaraDB RDS for MariaDB TX instance.\n- PolarDB: A PolarDB for MySQL cluster.\n- POLARDB_O: A PolarDB for PostgreSQL (compatible with Oracle) cluster.\n- POLARDBX10: A PolarDB-X 1.0 instance.\n- POLARDBX20: A PolarDB-X 2.0 instance.\n- ORACLE: A self-managed Oracle database.\n- POSTGRESQL: An ApsaraDB RDS for PostgreSQL instance or a self-managed PostgreSQL database.\n- MSSQL: An ApsaraDB RDS for SQL Server instance or a self-managed SQL Server database.\n- MONGODB: An ApsaraDB for MongoDB instance or a self-managed MongoDB database.\n- DB2: A self-managed Db2 for LUW database.\n- AS400: A self-managed Db2 for i database.\n- DMSPOLARDB: A DMS logical database.\n- HBASE: A self-managed HBase database.\n- TERADATA: A Teradata database.\n- TiDB: A TiDB database.\n- REDIS: An ApsaraDB for Redis instance or a self-managed Redis database.\nNote: The default value is MYSQL. If you set EngineName to MONGODB, you must also specify the architecture type of the MongoDB database in the Reserve parameter."
}
},
"Role": {
"Default": null,
"Type": "String",
"Description": {
"en": "The name of the Resource Access Management (RAM) role configured for the Alibaba Cloud account that owns the source instance.\nNote: This parameter is required when you migrate or synchronize data across different Alibaba Cloud accounts."
}
},
"OwnerID": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the Alibaba Cloud account to which the source database belongs.\nNote: You can specify this parameter to migrate or synchronize data across different Alibaba Cloud accounts. In this case, you must also specify the Role parameter."
}
},
"OracleSID": {
"Default": null,
"Type": "String",
"Description": {
"en": "The system ID (SID) of the Oracle database.\nNote: This parameter is required only when EngineName is set to ORACLE and the Oracle database is not deployed in a Real Application Clusters (RAC) architecture."
}
},
"Port": {
"Default": null,
"Type": "String",
"Description": {
"en": "The port number of the source instance.\nNote: This parameter is required only when the source instance is a self-managed database."
}
}
}
},
"Type": "Json",
"Description": {
"en": "Configuration of the source instance."
}
},
"Checkpoint": {
"Default": null,
"Type": "String",
"Description": {
"en": "The start time of incremental data migration or synchronization. This value is a UNIX timestamp that represents the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970."
}
},
"Status": {
"Default": null,
"Type": "String",
"Description": {
"en": "The state to which you want to change the task. Valid values:\n- Synchronizing: Starts the task.\n- Suspending: Suspends the task.\n- Stopping: Stops the task."
},
"AllowedValues": [
"Synchronizing",
"Suspending",
"Stopping"
]
},
"DisasterRecoveryJob": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether the task is for disaster recovery. Valid values: true and false."
}
},
"DtsJobId": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the DTS task."
}
},
"DtsJobName": {
"Type": "String",
"Description": {
"en": "The name of the DTS task."
}
},
"DataSynchronization": {
"Type": "Boolean",
"Description": {
"en": "Specifies whether to perform incremental data synchronization. Default value: false. Valid values: true and false."
}
},
"SynchronizationDirection": {
"Default": null,
"Type": "String",
"Description": {
"en": "The synchronization direction. Valid values:\n- Forward: Data is synchronized from the source database to the destination database.\n- Reverse: Data is synchronized from the destination database to the source database.\nNote: The default value is Forward. The Reverse option is only valid for two-way synchronization tasks."
}
},
"DataCheckConfigure": {
"Default": null,
"AssociationPropertyMetadata": {
"Parameters": {
"fullCheckErrorNotice": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to trigger an alert if the full data verification task fails. Valid values: true and false."
}
},
"fullCheckValidFailNotice": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to trigger an alert if the full data verification task detects inconsistent data. Valid values: true and false.\nNote: If you set this parameter to true, an alert is triggered when the number of inconsistent data entries is greater than or equal to the value of the fullCheckNoticeValue parameter."
}
},
"incrementalCheckValidFailNotice": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to trigger an alert if the incremental data verification task detects inconsistent data. Valid values: true and false.\nNote: If you set this parameter to true, an alert is triggered when the cumulative number of inconsistent data entries reaches the threshold specified by incrementalCheckValidFailNoticeValue over the number of periods specified by incrementalCheckValidFailNoticeTimes."
}
},
"dataCheckNoticePhone": {
"Default": null,
"Type": "String",
"Description": {
"en": "The mobile phone numbers of the contacts to notify when a data verification alert is triggered. If an alert is triggered, a text message is sent to these numbers. Separate multiple mobile phone numbers with commas (,)."
}
},
"fullCheckReferEndpoint": {
"Default": null,
"Type": "String",
"Description": {
"en": "The reference database for full data verification. This determines which database is used as the source of truth for comparison. Valid values:\n- all: Compares all objects in the source database with all objects in the destination database.\n- src: Uses the source database as the benchmark. Objects that exist only in the destination database are not checked for consistency.\n- dest: Uses the destination database as the benchmark. Objects that exist only in the source database are not checked for consistency."
}
},
"fullCheckModel": {
"Default": null,
"Type": "Number",
"Description": {
"en": "The mode of the full data verification task. Valid values:\n- 1: Verifies a sample of the data based on a specified ratio.\n- 2: Verifies all data on a row-by-row basis."
},
"AllowedValues": [
1,
2
]
},
"incrementalCheckDelayNotice": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to trigger an alert for the latency of the incremental data verification task. Valid values: true and false.\nNote: If you set this parameter to true, an alert is triggered when the cumulative latency reaches the threshold specified by incrementalCheckDelayNoticeValue over the number of periods specified by incrementalCheckDelayNoticeTimes."
}
},
"incrementalCheckValidFailNoticePeriod": {
"Default": null,
"Type": "Number",
"Description": {
"en": "The time window for aggregating inconsistent data statistics for the incremental data verification task. An alert is triggered if the threshold is met within this period. Valid values:\n- 1: 1 minute\n- 2: 5 minutes\n- 3: 10 minutes\n- 4: 30 minutes\nNote: This parameter is required if incrementalCheckValidFailNotice is set to true."
},
"AllowedValues": [
1,
2,
3,
4
]
},
"incrementalCheckDelayNoticeTimes": {
"Default": null,
"Type": "Number",
"Description": {
"en": "The number of consecutive statistical periods for which latency is measured. An alert is triggered if the latency threshold is exceeded for this number of consecutive periods.\nNote: This parameter is required if incrementalCheckDelayNotice is set to true."
}
},
"fullCheckMaxReadBps": {
"Default": null,
"MinValue": 0,
"Type": "Number",
"Description": {
"en": "The maximum read throughput for the full data verification task, in bytes per second. Valid values are integers from 0 to 9007199254740991."
},
"MaxValue": 9007199254740991
},
"incrementalCheckValidFailNoticeTimes": {
"Default": null,
"Type": "Number",
"Description": {
"en": "The number of consecutive statistical periods for which inconsistent data is counted. An alert is triggered if the inconsistency threshold is exceeded for this number of consecutive periods.\nNote: This parameter is required if incrementalCheckValidFailNotice is set to true."
}
},
"fullCheckMaxReadRps": {
"Default": null,
"MinValue": 0,
"Type": "Number",
"Description": {
"en": "The maximum number of rows read per second for the full data verification task. Valid values are integers from 0 to 9007199254740991."
},
"MaxValue": 9007199254740991
},
"incrementalCheckValidFailNoticeValue": {
"Default": null,
"Type": "Number",
"Description": {
"en": "The threshold for the number of inconsistent data entries that triggers an alert during incremental data verification.\nNote: This parameter is required if incrementalCheckValidFailNotice is set to true."
}
},
"fullDataCheck": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to perform a full data verification task. Valid values: true and false."
}
},
"fullCheckRatio": {
"Default": null,
"MinValue": 10,
"Type": "Number",
"Description": {
"en": "The sampling ratio for the full data verification task. Valid values are integers from 10 to 100. Unit: percent.\nNote: This parameter is required if fullCheckModel is set to 1 (verify by sampling ratio)."
},
"MaxValue": 100
},
"incrementalCheckDelayNoticeValue": {
"Default": null,
"Type": "Number",
"Description": {
"en": "The latency threshold that triggers an alert for the incremental data verification task. Unit: seconds.\nNote: This parameter is required if incrementalCheckDelayNotice is set to true."
}
},
"checkMaximumHourEnable": {
"Default": null,
"Type": "Number",
"Description": {
"en": "Specifies whether to enable a timeout period for the full data verification task. Valid values:\n- 0: Disable the timeout period.\n- 1: Enable the timeout period.\nNote: This parameter is required if fullCheckModel is set to 1."
},
"AllowedValues": [
0,
1
]
},
"dataCheckDbList": {
"Default": null,
"Type": "String",
"Description": {
"en": "The database objects to be verified. The value must be a JSON-formatted string."
}
},
"incrementalCheckErrorNotice": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to trigger an alert if the incremental data verification task fails. Valid values: true and false."
}
},
"checkMaximumHour": {
"Default": null,
"MinValue": 1,
"Type": "Number",
"Description": {
"en": "The timeout period for the full data verification task, in hours. Valid values are integers from 1 to 72. The countdown starts when the task begins. If the task does not complete within this period, it is forcibly stopped."
},
"MaxValue": 72
},
"incrementalCheckDelayNoticePeriod": {
"Default": null,
"Type": "Number",
"Description": {
"en": "The time window for aggregating latency statistics for the incremental data verification task. An alert is triggered if the latency threshold is met within this period. Valid values:\n- 1: 1 minute\n- 2: 5 minutes\n- 3: 10 minutes\n- 4: 30 minutes\nNote: This parameter is required if incrementalCheckDelayNotice is set to true."
},
"AllowedValues": [
1,
2,
3,
4
]
},
"fullCheckFixData": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to automatically repair inconsistent data found during full data verification. Valid values: true and false. Default value: false.\nNote: If you set this parameter to true, data in the destination database that is inconsistent with the source database will be overwritten with data from the source database."
}
},
"fullCheckNoticeValue": {
"Default": null,
"Type": "Number",
"Description": {
"en": "The threshold for the number of inconsistent data entries that triggers an alert during full data verification.\nNote: This parameter is required if fullCheckValidFailNotice is set to true."
}
},
"incrementalDataCheck": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to perform an incremental data verification task. Valid values: true and false."
}
}
}
},
"Type": "Json",
"Description": {
"en": "The configuration for the data verification task."
}
},
"StructureInitialization": {
"Type": "Boolean",
"Description": {
"en": "Specifies whether to perform schema migration or schema synchronization. Default value: true. Valid values: true and false."
}
},
"DelayRuleTime": {
"Default": null,
"Type": "Number",
"Description": {
"en": "The threshold for latency alerts. Unit: seconds. You can set the threshold based on your business requirements. To prevent jitters caused by network and database overloads, we recommend that you set the threshold to more than 10 seconds."
}
},
"ErrorPhone": {
"Default": null,
"Type": "String",
"Description": {
"en": "The mobile phone numbers that receive status-related alerts. Separate multiple mobile phone numbers with commas (,).\nNote: This parameter is available only for accounts on the Alibaba Cloud China site (aliyun.com). Only mobile numbers in mainland China are supported. You can specify up to 10 mobile numbers. Users on the Alibaba Cloud International site (alibabacloud.com) cannot receive alerts by using mobile numbers, but can configure alert rules for DTS tasks in the CloudMonitor console."
}
},
"DtsInstanceId": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the DTS instance."
}
},
"DestinationEndpoint": {
"AssociationPropertyMetadata": {
"Parameters": {
"UserName": {
"Default": null,
"Type": "String",
"Description": {
"en": "The database account of the destination database.\nNote: This parameter is required in most cases. The permissions required for the database account depend on the migration or synchronization scenario."
}
},
"Password": {
"Default": null,
"Type": "String",
"Description": {
"en": "The password of the destination database account."
}
},
"InstanceID": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the destination instance. If the destination instance is an Alibaba Cloud database instance, you must specify its 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.\nIf the destination instance is a self-managed database, the value of this parameter depends on the value of InstanceType:\n- If InstanceType is set to ECS, specify the ID of the ECS instance.\n- If InstanceType is set to DG, specify the ID of the database gateway.\n- If InstanceType is set to EXPRESS or CEN, specify the ID of the VPC that is connected to the destination instance.\nNote: If DestinationEndpoint.InstanceType is set to CEN, you must also specify the ID of the CEN instance in the Reserve parameter."
}
},
"IP": {
"Default": null,
"Type": "String",
"Description": {
"en": "The IP address of the destination instance.\nNote: This parameter is required only when InstanceType is set to OTHER, EXPRESS, DG, or CEN."
}
},
"Region": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the region in which the destination instance resides.\nNote: This parameter is required if the destination instance is an Alibaba Cloud database instance."
}
},
"InstanceType": {
"Type": "String",
"Description": {
"en": "The type of the destination instance. Valid values:\n\nAlibaba Cloud database instances:\n- RDS: An ApsaraDB RDS for MySQL, ApsaraDB RDS for SQL Server, ApsaraDB RDS for PostgreSQL, or ApsaraDB RDS for MariaDB TX instance.\n- PolarDB: A PolarDB for MySQL cluster.\n- DISTRIBUTED_POLARDBX10: A PolarDB-X 1.0 (formerly DRDS) instance.\n- POLARDBX20: A PolarDB-X 2.0 instance.\n- REDIS: An ApsaraDB for Redis instance.\n- ADS: An AnalyticDB for MySQL V2.0 or V3.0 cluster.\n- MONGODB: An ApsaraDB for MongoDB instance.\n- GREENPLUM: An AnalyticDB for PostgreSQL instance.\n- DATAHUB: A DataHub project.\n- ELK: An Elasticsearch cluster.\n- Tablestore: A Tablestore instance.\n- ODPS: A MaxCompute project.\n\nSelf-managed databases:\n- OTHER: A self-managed database that has a public IP address.\n- ECS: A self-managed database that is hosted on an ECS instance.\n- EXPRESS: A self-managed database that is connected over Express Connect.\n- CEN: A self-managed database that is connected over CEN.\n- DG: A self-managed database that is connected over Database Gateway.\n\nNote: If the destination instance is a PolarDB for PostgreSQL (compatible with Oracle) cluster, you must set this parameter to OTHER or EXPRESS. This allows you to connect the cluster to DTS as a self-managed database by using a public IP address or an Express Connect circuit.\nIf the destination instance is a Message Queue for Apache Kafka instance, you must set this parameter to ECS or EXPRESS. This allows you to connect the instance to DTS as a self-managed database.\nIf the destination instance is a self-managed database, you must configure the required network environment."
}
},
"Role": {
"Default": null,
"Type": "String",
"Description": {
"en": "The name of the Resource Access Management (RAM) role configured for the Alibaba Cloud account that owns the destination instance.\nNote: This parameter is required when you migrate or synchronize data across different Alibaba Cloud accounts."
}
},
"DatabaseName": {
"Default": null,
"Type": "String",
"Description": {
"en": "The name of the destination database that contains the objects to be migrated.\nNote: This parameter is required only when the destination instance is a PolarDB for PostgreSQL (compatible with Oracle) cluster, a PostgreSQL database, or a MongoDB database."
}
},
"EngineName": {
"Default": null,
"Type": "String",
"Description": {
"en": "The database engine of the destination instance. Valid values:\n- MYSQL: An ApsaraDB RDS for MySQL instance or a self-managed MySQL database.\n- MARIADB: An ApsaraDB RDS for MariaDB TX instance.\n- PolarDB: A PolarDB for MySQL cluster.\n- POLARDB_O: A PolarDB for PostgreSQL (compatible with Oracle) cluster.\n- POLARDBX10: A PolarDB-X 1.0 instance.\n- POLARDBX20: A PolarDB-X 2.0 instance.\n- ORACLE: A self-managed Oracle database.\n- POSTGRESQL: An ApsaraDB RDS for PostgreSQL instance or a self-managed PostgreSQL database.\n- MSSQL: An ApsaraDB RDS for SQL Server instance or a self-managed SQL Server database.\n- ADS: An AnalyticDB for MySQL V2.0 cluster.\n- ADB30: An AnalyticDB for MySQL V3.0 cluster.\n- MONGODB: An ApsaraDB for MongoDB instance or a self-managed MongoDB database.\n- GREENPLUM: An AnalyticDB for PostgreSQL instance.\n- KAFKA: A Message Queue for Apache Kafka instance or a self-managed Kafka cluster.\n- DATAHUB: A DataHub project.\n- DB2: A self-managed Db2 for LUW database.\n- AS400: A self-managed Db2 for i database.\n- ODPS: A MaxCompute project.\n- Tablestore: A Tablestore instance.\n- ELK: An Elasticsearch cluster.\n- REDIS: An ApsaraDB for Redis instance or a self-managed Redis database.\nNote: The default value is MYSQL. If you set this parameter to KAFKA, MONGODB, or PolarDB, you must specify additional database information in the Reserve parameter."
}
},
"OwnerID": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the Alibaba Cloud account to which the destination database belongs.\nNote: You can specify this parameter to migrate or synchronize data across different Alibaba Cloud accounts. In this case, you must also specify the Role parameter."
}
},
"OracleSID": {
"Default": null,
"Type": "String",
"Description": {
"en": "The system ID (SID) of the Oracle database.\nNote: This parameter is required only when EngineName is set to ORACLE and the Oracle database is not deployed in a Real Application Clusters (RAC) architecture."
}
},
"Port": {
"Default": null,
"Type": "String",
"Description": {
"en": "The port number of the destination instance.\nNote: This parameter is required only when the destination instance is a self-managed database."
}
}
}
},
"Type": "Json",
"Description": {
"en": "Configuration of the destination instance."
}
},
"ErrorNotice": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to enable notifications for task errors. If enabled, an alert is sent when the task fails. Valid values: true and false."
}
},
"FileOssUrl": {
"Default": null,
"Type": "String",
"Description": {
"en": "The URL of the Object Storage Service (OSS) bucket that stores files related to the DTS task."
}
},
"Reserve": {
"Default": null,
"Type": "Json",
"Description": {
"en": "A reserved parameter that allows for specifying extended configurations. The value must be a JSON-formatted string. For example, you can specify the data storage format for a destination Kafka instance or the ID of a CEN instance."
}
},
"DelayPhone": {
"Default": null,
"Type": "String",
"Description": {
"en": "The mobile phone numbers that receive latency-related alerts. Separate multiple mobile phone numbers with commas (,).\nNote: This parameter is available only for accounts on the Alibaba Cloud China site (aliyun.com). Only mobile numbers in mainland China are supported. You can specify up to 10 mobile numbers. Users on the Alibaba Cloud International site (alibabacloud.com) cannot receive alerts by using mobile numbers, but can configure alert rules for DTS tasks in the CloudMonitor console."
}
},
"DelayNotice": {
"Default": null,
"Type": "Boolean",
"Description": {
"en": "Specifies whether to enable notifications for task latency. If enabled, an alert is sent when the latency exceeds the threshold defined in DelayRuleTime. Valid values: true and false."
}
},
"DataInitialization": {
"Type": "Boolean",
"Description": {
"en": "Specifies whether to perform a full data synchronization. Default value: true. Valid values: true and false."
}
},
"DtsBisLabel": {
"Default": null,
"Type": "String",
"Description": {
"en": "The environment tag of the DTS instance. Valid values: normal and online."
}
},
"DbList": {
"Type": "Json",
"Description": {
"en": "The database objects to migrate or synchronize. The value must be a JSON-formatted string that specifies the databases, tables, and views."
}
},
"DedicatedClusterId": {
"Default": null,
"Type": "String",
"Description": {
"en": "The ID of the DTS dedicated cluster on which the task runs."
}
}
},
"Resources": {
"SynchronizationJob": {
"Type": "ALIYUN::DTS::SynchronizationJob2",
"Properties": {
"SourceEndpoint": {
"Ref": "SourceEndpoint"
},
"Checkpoint": {
"Ref": "Checkpoint"
},
"Status": {
"Ref": "Status"
},
"DisasterRecoveryJob": {
"Ref": "DisasterRecoveryJob"
},
"DtsJobId": {
"Ref": "DtsJobId"
},
"DtsJobName": {
"Ref": "DtsJobName"
},
"DataSynchronization": {
"Ref": "DataSynchronization"
},
"SynchronizationDirection": {
"Ref": "SynchronizationDirection"
},
"DataCheckConfigure": {
"Ref": "DataCheckConfigure"
},
"StructureInitialization": {
"Ref": "StructureInitialization"
},
"DelayRuleTime": {
"Ref": "DelayRuleTime"
},
"ErrorPhone": {
"Ref": "ErrorPhone"
},
"DtsInstanceId": {
"Ref": "DtsInstanceId"
},
"DestinationEndpoint": {
"Ref": "DestinationEndpoint"
},
"ErrorNotice": {
"Ref": "ErrorNotice"
},
"FileOssUrl": {
"Ref": "FileOssUrl"
},
"Reserve": {
"Ref": "Reserve"
},
"DelayPhone": {
"Ref": "DelayPhone"
},
"DelayNotice": {
"Ref": "DelayNotice"
},
"DataInitialization": {
"Ref": "DataInitialization"
},
"DtsBisLabel": {
"Ref": "DtsBisLabel"
},
"DbList": {
"Ref": "DbList"
},
"DedicatedClusterId": {
"Ref": "DedicatedClusterId"
}
}
}
},
"Outputs": {
"DtsJobName": {
"Description": "The name of the DTS task.",
"Value": {
"Fn::GetAtt": [
"SynchronizationJob",
"DtsJobName"
]
}
},
"DtsInstanceId": {
"Description": "The ID of the DTS instance.",
"Value": {
"Fn::GetAtt": [
"SynchronizationJob",
"DtsInstanceId"
]
}
},
"DtsJobId": {
"Description": "The ID of the DTS task.",
"Value": {
"Fn::GetAtt": [
"SynchronizationJob",
"DtsJobId"
]
}
}
}
}