All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::DTS::MigrationJob2

Last Updated:May 06, 2026

The ALIYUN::DTS::MigrationJob2 resource purchases a data migration instance and configures a data migration task (new version).

Syntax

{
  "Type": "ALIYUN::DTS::MigrationJob2",
  "Properties": {
    "Status": String,
    "Reserve": Map,
    "DataSynchronization": Boolean,
    "DedicatedClusterId": String,
    "DelayPhone": 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,
    "SrcPrimaryVswId": String,
    "MaxDu": Integer,
    "DestPrimaryVswId": String,
    "DestSecondaryVswId": String,
    "SrcSecondaryVswId": String,
    "MinDu": Integer,
    "ResourceGroupId": String
  }
}

Properties

Parameter

Type

Required

Updatable

Description

Constraints

DataSynchronization

Boolean

Yes

No

Specifies whether to enable incremental data migration or incremental data synchronization.

Valid values:

  • true: Enables incremental data migration or incremental data synchronization.

  • false (default): Disables incremental data migration or incremental data synchronization.

DbList

Map

Yes

No

Specifies the objects to migrate, synchronize, or subscribe to.

The value must be a JSON string. For details, see Migration, synchronization, or subscription objects.

DtsJobName

String

Yes

Yes

The name of the subscription task.

Use a descriptive name for easy identification. The name does not need to be unique.

DataInitialization

Boolean

Yes

No

Specifies whether to enable full data migration or full data initialization.

Valid values:

  • true (default): Enables full data migration or full data initialization.

  • false: Disables full data migration or full data initialization.

DestinationEndpoint

Map

Yes

Yes

Specifies the configuration for the destination instance.

For more information, see DestinationEndpoint properties.

StructureInitialization

Boolean

Yes

No

Specifies whether to enable schema migration or initialization.

Valid values:

  • true (default): Enables schema migration or initialization.

  • false: Disables schema migration or initialization.

SourceEndpoint

Map

Yes

Yes

Specifies the configuration for the source instance.

For more information, see SourceEndpoint properties.

Status

String

No

Yes

The status of the resource.

Valid values:

  • Synchronizing: The resource is synchronizing data.

  • Suspending: The resource is paused.

  • Stopping: The resource is shutting down.

Reserve

Map

No

No

Reserved parameters for Data Transmission Service (DTS).

Use this parameter to add more configurations for the source or destination instance to a DTS task. For example, you can specify the data storage format of a destination Message Queue for Apache Kafka instance and the ID of a Cloud Enterprise Network (CEN) instance.

DedicatedClusterId

String

No

No

The ID of the DTS dedicated cluster.

Use this parameter to schedule a subscription task to a specific DTS dedicated cluster.

DelayPhone

String

No

No

The mobile phone numbers of contacts for latency alerts.

Separate multiple mobile phone numbers with a comma (,).

Note
  • This parameter is supported only on the China site. Only mobile phone numbers in the Chinese mainland are supported. You can specify a maximum of 10 mobile phone numbers.

  • On the international site, mobile alerts are not supported. Instead, you can set alert rules for DTS tasks in the CloudMonitor console.

ErrorNotice

Boolean

No

No

Specifies whether to enable error monitoring for the task.

Valid values:

  • true: Monitors the task for errors.

  • false: Does not monitor the task for errors.

DelayRuleTime

Integer

No

No

The threshold for triggering latency alerts.

Unit: seconds. The value must be an integer. You can set the threshold based on your business requirements. We recommend a value of 10 seconds or more to avoid false alarms caused by normal fluctuations in network latency or database load.

Note

This parameter is required if you set the DelayNotice parameter to true.

DtsInstanceId

String

No

No

The ID of the subscription task.

N/A

FileOssUrl

String

No

No

The OSS URL of the task file.

N/A

DataCheckConfigure

Map

No

No

Specifies the configuration for the data verification task.

The value is a JSON string that specifies information such as parameter limits and alert configurations. For more information, see DataCheckConfigure properties.

DtsBisLabel

String

No

No

The environment tag for the DTS instance.

Valid values:

  • normal: Normal

  • online: Online

Checkpoint

String

No

No

The checkpoint for incremental data migration or synchronization.

The value is a UNIX timestamp in seconds.

DisasterRecoveryJob

Boolean

No

No

Specifies whether this is a disaster recovery instance.

Valid values:

  • true: This is a disaster recovery instance.

  • false: This is not a disaster recovery instance.

DtsJobId

String

No

No

The ID of the data migration or synchronization task.

N/A

DelayNotice

Boolean

No

No

Specifies whether to enable latency monitoring for the task.

Valid values:

  • true: Monitors task latency.

  • false: Does not monitor task latency.

ErrorPhone

String

No

No

The mobile phone numbers of contacts for error alerts.

Separate multiple mobile phone numbers with a comma (,).

Note
  • This parameter is supported only on the China site. Only mobile phone numbers in the Chinese mainland are supported. You can specify a maximum of 10 mobile phone numbers.

  • On the international site, mobile alerts are not supported. Instead, you can set alert rules for DTS tasks in the CloudMonitor console.

SrcPrimaryVswId

String

No

No

The ID of the primary VSwitch for the VPC-based NAT source.

N/A

MaxDu

Integer

No

No

The maximum number of DTS Units (DUs) for the task.

Applicable only to serverless instances.

DestPrimaryVswId

String

No

No

The ID of the primary VSwitch for the VPC-based NAT destination.

N/A

DestSecondaryVswId

String

No

No

The ID of the secondary VSwitch for the VPC-based NAT destination.

N/A

SrcSecondaryVswId

String

No

No

The ID of the secondary VSwitch for the VPC-based NAT source.

N/A

MinDu

Integer

No

No

