ALIYUN::DTS::SynchronizationJob is used to purchase a synchronization instance and configure synchronization task.

Syntax

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

Properties

Parameter Type Required Editable Description Constraint
SynchronizationJobClass String Yes Not supported Synchronization instance specifications Valid values:
  • micro
  • small (default)
  • medium
  • large
SourceEndpoint Map Yes Not supported SOURCE instance configuration None
PayType String No Released Billing Valid values:
  • Postpaid: The pay-as-you-go billing method is used.
  • Prepaid: The subscription billing method is used.
DataInitialization Boolean Erased Released Indicates whether to perform full data initialization before synchronization. Valid values:
  • true (default)
  • false
Period String No Released The subscription period. This parameter takes effect only when the value of PayType is Prepaid. Valid values:
  • Year
  • Month
DestRegion String Yes Not supported The region where the destination instance resides. None
SourceRegion String Yes Not supported The region where the source instance is located. None
UsedTime Integer Erased Released The subscription duration of the subscription instance. This parameter takes effect only when the PayType parameter is set to Prepaid. None
SynchronizationObjects List Erased Released Objects to be synchronized None
NetworkType String No Released The type of the data transmission network used for cross-region synchronization. Valid values:
  • Internet (default)
  • Intranet
DestinationEndpoint Map Yes Not supported Configure the synchronization Channel None
StructureInitialization Boolean Erased Released Specifies whether to initialize the schema before synchronization. Valid values:
  • true (default)
  • false
Topology String No Released Synchronization topology Valid values:
  • oneway (default)
  • Bidirectional
This parameter can be set to bidirectional only when data is synchronized between MySQL databases.

SourceEndpoint syntax

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

SourceEndpoint properties

Parameter Type Required Editable Description Constraint
UserName String No Released The account that is used to access the source instance. This parameter must be specified if the source instance is an ECS instance or an on-premises database is connected over a dedicated line. If the source database is a Redis database, you do not need to specify this parameter.
InstanceId String No Released The ID of the source instance. None
IP address String No Released The IP address of the source instance. This parameter must be specified if the source instance is an on-premises database connected through a dedicated line.
Port String No Released The listening port of the source instance. This parameter must be specified if the source instance is an ECS instance or an on-premises database is connected over a dedicated line.
Role String No Released The ram role that the Apsara stack tenant account user of the source instance assigns to the Apsara stack tenant account of the destination instance. This parameter is available if the source and destination instances belong to different Apsara stack tenant accounts. For the permissions and authorization procedure of a role, see Instance types supported by cross-account data migration and synchronization. None
OwnerID String No Released The UID of the Apsara stack tenant account to which the source instance belongs. This parameter is required when the source and destination instances belong to different Apsara stack tenant accounts. None
Password String No Released The password that is used to access the source instance. This parameter must be specified if the source instance is an ECS instance or an on-premises database is connected over a dedicated line.
InstanceType String Yes Not supported The type of the source instance. Valid values:
  • Redis: Alibaba Cloud Redis instance
  • RDS: Alibaba Cloud RDS instance
  • POLARDB: displays data in Alibaba Cloud POLARDB for MySQL clusters.
  • ECS: User-created database hosted on ECS

SynchronizationObjects syntax

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

SynchronizationObjects properties

Parameter Type Required Editable Description Constraint
TableExcludes List Erased Released The name of a table that does not need to be synchronized in the database to be synchronized. Example: [ { "TableName": "The name of a table that is not required to be synchronized in the source database" } ]. None
NewSchemaName String No Released The mapped Schema name in the destination instance. None
NewDBName String No Released The mapped name of the source database in the destination instance. None
TableIncludes List Erased Released The table to be synchronized, for example:
{
  "TableName": "The name of the table to be synchronized",
  "NewTableName": "The mapped name of the table to be synchronized in the destination instance",
  "FilterCondition": "where condition",
  "ColumnIncludes": [
    {
      "ColumnName": "The name of the column to be synchronized in the table",
      "NewColumnName": "The mapped name of the column to be synchronized in the destination instance"
    }
  ],
  "ColumnExcludes": [
    {
      "ColumnName": "Name of the column not synchronized in the table"
    }
  ]
}
SchemaName String No Released The name of the Schema to be synchronized. None
DBName String No Released The name of the database to be synchronized. None

DestinationEndpoint syntax

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

DestinationEndpoint properties

