All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::DTS::SynchronizationJob

Last Updated:Jun 08, 2026

ALIYUN::DTS::SynchronizationJob purchases a data synchronization instance and configures a data synchronization task.

Note

Use ALIYUN::DTS::Instance to purchase a DTS instance and ALIYUN::DTS::SynchronizationJob2 to configure a data synchronization task instead.

Syntax

{
  "Type": "ALIYUN::DTS::SynchronizationJob",
  "Properties": {
    "SynchronizationJobClass": String,
    "SourceEndpoint": Map,
    "PayType": String,
    "DataInitialization": Boolean,
    "Period": String,
    "DestRegion": String,
    "SourceRegion": String,
    "UsedTime": Integer,
    "SynchronizationObjects": List,
    "NetworkType": String,
    "DestinationEndpoint": Map,
    "StructureInitialization": Boolean,
    "Topology": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

SynchronizationJobClass

String

Yes

No

The instance specification.

Valid values:

  • micro

  • small (default)

  • medium

  • large

SourceEndpoint

Map

Yes

No

The configurations of the source instance.

SourceEndpoint properties.

PayType

String

No

No

The billing method.

Valid values:

  • Postpaid

  • Prepaid

DataInitialization

Boolean

No

No

Whether to perform initial full data synchronization.

Valid values:

  • true (default)

  • false

Period

String

No

No

The unit of the subscription duration.

Valid values:

  • Year

  • Month

This property takes effect when PayType is set to Prepaid.

DestRegion

String

Yes

No

The region ID of the destination instance.

None.

SourceRegion

String

Yes

No

The region ID of the source instance.

None.

UsedTime

Integer

No

No

The subscription duration.

This property takes effect when PayType is set to Prepaid.

SynchronizationObjects

List

No

No

The objects to synchronize.

SynchronizationObjects properties.

NetworkType

String

No

No

The network type for cross-region synchronization.

Valid values:

  • Internet (default)

  • Intranet

DestinationEndpoint

Map

Yes

No

The configurations of the destination instance.

DestinationEndpoint properties.

StructureInitialization

Boolean

No

No

Whether to perform initial schema synchronization.

Valid values:

  • true (default)

  • false

Topology

String

No

No

The synchronization topology.

Valid values:

  • oneway (default)

  • bidirectional

Set to bidirectional only for MySQL-to-MySQL synchronization.

SourceEndpoint syntax

"SourceEndpoint": {
  "UserName": String,
  "InstanceId": String,
  "IP": String,
  "Port": String,
  "Role": String,
  "OwnerID": String,
  "Password": String,
  "InstanceType": String,
  "InstanceTypeForCreation": String
}

SourceEndpoint properties

Property

Type

Required

Editable

Description

Constraint

UserName

String

No

No

The username for the source instance.

Required when the source instance is an ECS instance or an on-premises database connected over Express Connect. Not required for ApsaraDB for Redis instances.

InstanceId

String

No

No

The ID of the source instance.

None.

IP

String

No

No

The IP address of the source instance.

Required when the source instance is an on-premises database connected over Express Connect.

Port

String

No

No

The listening port of the source instance.

Required when the source instance is an ECS instance or an on-premises database connected over Express Connect.

Role

String

No

No

The RAM role authorized by the Alibaba Cloud account that owns the source instance. Required when the source and destination instances belong to different Alibaba Cloud accounts. For permissions and authorization details, see Configure RAM authorization for cross-account DTS tasks.

None.

OwnerID

String

No

No

The Alibaba Cloud account ID that owns the source instance. Required when the source and destination instances belong to different Alibaba Cloud accounts.

None.

Password

String

No

No

The password for the source instance.

Required when the source instance is an ECS instance or an on-premises database connected over Express Connect.

InstanceType

String

Yes

No

The type of the source instance.

Valid values:

  • Redis: ApsaraDB for Redis instance

  • RDS: ApsaraDB RDS instance

  • POLARDB: PolarDB for MySQL cluster

  • ECS: self-managed database that is hosted on an ECS instance

  • Express: self-managed database that is connected over an Express Connect circuit

  • dg: self-managed database that is connected over Database Gateway (DG)

  • cen: self-managed database that is connected over Cloud Enterprise Network (CEN)

InstanceTypeForCreation

String

No

No

The type of the source instance for the synchronization channel.

Valid values:

  • MySQL

  • PolarDB

  • Redis

  • SQLServer

  • PostgreSQL

  • PolarDB-X (formerly known as DRDS)

SynchronizationObjects syntax

"SynchronizationObjects": [
  {
    "TableExcludes": List,
    "NewSchemaName": String,
    "NewDBName": String,
    "TableIncludes": List,
    "SchemaName": String,
    "DBName": String
  }
]

SynchronizationObjects properties

Property

Type

Required

Editable

Description

Constraint

TableExcludes

List

No

No

Tables to exclude from synchronization.

None.

NewSchemaName

String

No

No

The mapped schema name in the destination instance.

None.

NewDBName

String

No

No

The mapped database name in the destination instance.

None.

TableIncludes

List

No

No

Tables to synchronize from the source database.

None.

SchemaName

String

No

No

The schema name to synchronize.

None.

DBName

String

No

No

The database name to synchronize.

None.

TableExcludes syntax

"TableExcludes": [
  {
    "TableName": String
  }
]

TableExcludes property

Property

Type

Required

Editable

Description

Constraint

TableName

String

No

No

The table name.

None.

TableIncludes syntax

"TableIncludes": [
  {
    "TableName": String,
    "FilterCondition": String,
    "ColumnExcludes": List,
    "ColumnIncludes": List,
    "NewTableName": String
  }
]

TableIncludes properties

Property

Type

Required

Editable

Description

Constraint

TableName

String

No

No

The table name to synchronize.

None.

FilterCondition

String

No

No

The filter condition.

None.

ColumnExcludes

List

No

No

Columns to exclude from synchronization.

None.

ColumnIncludes

List

No

No

Columns to synchronize.

None.

NewTableName

String

No

No

The mapped table name in the destination instance.

None.

ColumnExcludes syntax

"ColumnExcludes": [
  {
    "ColumnName": String
  }
]

ColumnExcludes property

Property

Type

Required

Editable

Description

Constraint

ColumnName

String

No

No

The column name to exclude from synchronization.

None.

ColumnIncludes syntax

"ColumnIncludes": [
  {
    "NewColumnName": String,
    "ColumnName": String
  }
]

ColumnIncludes properties

Property

Type

Required

Editable

Description

Constraint

NewColumnName

String

No

No

The mapped column name in the destination instance.

None.

ColumnName

String

No

No

The column name to synchronize.

None.

DestinationEndpoint syntax

"DestinationEndpoint": {
  "UserName": String,
  "InstanceId": String,
  "IP": String,
  "InstanceType": String,
  "Password": String,
  "InstanceTypeForCreation": String,
  "Port": String
}

DestinationEndpoint properties

Property

Type

Required

Editable

Description

Constraint

UserName

String

No

No

The username for the destination instance.

Required when the destination instance is an ECS instance or an on-premises database connected over Express Connect. Not required for ApsaraDB for Redis instances.

InstanceId

String

No

No

The ID of the destination instance.

  • For MaxCompute destinations, set to the MaxCompute project name.

  • For AnalyticDB for MySQL destinations, set to the cluster ID.

  • For DataHub destinations, set to the DataHub project name.

IP

String

No

No

The IP address of the destination instance.

Required when the destination instance is an on-premises database connected over Express Connect.

InstanceType

String

Yes

No

The type of the destination instance.

Valid values:

  • Redis: ApsaraDB for Redis instance

  • RDS (default): ApsaraDB RDS instance

  • POLARDB: PolarDB for MySQL cluster

  • ECS: self-managed database that is hosted on an ECS instance

  • Express: self-managed database that is connected over an Express Connect circuit

  • MaxCompute: MaxCompute project

  • DataHub: DataHub project

  • AnalyticDB: AnalyticDB for MySQL V2.0 cluster

  • AnalyticDB30: AnalyticDB for MySQL V3.0 cluster

InstanceTypeForCreation

String

No

No

The type of the destination instance for the synchronization channel.

Valid values:

  • MySQL

  • PolarDB

  • Redis

  • MaxCompute

  • DataHub

  • Kafka

  • Elasticsearch

  • Tablestore

Password

String

No

No

The password for the destination instance.

Required when the destination instance is an ECS instance or an on-premises database connected over Express Connect.

Port

String

No

No

The listening port of the destination instance.

Required when the destination instance is an ECS instance or an on-premises database connected over Express Connect.

Return values

Fn::GetAtt

SynchronizationJobId: the ID of the data synchronization instance.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      RdsId:
        Type: String
        AssociationProperty: ALIYUN::RDS::Instance::InstanceId
    Resources:
      SynchronizationJob:
        Type: ALIYUN::DTS::SynchronizationJob
        Properties:
          SynchronizationJobClass: small
          SourceEndpoint:
            InstanceId:
              Ref: RdsId
            InstanceTypeForCreation: MySQL
            InstanceType: RDS
          PayType: Postpaid
          DataInitialization: false
          DestRegion:
            Ref: ALIYUN::Region
          SourceRegion:
            Ref: ALIYUN::Region
          NetworkType: Internet
          DestinationEndpoint:
            InstanceId:
              Ref: RdsId
            InstanceTypeForCreation: MySQL
            InstanceType: RDS
          StructureInitialization: false
    Outputs:
      SynchronizationJobId:
        Description: Synchronization instance ID
        Value:
          Fn::GetAtt:
            - SynchronizationJob
            - SynchronizationJobId
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "RdsId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::RDS::Instance::InstanceId"
        }
      },
      "Resources": {
        "SynchronizationJob": {
          "Type": "ALIYUN::DTS::SynchronizationJob",
          "Properties": {
            "SynchronizationJobClass": "small",
            "SourceEndpoint": {
              "InstanceId": {
                "Ref": "RdsId"
              },
              "InstanceTypeForCreation": "MySQL",
              "InstanceType": "RDS"
            },
            "PayType": "Postpaid",
            "DataInitialization": false,
            "DestRegion": {
              "Ref": "ALIYUN::Region"
            },
            "SourceRegion": {
              "Ref": "ALIYUN::Region"
            },
            "NetworkType": "Internet",
            "DestinationEndpoint": {
              "InstanceId": {
                "Ref": "RdsId"
              },
              "InstanceTypeForCreation": "MySQL",
              "InstanceType": "RDS"
            },
            "StructureInitialization": false
          }
        }
      },
      "Outputs": {
        "SynchronizationJobId": {
          "Description": "Synchronization instance ID",
          "Value": {
            "Fn::GetAtt": [
              "SynchronizationJob",
              "SynchronizationJobId"
            ]
          }
        }
      }
    }