The minimum number of DTS Units (DUs) required by the task.

Applicable only to serverless instances.

ResourceGroupId

String

No

No

The ID of the resource group.

N/A

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

Constraints

fullCheckMaxReadRps

Integer

No

No

The maximum number of data rows to 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.

The alert contact receives a text message when a data verification task triggers an alert.

incrementalCheckDelayNotice

Boolean

No

No

Specifies whether to enable alerts for data latency in an incremental data verification task.

Valid values:

  • true: Enables alerts for data latency.

    Note

    An alert is triggered if the task's data latency is at or above the specified threshold for a configured number of consecutive statistical periods.

  • false: Disables alerts for data latency.

incrementalCheckDelayNoticeValue

Integer

No

No

The alert threshold for data latency in an incremental data verification task.

Unit: seconds.

Note

This parameter is required if incrementalCheckDelayNotice is set to true.

incrementalCheckDelayNoticePeriod

Integer

No

No

The statistical period for data latency alerts in an incremental data verification task.

Valid values:

  • 1: 1 minute.

  • 2: 5 minutes.

  • 3: 10 minutes.

  • 4: 30 minutes.

Note

This parameter is required if incrementalCheckDelayNotice is set to true.

dataCheckDbList

String

No

No

The data verification objects.

None.

checkMaximumHourEnable

Integer

No

No

Specifies whether to set a timeout period for the full data verification task.

Valid values:

  • 0: A timeout period is not set.

  • 1: A timeout period is set.

Note

This parameter is required if 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. Unit: %.

Note

This parameter is required if fullCheckModel is set to 1.

checkMaximumHour

Integer

No

No

The timeout period for the full data verification task.

The value must be an integer from 1 to 72. The countdown starts when the full data verification task begins. If the task does not complete within this period, the system forcibly terminates it.

fullCheckFixData

Boolean

No

No

Specifies whether to perform data fixing.

Valid values:

  • true: Performs data fixing.

    Note

    If data in the destination database is inconsistent with the source database, the system overwrites it with data from the source.

  • false (default): Does not perform data fixing.

fullCheckModel

Integer

No

No

The mode of the full data verification task.

Valid values:

  • 1: Verification by sampling ratio.

  • 2: Verification by row.

incrementalCheckValidFailNoticeValue

Integer

No

No

The alert threshold for inconsistent data in an incremental data verification task.

This parameter is required if incrementalCheckValidFailNotice is set to true.

incrementalDataCheck

Boolean

No

No

Specifies whether to perform incremental data verification.

Valid values:

  • true: Performs incremental data verification.

  • false: Does not perform incremental data verification.

incrementalCheckValidFailNoticeTimes

Integer

No

No

The number of consecutive statistical periods with inconsistent data required to trigger an alert.

This parameter is required if incrementalCheckValidFailNotice is set to true.

fullCheckMaxReadBps

Integer

No

No

The maximum amount of data to read per second.

The value must be an integer from 0 to 9007199254740991.

Unit: bytes.

Note

A value of 0 indicates no limit.

fullCheckValidFailNotice

Boolean

No

No

Specifies whether to enable alerts for inconsistent data in a full data verification task.

Valid values:

  • true: Enables alerts for inconsistent data.

    Note

    An alert is triggered if the count of inconsistent data entries meets or exceeds the specified threshold.

  • false: Disables alerts for inconsistent data.

fullCheckErrorNotice

Boolean

No

No

Specifies whether to enable alerts when a full data verification task fails.

Valid values:

  • true: Enables alerts for a failed task.

    Note

    An alert is triggered if the task fails.

  • false: Disables alerts for a failed task.

incrementalCheckValidFailNoticePeriod

Integer

No

No

The statistical period for inconsistent data alerts in an incremental data verification task.

Valid values:

  • 1: 1 minute.

  • 2: 5 minutes.

  • 3: 10 minutes.

  • 4: 30 minutes.

Note

This parameter is required if incrementalCheckValidFailNotice is set to true.

incrementalCheckDelayNoticeTimes

Integer

No

No

The number of consecutive statistical periods with data latency above the threshold required to trigger an alert.

This parameter is required if incrementalCheckDelayNotice is set to true.

fullCheckReferEndpoint

String

No

No

The benchmark for full data verification.

Valid values:

  • all: Verifies data based on the union of the source and destination databases and identifies inconsistencies between them.

  • src: Verifies data based on the source database. Data that exists only in the destination database is ignored.

  • dest: Verifies data based on the destination database. Data that exists only in the source database is ignored.

fullDataCheck

Boolean

No

No

Specifies whether to perform full data verification.

Valid values:

  • true: Performs full data verification.

  • false: Does not perform full data verification.

incrementalCheckValidFailNotice

Boolean

No

No

Specifies whether to enable alerts for inconsistent data in an incremental data verification task.

Valid values:

  • true: Enables alerts for inconsistent data.

    Note

    An alert is triggered if the count of inconsistent data entries meets or exceeds the specified threshold for a configured number of consecutive statistical periods.

  • false: Disables alerts for inconsistent data.

fullCheckNoticeValue

Integer

No

No

The alert threshold for inconsistent data in a full data verification task.

This parameter is required if fullCheckValidFailNotice is set to true.

incrementalCheckErrorNotice

Boolean

No

No

Specifies whether to enable alerts when an incremental data verification task fails.

Valid values:

  • true: Enables alerts for a failed task.

    Note

    An alert is triggered if the task fails.

  • false: Disables alerts for a failed task.

DestinationEndpoint 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

Constraints

InstanceType

String

Yes

No

The type of the destination instance.