Parameter Type Required Editable Description Constraint
UserName String No Released The account used to access the destination instance. This parameter must be specified if the destination instance is an ECS instance or an on-premises database is connected over a leased line. If the destination database is a Redis database, you do not need to specify this parameter.
InstanceId String No Released The ID of the destination instance.
  • If the target instance is MaxCompute, specify a Project name in the MaxCompute instance.
  • The ID of the cluster to which the AnalyticDB for MySQL. This parameter is required if the destination instance is an Alibaba Cloud AnalyticDB for MySQL instance.
  • If the destination instance is DataHub, specify a Project in the DataHub instance.
IP address String No Released Destination instance IP address This parameter must be specified if the target instance is an on-premises database connected through a leased line.
InstanceType String Yes Not supported Type of target instance Valid values:
  • Redis: Alibaba Cloud Redis instance
  • RDS (default): Alibaba Cloud RDS instance
  • POLARDB: displays data in Alibaba Cloud POLARDB for MySQL clusters.
  • ECS: User-created database hosted on ECS
  • Express: a local database connected through a leased line.
  • MaxCompute: Alibaba Cloud MaxCompute instance
  • DataHub: Alibaba Cloud DataHub instance
  • AnalyticDB: Alibaba Cloud AnalyticDB for MySQL (2.0)
  • AnalyticDB30: Alibaba Cloud AnalyticDB for MySQL (3.0)
Password String No Released The password that is used to connect to the destination instance. This parameter must be specified if the destination instance is an ECS instance or an on-premises database is connected over a leased line.
Port String No Released The listening port of the target instance. This parameter must be specified if the destination instance is an ECS instance or an on-premises database is connected over a leased line.

Return value

Fn::GetAtt

SynchronizationJobId: The ID of the synchronization instance.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "SynchronizationJob": {
      "Type": "ALIYUN::DTS::SynchronizationJob",
      "Properties": {
        "StructureInitialization": {
          "Ref": "StructureInitialization"
        },
        "SynchronizationJobClass": {
          "Ref": "SynchronizationJobClass"
        },
        "SourceEndpoint": {
          "Ref": "SourceEndpoint"
        },
        "PayType": {
          "Ref": "PayType"
        },
        "DataInitialization": {
          "Ref": "DataInitialization"
        },
        "Period": {
          "Ref": "Period"
        },
        "DestRegion": {
          "Ref": "DestRegion"
        },
        "SourceRegion": {
          "Ref": "SourceRegion"
        },
        "UsedTime": {
          "Ref": "UsedTime"
        },
        "SynchronizationObjects": {
          "Ref": "SynchronizationObjects"
        },
        "DestinationEndpoint": {
          "Ref": "DestinationEndpoint"
        },
        "NetworkType": {
          "Ref": "NetworkType"
        },
        "Topology": {
          "Ref": "Topology"
        }
      }
    }
  },
  "Parameters": {
    "StructureInitialization": {
      "Default": true,
      "Type": "Boolean",
      "Description": "Whether to initialize the structure object before synchronization. The values include:true: indicates that the structure object is initialized\nfalse: no result object initialization\nThe default value is: true",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "SynchronizationJobClass": {
      "Type": "String",
      "Description": "Synchronous instance specifications, which can be:\nmicro, small, medium, large and so on. The default value is: small"
    },
    "SourceEndpoint": {
      "Type": "Json",
      "Description": "Migration source configuration"
    },
    "PayType": {
      "Default": "Postpaid",
      "Type": "String",
      "Description": "Payment type, which include:\nPostpaid: postpaid type, Prepaid: Prepaid type. Default is Postpaid ",
      "AllowedValues": [
        "Postpaid",
        "Prepaid"
      ]
    },
    "DataInitialization": {
      "Default": true,
      "Type": "Boolean",
      "Description": "Whether to perform full data initialization before synchronization. The values include:true: means full data initialization\nfalse: no full data initialization\nThe default value is: true",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "Period": {
      "Type": "String",
      "Description": "If prepaid payment type, then the parameters specified in the purchase package instance or instances as examples of a monthly subscription, which can be:\nYear: Annual, Month: monthly",
      "AllowedValues": [
        "Year",
        "Month"
      ]
    },
    "DestRegion": {
      "Type": "String",
      "Description": "Region where the synchronization target instance is located."
    },
    "SourceRegion": {
      "Type": "String",
      "Description": "Region where the synchronization source instance is located."
    },
    "UsedTime": {
      "Type": "Number",
      "Description": "f the payment type is prepaid, then this parameter is the length of the purchase, and parameters such as 1, 2, 3 can be passed in as needed"
    },
    "SynchronizationObjects": {
      "Type": "Json",
      "Description": "Objects that need to be synchronized"
    },
    "DestinationEndpoint": {
      "Type": "Json",
      "Description": "Migration target configuration"
    },
    "NetworkType": {
      "Type": "String",
      "Description": "When synchronization geographies, the type of data transmission network used. Value include: Internet, Intranet. The default value is: Internet",
      "AllowedValues": [
        "Internet",
        "Intranet"
      ]
    },
    "Topology": {
      "Type": "String",
      "Description": "Synchronous topology, the value includes: oneway, bidirectional.the default value is: oneway, only MySQL-> MySQL synchronization, this parameter can receive the value bidirectional"
    }
  },
  "Outputs": {
    "SynchronizationJobId": {
      "Description": "Synchronization instance ID",
      "Value": {
        "Fn::GetAtt": [
          "SynchronizationJob",
          "SynchronizationJobId"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  SynchronizationJob:
    Type: 'ALIYUN::DTS::SynchronizationJob'
    Properties:
      StructureInitialization:
        Ref: StructureInitialization
      SynchronizationJobClass:
        Ref: SynchronizationJobClass
      SourceEndpoint:
        Ref: SourceEndpoint
      PayType:
        Ref: PayType
      DataInitialization:
        Ref: DataInitialization
      Period:
        Ref: Period
      DestRegion:
        Ref: DestRegion
      SourceRegion:
        Ref: SourceRegion
      UsedTime:
        Ref: UsedTime
      SynchronizationObjects:
        Ref: SynchronizationObjects
      DestinationEndpoint:
        Ref: DestinationEndpoint
      NetworkType:
        Ref: NetworkType
      Topology:
        Ref: Topology
Parameters:
  StructureInitialization:
    Default: true
    Type: Boolean
    Description: >-
      Whether to initialize the structure object before synchronization. The
      values include:true: indicates that the structure object is initialized

      false: no result object initialization

      The default value is: true
    AllowedValues:
      - 'True'
      - 'true'
      - 'False'
      - 'false'
  SynchronizationJobClass:
    Type: String
    Description: |-
      Synchronous instance specifications, which can be:
      micro, small, medium, large and so on. The default value is: small
  SourceEndpoint:
    Type: Json
    Description: Migration source configuration
  PayType:
    Default: Postpaid
    Type: String
    Description: |-
      Payment type, which include:
      Postpaid: postpaid type, Prepaid: Prepaid type. Default is Postpaid
    AllowedValues:
      - Postpaid
      - Prepaid
  DataInitialization:
    Default: true
    Type: Boolean
    Description: >-
      Whether to perform full data initialization before synchronization. The
      values include:true: means full data initialization

      false: no full data initialization

      The default value is: true
    AllowedValues:
      - 'True'
      - 'true'
      - 'False'
      - 'false'
  Period:
    Type: String
    Description: >-
      If prepaid payment type and then the parameters specified in the purchase
      package instance or instances as examples of a monthly subscription, which
      can be:

      Year: Annual, Month: monthly
    AllowedValues:
      -Year
      -Month
  DestRegion:
    Type: String
    Description: Region where the synchronization target instance is located.
  SourceRegion:
    Type: String
    Description: Region where the synchronization source instance is located.
  UsedTime:
    Type: Number
    Description: >-
      f the payment type is prepaid and then this parameter is the length of the
      purchase, and parameters such as 1, 2, 3 can be passed in as needed
  SynchronizationObjects:
    Type: Json
    Description: Objects that need to be synchronized
  DestinationEndpoint:
    Type: Json
    Description: Migration target configuration
  NetworkType:
    Type: String
    Description: >-
      When synchronization geographies and the type of data transmission network
      used. Value include: Internet, Intranet. The default value is: Internet
    AllowedValues:
      -Internet
      -Intranet
  Topology:
    Type: String
    Description: >-
      Synchronous topology, the value includes: oneway, bidirectional.the
      default value is: oneway, only MySQL-> MySQL synchronization, this
      parameter can receive the value bidirectional
Outputs:
  SynchronizationJobId:
    Description: Synchronization instance ID
    Value:
      'Fn::GetAtt':
        -SynchronizationJob
        -SynchronizationJobId