Valid values:

  • ECS: a self-managed database hosted on an ECS instance.

  • LocalInstance: a self-managed database with a public IP address.

  • RDS: an Alibaba Cloud RDS instance.

  • DRDS: a PolarDB-X instance.

  • MongoDB: an Alibaba Cloud ApsaraDB for MongoDB instance.

  • Redis: an Alibaba Cloud ApsaraDB for Redis instance.

  • PetaData: a HybridDB for MySQL instance.

  • PolarDB: a PolarDB for MySQL or PolarDB for PostgreSQL cluster.

  • PolarDB_o: a PolarDB for Oracle cluster.

  • AnalyticDB: an AnalyticDB for MySQL V3.0 or V2.0 cluster.

  • Greenplum: an AnalyticDB for PostgreSQL instance.

Role

String

No

No

The name of the Resource Access Management (RAM) role of the Alibaba Cloud account that owns the destination instance.

This parameter is required for data migration or synchronization between different Alibaba Cloud accounts.

OracleSID

String

No

No

The system ID (SID) of the Oracle database.

This parameter is required if EngineName is set to Oracle and the Oracle database is a non-RAC instance.

UserName

String

No

No

The database account of the destination database.

The required permissions for the database account vary by migration scenario. For more information, see the configuration examples in Migration Scenario Overview.

OwnerID

String

No

No

The ID of the Alibaba Cloud account that owns the destination instance.

This parameter is required only for data migration between different Alibaba Cloud accounts.

InstanceID

String

No

No

The ID of the destination instance.

This parameter is required if InstanceType is set to RDS, ECS, MongoDB, Redis, DRDS, PetaData, PolarDB, PolarDB_o, AnalyticDB, or Greenplum. You must specify the corresponding instance ID. For example, if InstanceType is set to ECS, you must specify the ECS instance ID.

IP

String

No

No

The IP address of the destination database.

This parameter is required if InstanceType is set to LocalInstance.

Port

String

No

No

The service port of the destination database.

This parameter is required if InstanceType is set to ECS or LocalInstance.

DatabaseName

String

No

No

The name of the database to be migrated or the name of the authentication database.

  • This parameter is required if DestinationEndpoint.EngineName is set to PostgreSQL, DRDS, or MongoDB.

  • For PostgreSQL and DRDS, this is the name of the database to migrate. For MongoDB, this is the name of the authentication database.

Region

String

No

No

The region ID of the destination database.

If InstanceType is set to LocalInstance, you can specify cn-hangzhou or the ID of the region that is geographically closest to the self-managed database. For more information, see Supported regions.

EngineName

String

No

No

The engine type of the destination database.

Valid values:

  • MySQL

  • DRDS

  • SQLServer

  • PostgreSQL

  • PPAS

  • MongoDB

  • Redis

  • PolarDB

  • polardb_pg

Note

This parameter is required if 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 properties

Parameter

Type

Required

Editable

Description

Constraint

InstanceType

String

Yes

No

The type of the source instance.

Valid values:

  • RDS: An Alibaba Cloud RDS instance.

  • ECS: A self-managed database hosted on an ECS instance.

  • LocalInstance: A self-managed database with a public IP address.

  • Express Connect: A self-managed database connected over Express Connect, VPN Gateway, or Smart Access Gateway.

  • Database Gateway: A self-managed database connected over Database Gateway (DG).

  • Cloud Enterprise Network: A self-managed database connected over Cloud Enterprise Network (CEN).

  • MongoDB: An Alibaba Cloud MongoDB instance.

  • PolarDB: A PolarDB for MySQL or PolarDB for PostgreSQL cluster.

  • PolarDB_o: A PolarDB for Oracle cluster.

OracleSID

String

No

No

The system ID (SID) of the Oracle database.

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 account for the source database.

The permissions required 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 ID of the source instance.

  • Required if SourceEndpoint.InstanceType is set to RDS, ECS, Express Connect, MongoDB, PolarDB, or PolarDB_o. For example, if SourceEndpoint.InstanceType is set to ECS, you must specify the ID of the ECS instance.

  • If SourceEndpoint.InstanceType is set to Express Connect, this parameter specifies the Virtual Private Cloud (VPC) ID.

IP

String

No

No

The connection IP address of the source database.

Required if InstanceType is set to LocalInstance or Express Connect.

Port

String

No

No

The service port of the source database.

Required if InstanceType is set to ECS, LocalInstance, or Express Connect.

VSwitchID

String

No

No

The ID of the vSwitch for the data transmission link.

None

DatabaseName

String

No

No

The name of the database to migrate or the authentication database.

  • Required if SourceEndpoint.EngineName is set to PostgreSQL or MongoDB.

  • If SourceEndpoint.EngineName is set to PostgreSQL, this parameter specifies the name of the database to migrate. If it is set to MongoDB, this parameter specifies the name of the authentication database.

EngineName

String

No

No

The engine type of the source database.

Valid values:

  • MySQL

  • TiDB

  • SQLServer

  • PostgreSQL

  • Oracle

  • MongoDB

  • Redis

  • PolarDB

  • polardb_pg

Note

Required if InstanceType is set to RDS, PolarDB, ECS, LocalInstance, or Express Connect.

Role

String

No

No

The RAM role for the source instance.

Required when the source and destination instances belong to different Alibaba Cloud accounts. This role authorizes the destination instance's Alibaba Cloud account to access the source instance.

Note

For more information about the permissions required by the RAM role and how to grant them, see Configure RAM authorization for cross-account data migration tasks.

OwnerID

String

No

No

The ID of the Alibaba Cloud account that owns the source instance.

Required only when you migrate data between different Alibaba Cloud accounts.

Region

String

No

No

The ID of the region where the source database is located.

If InstanceType is set to LocalInstance, you can specify cn-hangzhou or the ID of the region that is geographically closest to the self-managed database. For more information, see Supported regions.

Password

String

No

Yes

The password for the source database account.

None

Return values

Fn::GetAtt

  • DtsJobId: The DTS job ID.

  • DtsJobName: The DTS job name.

  • DtsInstanceId: The DTS instance ID.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SourceEndpoint:
    AssociationPropertyMetadata:
      Parameters:
        UserName:
          Default: null
          Type: String
          Description:
            en: >-
              The username for the source database account.


              Note: This parameter is required in most scenarios. The required database account permissions vary by 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 is an Alibaba Cloud database instance, you must specify its instance ID.


              - If the source instance is an ApsaraDB RDS for MySQL instance, specify the ID of the ApsaraDB RDS for MySQL instance.

              - If the source instance is a self-managed database, this parameter's value depends on the SourceEndpoint.InstanceType value.

                - If InstanceType is set to ECS, specify the ID of the ECS instance.

                - If InstanceType is set to DG, specify the ID of the database gateway.

                - If InstanceType is set to EXPRESS or CEN, specify the ID of the VPC connected to the source instance.


              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 region ID of the source instance.


              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 TX 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 Express Connect.

              - 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 cluster (Oracle-compatible), you must set this parameter to OTHER or EXPRESS. You can then connect to DTS by using a public IP address or Express Connect. If the source is a self-managed database, you must prepare its 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 source database that contains the objects to migrate.


              Note: This parameter is required only when the source instance is a PolarDB for PostgreSQL cluster (Oracle-compatible), 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 cluster (Oracle-compatible).

              - 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 RAM role configured for the Alibaba Cloud account that owns the source instance.


              Note: This parameter is required for data migration or synchronization 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: Specify this parameter for cross-account data migration or synchronization. If you specify this parameter, 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 if EngineName is set to ORACLE and the Oracle database is not in a Real Application Clusters (RAC) configuration.
        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: Source endpoint configuration.
  Checkpoint:
    Default: null
    Type: String
    Description:
      en: >-
        The start offset of incremental data migration or synchronization. This value is a UNIX timestamp in seconds.
  Status:
    Default: null
    Type: String
    Description:
      en: |-
        The status of the DTS job. Valid values:
        - Migrating: Starts the job.
        - Suspending: Suspends the job.
        - Stopping: Stops the job.
    AllowedValues:
      - Migrating
      - Suspending
      - Stopping
  DisasterRecoveryJob:
    Default: null
    Type: Boolean
    Description:
      en: >-
        Specifies whether the job is for disaster recovery. Valid values: true and false.
  DtsJobId:
    Default: null
    Type: String
    Description:
      en: The DTS job ID.
  DtsJobName:
    Type: String
    Description:
      en: DTS job name.
  DataSynchronization:
    Type: Boolean
    Description:
      en: >-
        Specifies whether to perform incremental data migration or synchronization. Default value: false. Valid values: true and false.
  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 detected during a full data verification. If you set this parameter to true, an alert is triggered if the number of inconsistent data entries meets or exceeds 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 detected during an incremental data verification. If you set this parameter to true, an alert is triggered if the cumulative number of inconsistent data entries across consecutive statistical periods meets or exceeds the specified threshold. Valid values: true and false.
        dataCheckNoticePhone:
          Default: null
          Type: String
          Description:
            en: >-
              The mobile number of the contact for data verification alerts. If an alert is triggered, a text message is sent to notify the contact.
        fullCheckReferEndpoint:
          Default: null
          Type: String
          Description:
            en: >-
              The benchmark for full data verification. Valid values:

              - all: Verifies data consistency based on the union of the source and destination databases.

              - src: Verifies data consistency based on the source database. Objects that exist only in the destination database are not verified.

              - dest: Verifies data consistency based on the destination database. Objects that exist only in the source database are not verified.
        fullCheckModel:
          Default: null
          Type: Number
          Description:
            en: |-
              The mode of the full data verification task. Valid values:
              - 1: Verifies data by sampling ratio.
              - 2: Verifies data by row.
          AllowedValues:
            - 1
            - 2
        incrementalCheckDelayNotice:
          Default: null
          Type: Boolean
          Description:
            en: >-
              Specifies whether to trigger an alert for data latency in an incremental data verification. If you set this parameter to true, an alert is triggered if the cumulative latency across consecutive statistical periods meets or exceeds the specified threshold. Valid values: true and false.
        incrementalCheckValidFailNoticePeriod:
          Default: null
          Type: Number
          Description:
            en: >-
              The statistical period for alerts on inconsistent data in an incremental data verification. Valid values:

              - 1: 1 minute

              - 2: 5 minutes

              - 3: 10 minutes

              - 4: 30 minutes


              Note: 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 during which the data latency must exceed the threshold before an alert is triggered.


              Note: This parameter is required if incrementalCheckDelayNotice is set to true.
        fullCheckMaxReadBps:
          Default: null
          MinValue: 0
          Type: Number
          Description:
            en: >-
              The maximum data read rate in bytes per second. Integer from 0 to 9007199254740991. A value of 0 means no limit.
          MaxValue: 9007199254740991
        incrementalCheckValidFailNoticeTimes:
          Default: null
          Type: Number
          Description:
            en: >-
              The number of consecutive statistical periods during which the count of inconsistent data must exceed the threshold before an alert is triggered.


              Note: This parameter is required if incrementalCheckValidFailNotice is set to true.
        fullCheckMaxReadRps:
          Default: null
          MinValue: 0
          Type: Number
          Description:
            en: >-
              The maximum row read rate in rows per second. Integer from 0 to 9007199254740991. A value of 0 means no limit.
          MaxValue: 9007199254740991
        incrementalCheckValidFailNoticeValue:
          Default: null
          Type: Number
          Description:
            en: >-
              The alert threshold for the number of inconsistent data entries detected during an incremental data verification.


              Note: 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. Valid values: true and false.
        fullCheckRatio:
          Default: null
          MinValue: 10
          Type: Number
          Description:
            en: >-
              The sampling ratio for the full data verification. Unit: percentage. Valid values are integers from 10 to 100.


              Note: This parameter is required if the fullCheckModel parameter is set to 1.
          MaxValue: 100
        incrementalCheckDelayNoticeValue:
          Default: null
          Type: Number
          Description:
            en: >-
              The alert threshold for data latency in an incremental data 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 configure a timeout period for the full data verification task. Valid values:

              - 0: Does not configure a timeout period.

              - 1: Configures a timeout period.


              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 be verified. The value must be a JSON string.
        incrementalCheckErrorNotice:
          Default: null
          Type: Boolean
          Description:
            en: >-
              Specifies whether to trigger an alert if an incremental data verification task fails. Valid values: true and false.
        checkMaximumHour:
          Default: null
          MinValue: 1
          Type: Number
          Description:
            en: >-
              The timeout for the full data verification task, in hours. Valid values are integers from 1 to 72. The countdown starts when the verification begins. If the task exceeds this time limit, it is stopped.
          MaxValue: 72
        incrementalCheckDelayNoticePeriod:
          Default: null
          Type: Number
          Description:
            en: >-
              The statistical period for data latency alerts in an incremental data verification. Valid values:

              - 1: 1 minute

              - 2: 5 minutes

              - 3: 10 minutes

              - 4: 30 minutes


              Note: 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 replace inconsistent data. If you set this parameter to true, inconsistent data in the destination database is replaced with data from the source database. Default value: false.
        fullCheckNoticeValue:
          Default: null
          Type: Number
          Description:
            en: >-
              The alert threshold for the number of inconsistent data entries detected during a full data verification.


              Note: 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. Valid values: true and false.
    Type: Json
    Description:
      en: Data verification configuration.
  StructureInitialization:
    Type: Boolean
    Description:
      en: >-
        Specifies whether to perform schema initialization. Default value: true. Valid values: true and false.
  DelayRuleTime:
    Default: null
    Type: Number
    Description:
      en: >-
        The latency alert threshold, in seconds. You can set the threshold based on your business requirements. To prevent false alarms caused by network and database jitters, we recommend setting the threshold to more than 10 seconds.
  ErrorPhone:
    Default: null
    Type: String
    Description:
      en: >-
        The mobile numbers for job error alerts. Separate multiple mobile numbers with commas (,).


        Note: This parameter is available only on the Alibaba Cloud China site (aliyun.com) and supports a maximum of 10 mobile numbers in the Chinese mainland. Users on the international site (alibabacloud.com) cannot receive mobile alerts. Instead, you can configure alert rules for DTS jobs in the CloudMonitor console.
  DtsInstanceId:
    Default: null
    Type: String
    Description:
      en: The DTS instance ID.
  DestinationEndpoint:
    AssociationPropertyMetadata:
      Parameters:
        UserName:
          Default: null
          Type: String
          Description:
            en: >-
              The username for the destination database account.


              Note: This parameter is required in most scenarios. The permissions required for the database account vary based 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 is an Alibaba Cloud database instance, you must specify its instance ID.


              - If the destination instance is an ApsaraDB RDS for MySQL instance, 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 DestinationEndpoint.InstanceType.

                - If InstanceType is set to ECS, specify the ID of the ECS instance.

                - If InstanceType is set to DG, specify the ID of the database gateway.

                - If InstanceType is set to EXPRESS or CEN, specify the ID of the VPC connected to the destination instance.


              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 region ID of the destination instance.


              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 TX 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 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 Express Connect.

              - 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 cluster (Oracle-compatible), you must set this parameter to OTHER or EXPRESS. You can then connect to DTS by using a public IP address or Express Connect. For a Message Queue for Apache Kafka instance, set this parameter to ECS or EXPRESS. This allows you to connect the instance to DTS as a self-managed database over ECS or Express Connect. If the destination instance is a self-managed database, you must prepare the network environment for the database.
        Role:
          Default: null
          Type: String
          Description:
            en: >-
              The name of the RAM role configured for the Alibaba Cloud account that owns the destination instance.


              Note: This parameter is required for data migration or synchronization 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 be migrated.


              Note: This parameter is required only when the destination instance is a PolarDB for PostgreSQL cluster (Oracle-compatible), 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 cluster (Oracle-compatible).

              - 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: Specify this parameter for cross-account data migration or synchronization. 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 in a Real Application Clusters (RAC) configuration.
        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: Destination endpoint configuration.
  ErrorNotice:
    Default: null
    Type: Boolean
    Description:
      en: >-
        Specifies whether to monitor the job for errors. Valid values: true and false.
  FileOssUrl:
    Default: null
    Type: String
    Description:
      en: OSS bucket URL for DTS job files.
  Reserve:
    Default: null
    Type: Json
    Description:
      en: >-
        A reserved DTS parameter for specifying additional configurations, such as the data storage format for a destination Kafka topic or the ID of a CEN instance.
  DelayPhone:
    Default: null
    Type: String
    Description:
      en: >-
        The mobile numbers for latency alerts. Separate multiple mobile numbers with commas (,).


        Note: This parameter is available only on the Alibaba Cloud China site (aliyun.com) and supports a maximum of 10 mobile numbers in the Chinese mainland. Users on the international site (alibabacloud.com) cannot receive mobile alerts. Instead, you can configure alert rules for DTS jobs in the CloudMonitor console.
  DelayNotice:
    Default: null
    Type: Boolean
    Description:
      en: >-
        Specifies whether to monitor the job for latency. Valid values: true and false.
  DataInitialization:
    Type: Boolean
    Description:
      en: >-
        Specifies whether to perform full data initialization. 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 objects to migrate or synchronize. The value must be a JSON string.
  DedicatedClusterId:
    Default: null
    Type: String
    Description:
      en: DTS dedicated cluster ID.
Resources:
  MigrationJob:
    Type: 'ALIYUN::DTS::MigrationJob2'
    Properties:
      SourceEndpoint:
        Ref: SourceEndpoint
      Checkpoint:
        Ref: Checkpoint
      Status:
        Ref: Status
      DisasterRecoveryJob:
        Ref: DisasterRecoveryJob
      DtsJobId:
        Ref: DtsJobId
      DtsJobName:
        Ref: DtsJobName
      DataSynchronization:
        Ref: DataSynchronization
      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: DTS job name.
    Value:
      'Fn::GetAtt':
        - MigrationJob
        - DtsJobName
  DtsInstanceId:
    Description: The DTS instance ID.
    Value:
      'Fn::GetAtt':
        - MigrationJob
        - DtsInstanceId
  DtsJobId:
    Description: The DTS job ID.
    Value:
      'Fn::GetAtt':
        - MigrationJob
        - DtsJobId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SourceEndpoint": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "UserName": {
            "Default": null,
            "Type": "String",
            "Description": {
              "en": "The database account of the source database.\nNote: In most cases, this parameter is required. The permissions that are required for the database account vary with 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.\n- If the source instance is an Alibaba Cloud database instance, you must specify the ID of the database instance. 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.\n- If the source instance is a self-managed database, the value of this parameter depends on the value of the InstanceType parameter:\n  - If InstanceType is set to ECS, you must specify the ID of the ECS instance.\n  - If InstanceType is set to DG, you must specify the ID of the database gateway.\n  - If InstanceType is set to EXPRESS or CEN, you must specify the ID of the VPC that is connected to the source instance.\nNote: If 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: If the source instance is an Alibaba Cloud database instance, this parameter is required."
            }
          },
          "InstanceType": {
            "Type": "String",
            "Description": {
              "en": "The type of the source instance. Valid values:\nAlibaba Cloud database instances:\n- RDS: ApsaraDB RDS for MySQL instance, ApsaraDB RDS for SQL Server instance, ApsaraDB RDS for PostgreSQL instance, or ApsaraDB RDS for MariaDB TX instance\n- PolarDB: PolarDB for MySQL cluster\n- REDIS: ApsaraDB for Redis instance\n- DISTRIBUTED_POLARDBX10: PolarDB-X 1.0 (formerly DRDS) instance\n- POLARDBX20: PolarDB-X 2.0 instance\n- MONGODB: ApsaraDB for MongoDB instance\n- DISTRIBUTED_DMSLOGICDB: Data Management (DMS) logical database\nSelf-managed databases:\n- OTHER: A self-managed database with a public IP address\n- ECS: A self-managed database hosted on an Elastic Compute Service (ECS) instance\n- EXPRESS: A self-managed database connected over Express Connect\n- CEN: A self-managed database connected over Cloud Enterprise Network (CEN)\n- DG: A self-managed database connected over Database Gateway\nNote: If the source instance is a PolarDB for PostgreSQL cluster (compatible with Oracle), 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 Express Connect. For all self-managed database types, 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 that contains the objects to be migrated in the source instance.\nNote: This parameter is required only when the source instance is a PolarDB for PostgreSQL cluster (compatible with Oracle), 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: ApsaraDB RDS for MySQL instance or self-managed MySQL database\n- MARIADB: ApsaraDB RDS for MariaDB TX instance\n- PolarDB: PolarDB for MySQL cluster\n- POLARDB_O: PolarDB for PostgreSQL cluster (compatible with Oracle)\n- POLARDBX10: PolarDB-X 1.0 instance\n- POLARDBX20: PolarDB-X 2.0 instance\n- ORACLE: Self-managed Oracle database\n- POSTGRESQL: ApsaraDB RDS for PostgreSQL instance or self-managed PostgreSQL database\n- MSSQL: ApsaraDB RDS for SQL Server instance or self-managed SQL Server database\n- MONGODB: ApsaraDB for MongoDB instance or self-managed MongoDB database\n- DB2: Self-managed Db2 for LUW database\n- AS400: Self-managed Db2 for i database\n- DMSPOLARDB: DMS logical database\n- HBASE: Self-managed HBase database\n- TERADATA: Teradata database\n- TiDB: TiDB database\n- REDIS: ApsaraDB for Redis instance or self-managed Redis database\nNote: The default value is MYSQL.\nIf this parameter 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 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 deployed in an architecture that is not a Real Application Cluster (RAC)."
            }
          },
          "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 for the source instance."
      }
    },
    "Checkpoint": {
      "Default": null,
      "Type": "String",
      "Description": {
        "en": "The start offset 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- Migrating: Starts the task.\n- Suspending: Suspends the task.\n- Stopping: Stops the task."
      },
      "AllowedValues": [
        "Migrating",
        "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 job."
      }
    },
    "DataSynchronization": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to perform incremental data migration or synchronization. The default value is false. Valid values: true and false."
      }
    },
    "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 detected by the full data verification task. Valid values: true and false.\nNote: If this parameter is set to true, an alert is triggered when the number of inconsistent data entries detected by the full data verification task is greater than or equal to the specified threshold."
            }
          },
          "incrementalCheckValidFailNotice": {
            "Default": null,
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to trigger an alert if inconsistent data is detected by the incremental data verification task. Valid values: true and false.\nNote: If this parameter is set to true, an alert is triggered when the cumulative number of inconsistent data entries detected across multiple statistical periods is greater than or equal to the specified threshold."
            }
          },
          "dataCheckNoticePhone": {
            "Default": null,
            "Type": "String",
            "Description": {
              "en": "The mobile phone numbers of the contacts to receive alerts for data verification tasks. If an alert is triggered, a text message is sent to the specified numbers. Separate multiple mobile phone numbers with commas (,).\nNote: This parameter is available only for users of the Alibaba Cloud China site (aliyun.com). Only mobile phone numbers in the Chinese mainland are supported. You can specify up to 10 mobile phone numbers. Users of the Alibaba Cloud international site (alibabacloud.com) can configure alert rules for DTS tasks in the CloudMonitor console instead of receiving text message alerts."
            }
          },
          "fullCheckReferEndpoint": {
            "Default": null,
            "Type": "String",
            "Description": {
              "en": "The benchmark for full data verification. Valid values:\n- all: Verifies data consistency by using both the source and destination databases as the benchmark. It checks for discrepancies in objects that exist in either database.\n- src: Verifies data consistency by using the source database as the benchmark. Objects that exist only in the destination database are not verified.\n- dest: Verifies data consistency by using the destination database as the benchmark. Objects that exist only in the source database are not verified."
            }
          },
          "fullCheckModel": {
            "Default": null,
            "Type": "Number",
            "Description": {
              "en": "The mode for the full data verification task. Valid values:\n- 1: Performs verification based on a sampling ratio.\n- 2: Performs row-by-row verification."
            },
            "AllowedValues": [
              1,
              2
            ]
          },
          "incrementalCheckDelayNotice": {
            "Default": null,
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to trigger an alert for the data latency of the incremental data verification task. Valid values: true and false.\nNote: If this parameter is set to true, an alert is triggered when the cumulative latency across multiple statistical periods is greater than or equal to the specified threshold."
            }
          },
          "incrementalCheckValidFailNoticePeriod": {
            "Default": null,
            "Type": "Number",
            "Description": {
              "en": "The statistical period for detecting inconsistent data during incremental verification. An alert is triggered based on data from 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 the incrementalCheckValidFailNotice parameter 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 cumulative latency over this number of periods exceeds the threshold.\nNote: This parameter is required if the incrementalCheckDelayNotice parameter is set to true."
            }
          },
          "fullCheckMaxReadBps": {
            "Default": null,
            "MinValue": 0,
            "Type": "Number",
            "Description": {
              "en": "The maximum number of bytes that are read per second. Valid values: 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 measured. An alert is triggered if the cumulative number of inconsistent entries over this number of periods exceeds the threshold.\nNote: 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 data rows that are read per second. Valid values: integers from 0 to 9007199254740991."
            },
            "MaxValue": 9007199254740991
          },
          "incrementalCheckValidFailNoticeValue": {
            "Default": null,
            "Type": "Number",
            "Description": {
              "en": "The alert threshold for inconsistent data entries detected by the incremental data verification task.\nNote: 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 ratio of the full data verification task. Valid values: integers from 10 to 100. Unit: percent.\nNote: This parameter is required if the fullCheckModel parameter is set to 1."
            },
            "MaxValue": 100
          },
          "incrementalCheckDelayNoticeValue": {
            "Default": null,
            "Type": "Number",
            "Description": {
              "en": "The alert threshold for the data latency of the incremental data verification task. Unit: seconds.\nNote: 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 period for the full data verification task. Valid values:\n- 0: Disables the timeout period.\n- 1: Enables the timeout period.\nNote: This parameter is required if the fullCheckModel parameter is set to 1 (sampling verification)."
            },
            "AllowedValues": [
              0,
              1
            ]
          },
          "dataCheckDbList": {
            "Default": null,
            "Type": "String",
            "Description": {
              "en": "The database objects to be verified. The value must be a JSON 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: an integer from 1 to 72."
            },
            "MaxValue": 72
          },
          "incrementalCheckDelayNoticePeriod": {
            "Default": null,
            "Type": "Number",
            "Description": {
              "en": "The statistical period for measuring data latency during incremental verification. An alert is triggered based on data from 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 the incrementalCheckDelayNotice parameter is set to true."
            },
            "AllowedValues": [
              1,
              2,
              3,
              4
            ]
          },
          "fullCheckFixData": {
            "Default": null,
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to automatically fix inconsistent data. Valid values: true and false. The default value is false.\nNote: If this parameter is set to true, data in the destination database that is inconsistent with the source database is overwritten with data from the source database."
            }
          },
          "fullCheckNoticeValue": {
            "Default": null,
            "Type": "Number",
            "Description": {
              "en": "The alert threshold for inconsistent data entries detected by the full data verification task.\nNote: 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 of the data verification task for a data migration or synchronization instance."
      }
    },
    "StructureInitialization": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to perform schema migration or synchronization. The default value is true. Valid values: true and false."
      }
    },
    "DelayRuleTime": {
      "Default": null,
      "Type": "Number",
      "Description": {
        "en": "The threshold for latency alerts, in seconds. You can set the threshold based on your business requirements. To prevent alerts caused by normal fluctuations in network and database load, 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 task status alerts. Separate multiple mobile phone numbers with commas (,).\nNote: This parameter is available only for users of the Alibaba Cloud China site (aliyun.com). Only mobile phone numbers in the Chinese mainland are supported. You can specify up to 10 mobile phone numbers. Users of the Alibaba Cloud international site (alibabacloud.com) cannot receive alerts by using mobile phone 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: In most cases, this parameter is required. The permissions that are required for the database account vary with 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.\n- If the destination instance is an Alibaba Cloud database instance, you must specify the ID of the database instance. 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.\n- If the destination instance is a self-managed database, the value of this parameter depends on the value of the InstanceType parameter:\n  - If InstanceType is set to ECS, you must specify the ID of the ECS instance.\n  - If InstanceType is set to DG, you must specify the ID of the database gateway.\n  - If InstanceType is set to EXPRESS or CEN, you must specify the ID of the VPC that is connected to the destination instance.\nNote: If 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: If the destination instance is an Alibaba Cloud database instance, this parameter is required."
            }
          },
          "InstanceType": {
            "Type": "String",
            "Description": {
              "en": "The type of the destination instance. Valid values:\nAlibaba Cloud database instances:\n- RDS: ApsaraDB RDS for MySQL instance, ApsaraDB RDS for SQL Server instance, ApsaraDB RDS for PostgreSQL instance, or ApsaraDB RDS for MariaDB TX instance\n- PolarDB: PolarDB for MySQL cluster\n- DISTRIBUTED_POLARDBX10: PolarDB-X 1.0 (formerly DRDS) instance\n- POLARDBX20: PolarDB-X 2.0 instance\n- REDIS: ApsaraDB for Redis instance\n- ADS: AnalyticDB for MySQL V2.0 cluster or AnalyticDB for MySQL V3.0 cluster\n- MONGODB: ApsaraDB for MongoDB instance\n- GREENPLUM: AnalyticDB for PostgreSQL instance\n- DATAHUB: DataHub project\n- ELK: Elasticsearch cluster\n- Tablestore: Tablestore instance\n- ODPS: MaxCompute project\nSelf-managed databases:\n- OTHER: A self-managed database with a public IP address\n- ECS: A self-managed database hosted on an ECS instance\n- EXPRESS: A self-managed database connected over Express Connect\n- CEN: A self-managed database connected over CEN\n- DG: A self-managed database connected over Database Gateway\nNote:\n- If the destination instance is a PolarDB for PostgreSQL cluster (compatible with Oracle), 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 Express Connect.\n- If 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 Kafka instance to DTS as a self-managed database.\n- For all self-managed database types, you must prepare 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 database that will contain the migrated objects in the destination instance.\nNote: This parameter is required only when the destination instance is a PolarDB for PostgreSQL cluster (compatible with Oracle), 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: ApsaraDB RDS for MySQL instance or self-managed MySQL database\n- MARIADB: ApsaraDB RDS for MariaDB TX instance\n- PolarDB: PolarDB for MySQL cluster\n- POLARDB_O: PolarDB for PostgreSQL cluster (compatible with Oracle)\n- POLARDBX10: PolarDB-X 1.0 instance\n- POLARDBX20: PolarDB-X 2.0 instance\n- ORACLE: Self-managed Oracle database\n- POSTGRESQL: ApsaraDB RDS for PostgreSQL instance or self-managed PostgreSQL database\n- MSSQL: ApsaraDB RDS for SQL Server instance or self-managed SQL Server database\n- ADS: AnalyticDB for MySQL V2.0 cluster\n- ADB30: AnalyticDB for MySQL V3.0 cluster\n- MONGODB: ApsaraDB for MongoDB instance or self-managed MongoDB database\n- GREENPLUM: AnalyticDB for PostgreSQL instance\n- KAFKA: Message Queue for Apache Kafka instance or self-managed Kafka cluster\n- DATAHUB: DataHub project\n- DB2: Self-managed Db2 for LUW database\n- AS400: Self-managed Db2 for i database\n- ODPS: MaxCompute project\n- Tablestore: Tablestore instance\n- ELK: Elasticsearch cluster\n- REDIS: ApsaraDB for Redis instance or self-managed Redis database\nNote: The default value is MYSQL.\nIf 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.\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 deployed in an architecture that is not a Real Application Cluster (RAC)."
            }
          },
          "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 for the destination instance."
      }
    },
    "ErrorNotice": {
      "Default": null,
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to enable alerts for task errors. If you set this parameter to true, 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 the 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 use this parameter to 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 users of the Alibaba Cloud China site (aliyun.com). Only mobile phone numbers in the Chinese mainland are supported. You can specify up to 10 mobile phone numbers. Users of the Alibaba Cloud international site (alibabacloud.com) cannot receive alerts by using mobile phone numbers, but 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. If you set this parameter to true, an alert is sent when the task latency exceeds the threshold specified by DelayRuleTime. Valid values: true and false."
      }
    },
    "DataInitialization": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to perform full data migration or synchronization. The default value is 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 that you want to migrate or synchronize. The value must be a JSON string that specifies the databases and tables."
      }
    },
    "DedicatedClusterId": {
      "Default": null,
      "Type": "String",
      "Description": {
        "en": "The ID of the DTS dedicated cluster on which the task runs."
      }
    }
  },
  "Resources": {
    "MigrationJob": {
      "Type": "ALIYUN::DTS::MigrationJob2",
      "Properties": {
        "SourceEndpoint": {
          "Ref": "SourceEndpoint"
        },
        "Checkpoint": {
          "Ref": "Checkpoint"
        },
        "Status": {
          "Ref": "Status"
        },
        "DisasterRecoveryJob": {
          "Ref": "DisasterRecoveryJob"
        },
        "DtsJobId": {
          "Ref": "DtsJobId"
        },
        "DtsJobName": {
          "Ref": "DtsJobName"
        },
        "DataSynchronization": {
          "Ref": "DataSynchronization"
        },
        "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 job.",
      "Value": {
        "Fn::GetAtt": [
          "MigrationJob",
          "DtsJobName"
        ]
      }
    },
    "DtsInstanceId": {
      "Description": "The ID of the DTS instance.",
      "Value": {
        "Fn::GetAtt": [
          "MigrationJob",
          "DtsInstanceId"
        ]
      }
    },
    "DtsJobId": {
      "Description": "The ID of the DTS task.",
      "Value": {
        "Fn::GetAtt": [
          "MigrationJob",
          "DtsJobId"
        ]
      }
    }
  }
}