Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::DTS::SubscriptionJob2

Última atualização: Jun 27, 2026

O recurso ALIYUN::DTS::SubscriptionJob2 configure uma tarefa de rastreamento de alterações do DTS.

Sintaxe

{
  "Type": "ALIYUN::DTS::SubscriptionJob2",
  "Properties": {
    "Status": String,
    "Reserve": Map,
    "DelayPhone": String,
    "DedicatedClusterId": String,
    "ErrorNotice": Boolean,
    "DtsJobName": String,
    "DelayRuleTime": Integer,
    "DtsInstanceId": String,
    "DbList": Map,
    "DtsBisLabel": String,
    "SubscriptionDataType": Map,
    "Checkpoint": String,
    "DelayNotice": Boolean,
    "DtsJobId": String,
    "SubscriptionInstance": Map,
    "SourceEndpoint": Map,
    "ErrorPhone": String,
    "SrcPrimaryVswId": String,
    "MaxDu": Integer,
    "DestPrimaryVswId": String,
    "DestSecondaryVswId": String,
    "SrcSecondaryVswId": String,
    "MinDu": Integer,
    "ResourceGroupId": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

DtsJobName

String

Sim

Sim

Nome da tarefa de rastreamento de alterações.

Use um nome descritivo para facilitar a identificação. Não precisa ser único.

DbList

Map

Sim

Sim

Objetos cujas alterações devem ser rastreadas.

String JSON. Os objetos rastreados são definidos em Objetos de tarefas do DTS.

SourceEndpoint

Map

Sim

Sim

Configurações da instância de source.

Para mais informações, consulte Propriedades de SourceEndpoint.

SubscriptionInstance

Map

Sim

Não

Configurações da instância de rastreamento de alterações.

Para mais informações, consulte Propriedades de SubscriptionInstance.

Checkpoint

String

Não

Não

Offset inicial da migração ou sincronização incremental de dados.

Este valor é um timestamp UNIX que representa o número de milissegundos decorridos desde 1º de janeiro de 1970, 00:00:00 UTC. Unidade: segundos.

DelayPhone

String

Não

Não

Números de celular para envio de alertas relacionados à latência.

Separe vários números de celular com vírgulas (,).

Nota
  • Disponível apenas para usuários do site da China (aliyun.com). Suporta somente números da China continental. Máximo: 10 números.

  • Usuários do site internacional (alibabacloud.com) não recebem alertas por celular, mas podem configure regras de alerta no CloudMonitor. Para mais informações, consulte Configurar regras de alerta para tarefas do DTS no console do CloudMonitor.

DedicatedClusterId

String

Não

Não

ID do cluster dedicado do DTS.

Agenda a tarefa para o cluster dedicado do DTS especificado.

DelayNotice

Boolean

Não

Não

Indica se a latência da tarefa deve ser monitorada.

Valores válidos:

  • true

  • false

DtsJobId

String

Não

Não

ID da tarefa de rastreamento de alterações.

Nenhuma.

DelayRuleTime

Integer

Não

Não

Limiar para acionar alertas relacionados à latência.

Unidade: segundos. Deve ser um número inteiro. Para evitar oscilações causadas por sobrecarga de rede e banco de dados, defina este valor como superior a 10 segundos.

Nota

Obrigatório quando DelayNotice for true.

DestPrimaryVswId

String

Não

Não

ID do vSwitch primário do destino NAT da VPC.

Nenhuma.

DestSecondaryVswId

String

Não

Não

ID do vSwitch secundário do destino NAT da VPC.

Nenhuma.

DtsInstanceId

String

Não

Não

ID da instância de rastreamento de alterações.

Nenhuma.

DtsBisLabel

String

Não

Não

Tag de ambiente da instância do DTS.

Valores válidos:

  • normal

  • online

ErrorPhone

String

Não

Não

Números de celular para envio de alertas relacionados ao status.

Separe vários números de celular com vírgulas (,).

Nota
  • Disponível apenas para usuários do site da China (aliyun.com). Suporta somente números da China continental. Máximo: 10 números.

  • Usuários do site internacional (alibabacloud.com) não recebem alertas por celular, mas podem configure regras de alerta no CloudMonitor. Para mais informações, consulte Configurar regras de alerta para tarefas do DTS no console do CloudMonitor.

ErrorNotice

Boolean

Não

Não

Indica se o status da tarefa deve ser monitorado.

Valores válidos:

  • true

  • false

Reserve

Map

Não

Não

Propriedade reservada do Data Transmission Service (DTS).

Adiciona configurações extras de source ou destino às tarefas do DTS. Por exemplo, especifique o formato de armazenamento de dados para um banco de dados ApsaraMQ for Kafka de destino ou o ID de uma instância CEN de destino.

ResourceGroupId

String

Não

Não

ID do grupo de recursos.

Nenhuma.

Status

String

Não

Sim

Status da tarefa de rastreamento de alterações.

Valores válidos:

  • Synchronizing

  • Suspending

  • Stopping

SubscriptionDataType

Map

Não

Sim

Tipo de dado a ser rastreado para alterações.

Para mais informações, consulte Propriedades de SubscriptionDataType.

SrcPrimaryVswId

String

Não

Não

ID do vSwitch primário da source NAT da VPC.

Nenhuma.

SrcSecondaryVswId

String

Não

Não

ID do vSwitch secundário da source NAT da VPC.

Nenhuma.

MaxDu

Integer

Não

Não

Limite máximo de DU.

Compatível apenas com instâncias Serverless.

MinDu

Integer

Não

Não

Limite mínimo de DU.

Compatível apenas com instâncias Serverless.

Sintaxe de SubscriptionDataType

"SubscriptionDataType": {
  "DML": Boolean,
  "DDL": Boolean
}

Propriedades de SubscriptionDataType

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

DML

Boolean

Não

Sim

Indica se as alterações de instruções de linguagem de manipulação de dados (DML) devem ser rastreadas.

Valores válidos:

  • true (padrão)

  • false

DDL

Boolean

Não

Sim

Indica se as alterações de instruções de linguagem de definição de dados (DDL) devem ser rastreadas.

Valores válidos:

  • true (padrão)

  • false

Sintaxe de SubscriptionInstance

"SubscriptionInstance": {
  "VPCId": String,
  "NetworkType": String,
  "VSwitchId": String
}

Propriedades de SubscriptionInstance

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

NetworkType

String

Sim

Não

Tipo de rede da instância de rastreamento de alterações.

Defina como VPC.

  • Especificar NetworkType habilita a nova versão. Defina também SubscriptionInstance.VPCId e SubscriptionInstance.VSwitchID. Omitir NetworkType utiliza a versão anterior.

  • A versão anterior da instância de rastreamento de alterações suporta bancos de dados MySQL autogerenciados, instâncias do ApsaraDB RDS for MySQL e instâncias do PolarDB for Xscale (PolarDB-X). A nova versão suporta bancos de dados MySQL autogerenciados, instâncias do ApsaraDB RDS for MySQL, clusters do PolarDB for MySQL e bancos de dados Oracle.

VPCId

String

Não

Não

ID da Virtual Private Cloud (VPC) da instância de rastreamento de alterações.

Obrigatório apenas quando NetworkType for VPC.

VSwitchId

String

Não

Não

ID do vSwitch da instância de rastreamento de alterações.

Obrigatório apenas quando NetworkType for VPC.

Sintaxe de SourceEndpoint

"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
}

Propriedades de SourceEndpoint

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

OracleSID

String

Não

Não

ID do sistema (SID) do banco de dados Oracle.

Obrigatório apenas quando SourceEndpoint.EngineName for Oracle e o banco de dados não utilizar RAC.

UserName

String

Não

Não

Conta do banco de dados de source.

As permissões necessárias para a conta do banco de dados variam conforme os cenários de migração. Para mais informações, consulte Cenários de migração.

InstanceID

String

Não

Não

ID da instância que hospeda o banco de dados de source.

Valores válidos:

  • Obrigatório apenas quando SourceEndpoint.InstanceType for RDS, ECS, Express, MongoDB, PolarDB ou PolarDB_o. Por exemplo, se SourceEndpoint.InstanceType for ECS, defina este valor como o ID da instância ECS.

  • Se SourceEndpoint.InstanceType for Express, defina este valor como o ID da VPC.

IP

String

Não

Não

Endereço IP do banco de dados de source.

Obrigatório apenas quando SourceEndpoint.InstanceType for LocalInstance ou Express.

Port

String

Não

Não

Porta de serviço do banco de dados de source.

Obrigatório apenas quando SourceEndpoint.InstanceType for ECS, LocalInstance ou Express.

VSwitchID

String

Não

Não

ID do vSwitch para o link de transmissão de dados.

Nenhuma.

DatabaseName

String

Não

Não

Nome do banco de dados de source ou do banco de dados de autenticação.

  • Obrigatório apenas quando SourceEndpoint.EngineName for PostgreSQL ou MongoDB.

  • Se SourceEndpoint.EngineName for PostgreSQL, defina este valor como o nome do banco de dados de source. Se for MongoDB, defina como o nome do banco de dados de autenticação.

EngineName

String

Não

Não

Tipo de mecanismo do banco de dados de source.

Valores válidos:

  • MySQL

  • TiDB

  • SQLServer

  • PostgreSQL

  • Oracle

  • MongoDB

  • Redis

  • PolarDB

  • polardb_pg

Nota

Obrigatório apenas quando SourceEndpoint.InstanceType for RDS, PolarDB, ECS, LocalInstance ou Express.

Role

String

Não

Não

Função autorizada do Resource Access Management (RAM) da instância de source.

Obrigatório quando a source e o destino pertencem a contas diferentes da Alibaba Cloud. A função RAM autoriza a conta de destino a acessar a instância de source.

Nota

Para mais informações sobre as permissões exigidas pela função RAM e como concedê-las, consulte Configurar autorização RAM para tarefas do DTS entre contas.

OwnerID

String

Não

Não

ID da conta da Alibaba Cloud à qual a instância de source pertence.

Obrigatório apenas para migração de dados entre contas.

Region

String

Não

Não

ID da região do banco de dados de source.

Se SourceEndpoint.InstanceType estiver definido como LocalInstance, defina SourceEndpoint.Region como cn-hangzhou ou o ID da região mais próxima da região do banco de dados autogerenciado. Para mais informações, consulte Regiões suportadas.

InstanceType

String

Não

Não

Tipo da instância de source.

Valores válidos:

  • RDS: Instância do ApsaraDB RDS

  • ECS: Banco de dados autogerenciado hospedado em uma instância ecs

  • LocalInstance: Banco de dados autogerenciado com endereço IP público

  • Express: Banco de dados autogerenciado conectado via Express Connect, VPN Gateway ou Smart Access Gateway (SAG)

  • dg: Banco de dados autogerenciado conectado via Database Gateway

  • cen: Banco de dados autogerenciado conectado via CEN

  • MongoDB: Instância do ApsaraDB for MongoDB

  • PolarDB: Cluster do PolarDB for MySQL ou cluster do PolarDB for PostgreSQL

  • PolarDB_o: Cluster do PolarDB for Oracle

Password

String

Não

Sim

Senha da conta do banco de dados de source.

Nenhuma.

Valores de retorno

Fn::GetAtt

  • DtsJobId: o ID da tarefa de rastreamento de alterações.

  • DtsJobName: o nome da tarefa de rastreamento de alterações.

  • DtsInstanceId: o ID da instância de rastreamento de alterações.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Checkpoint:
    Description:
      en: The start offset of incremental data migration or synchronization. This
        value is a UNIX timestamp representing the number of seconds that have elapsed
        since January 1, 1970, 00:00:00 UTC.
    Type: String
  DbList:
    Description:
      en: The objects for which you want to track data changes.
    Type: Json
  DedicatedClusterId:
    Description:
      en: The ID of the DTS dedicated cluster on which the task runs.
    Type: String
  DelayNotice:
    Description:
      en: 'Specifies whether to monitor the task latency. Valid values: **true** and
        **false**'
    Type: Boolean
  DelayPhone:
    Description:
      en: 'The mobile numbers that receive latency-related alerts. Separate multiple
        mobile numbers with commas (,).

        **Note**: This parameter is available only for users of the China site (aliyun.com).
        Only mobile numbers in the Chinese mainland are supported. You can specify
        up to 10 mobile numbers. Users of the international site (alibabacloud.com)
        cannot receive alerts by using mobile numbers, but can configure alert rules
        for DTS tasks in the CloudMonitor console.'
    Type: String
  DelayRuleTime:
    Description:
      en: 'The threshold for latency alerts. Unit: seconds. You can set the threshold
        based on your business requirements. To prevent jitters caused by network
        and database overloads, we recommend that you set the threshold to more than
        10 seconds.'
    Type: Number
  DtsBisLabel:
    Description:
      en: 'The environment tag of the DTS instance. Valid values: **normal** and **online**.'
    Type: String
  DtsInstanceId:
    Description:
      en: The ID of the DTS instance.
    Type: String
  DtsJobId:
    Description:
      en: The ID of the DTS task.
    Type: String
  DtsJobName:
    Description:
      en: The name of the DTS instance.
    Type: String
  ErrorNotice:
    Description:
      en: 'Specifies whether to monitor the task status. Valid values: **true** and
        **false**.'
    Type: Boolean
  ErrorPhone:
    Description:
      en: 'The mobile numbers that receive status-related alerts. Separate multiple
        mobile numbers with commas (,).

        **Note**: This parameter is available only for users of the China site (aliyun.com).
        Only mobile numbers in the Chinese mainland are supported. You can specify
        up to 10 mobile numbers. Users of the international site (alibabacloud.com)
        cannot receive alerts by using mobile numbers, but can configure alert rules
        for DTS tasks in the CloudMonitor console.'
    Type: String
  Reserve:
    Description:
      en: The reserved parameter of DTS. You can specify this parameter to add more
        configurations of the source or destination instance to the DTS task. For
        example, you can specify the data storage format of the destination Kafka
        database and the ID of the CEN instance.
    Type: Json
  SourceEndpoint:
    AssociationPropertyMetadata:
      Parameters:
        DatabaseName:
          Description:
            en: 'The name of the database which contains the objects to be migrated
              in the source instance.

              **Note**: 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.'
          Type: String
        EngineName:
          Description:
            en: 'The engine of the source database. Valid values: **MySQL**, **PostgreSQL**,
              and **Oracle**.

              **Note**: If the source database is a self-managed database, you must
              specify this parameter.'
          Type: String
        IP:
          Description:
            en: "The IP address of the source instance. \n**Note**: This parameter\
              \ is required only when **InstanceType** is set to **OTHER**, **EXPRESS**,\
              \ **DG**, or **CEN**."
          Type: String
        InstanceID:
          Description:
            en: "The ID of the source instance. If the source instance is an Alibaba\
              \ Cloud database instance, you must specify the ID of the database instance.\
              \ For example, \n- 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 varies with the value of SourceEndpointInstanceType.\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.\n**Note**: If DestinationEndpointInstanceType is set to\
              \ CEN, you must also specify the ID of the CEN instance in the Reserve\
              \ parameter."
          Type: String
        InstanceType:
          Description:
            en: 'The type of the source instance. Valid values:

              - **RDS**: ApsaraDB RDS for MySQL instance

              - **PolarDB**: PolarDB for MySQL cluster

              - **DRDS**: PolarDB-X 1.0 instance

              - **LocalInstance**: self-managed database with a public IP address

              - **ECS**: self-managed database hosted on an Elastic Compute Service
              (ECS) instance

              - **Express**: self-managed database connected over Express Connect

              - **CEN**: self-managed database connected over Cloud Enterprise Network
              (CEN)

              - **dg**: self-managed database connected over Database Gateway'
          Type: String
        OracleSID:
          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 deployed in an architecture
              that is not a Real Application Cluster (RAC).'
          Type: String
        OwnerID:
          Description:
            en: 'The ID of the Alibaba Cloud account to which the source database
              belongs.

              **Note**: You can specify this parameter to migrate or synchronize data
              across different Alibaba Cloud accounts. In this case, you must specify
              **Role**.'
          Type: String
        Password:
          Description:
            en: The password of the source database account.
          Type: String
        Port:
          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: String
        Region:
          Description:
            en: 'The ID of the region in which the source instance resides.

              **Note**: If the source instance is an Alibaba Cloud database instance,
              this parameter is required.'
          Type: String
        Role:
          Description:
            en: 'The name of the Resource Access Management (RAM) role configured
              for the Alibaba Cloud account that owns the source instance.

              **Note**: This parameter is required when you migrate or synchronize
              data across different Alibaba Cloud accounts.'
          Type: String
        UserName:
          Description:
            en: 'The database account of the source database.

              **Note**: In most cases, this parameter is required. The permissions
              that are required for the database account vary with the migration or
              synchronization scenario.'
          Type: String
        VSwitchID:
          Description:
            en: The ID of the vSwitch used for the data shipping link.
          Type: String
    Description:
      en: Source instance configuration.
    Type: Json
  Status:
    AllowedValues:
    - Subscribing
    - Suspending
    - Stopping
    Description:
      en: 'The status of the resource. Valid values:

        - **Subscribing**: Start the task.

        - **Suspending**: Suspend the task.

        - **Stopping**: Stop the task.'
    Type: String
  SubscriptionDataType:
    AssociationPropertyMetadata:
      Parameters:
        DDL:
          Description:
            en: 'Specifies whether to track DDL statements. Default value: true. Valid
              values:

              - **true**: tracks DDL statements.

              - **false**: does not track DDL statements.'
          Type: Boolean
        DML:
          Description:
            en: 'Specifies whether to track DML statements. Default value: true. Valid
              values:

              - **true**: tracks DML statements.

              - **false**: does not track DML statements.'
          Type: Boolean
    Description:
      en: Subscription data type.
    Type: Json
  SubscriptionInstance:
    AssociationPropertyMetadata:
      Parameters:
        NetworkType:
          Description:
            en: 'The network type of the change tracking task. Set the value to **vpc**.
              A value of vpc indicates the Virtual Private Cloud (VPC) network type.**Note**:

              - To use the new version of the change tracking feature, you must specify
              **NetworkType**. You must also specify **VPCId** and **VSwitchID**.
              If you do not specify **NetworkType**, the previous version of the change
              tracking feature is used.

              - The previous version of the change tracking feature supports self-managed
              MySQL databases, ApsaraDB RDS for MySQL instances, and PolarDB-X 1.0
              instances. The new version of the change tracking feature supports self-managed
              MySQL databases, ApsaraDB RDS for MySQL instances, PolarDB for MySQL
              clusters, and Oracle databases.'
          Type: String
        VPCId:
          Description:
            en: 'The ID of the VPC in which the change tracking instance is deployed.

              **Note**: This parameter takes effect and is required only when **NetworkType**
              is set to **vpc**.'
          Type: String
        VSwitchId:
          AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
          AssociationPropertyMetadata:
            VpcId: ${.VpcId}
            ZoneId: ${.ZoneId}
          Description:
            en: 'The ID of the vSwitch in the specified VPC.

              **Note**: This parameter takes effect and is required only when **NetworkType**
              is set to **vpc**.'
          Type: String
    Description:
      en: Subscription instance configuration.
    Type: Json
Resources:
  SubscriptionJob:
    Properties:
      Checkpoint:
        Ref: Checkpoint
      DbList:
        Ref: DbList
      DedicatedClusterId:
        Ref: DedicatedClusterId
      DelayNotice:
        Ref: DelayNotice
      DelayPhone:
        Ref: DelayPhone
      DelayRuleTime:
        Ref: DelayRuleTime
      DtsBisLabel:
        Ref: DtsBisLabel
      DtsInstanceId:
        Ref: DtsInstanceId
      DtsJobId:
        Ref: DtsJobId
      DtsJobName:
        Ref: DtsJobName
      ErrorNotice:
        Ref: ErrorNotice
      ErrorPhone:
        Ref: ErrorPhone
      Reserve:
        Ref: Reserve
      SourceEndpoint:
        Ref: SourceEndpoint
      Status:
        Ref: Status
      SubscriptionDataType:
        Ref: SubscriptionDataType
      SubscriptionInstance:
        Ref: SubscriptionInstance
    Type: ALIYUN::DTS::SubscriptionJob2
Outputs:
  DtsInstanceId:
    Description: The ID of the DTS instance.
    Value:
      Fn::GetAtt:
      - SubscriptionJob
      - DtsInstanceId
  DtsJobId:
    Description: The ID of the task.
    Value:
      Fn::GetAtt:
      - SubscriptionJob
      - DtsJobId
  DtsJobName:
    Description: The name of the DTS job.
    Value:
      Fn::GetAtt:
      - SubscriptionJob
      - DtsJobName
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Status": {
      "Type": "String",
      "Description": {
        "en": "The status of the resource. Valid values:\n- **Subscribing**: Start the task.\n- **Suspending**: Suspend the task.\n- **Stopping**: Stop the task."
      },
      "AllowedValues": [
        "Subscribing",
        "Suspending",
        "Stopping"
      ]
    },
    "Reserve": {
      "Type": "Json",
      "Description": {
        "en": "The reserved parameter of DTS. You can specify this parameter to add more configurations of the source or destination instance to the DTS task. For example, you can specify the data storage format of the destination Kafka database and the ID of the CEN instance."
      }
    },
    "DedicatedClusterId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the DTS dedicated cluster on which the task runs."
      }
    },
    "DelayPhone": {
      "Type": "String",
      "Description": {
        "en": "The mobile numbers that receive latency-related alerts. Separate multiple mobile numbers with commas (,).\n**Note**: This parameter is available only for users of the China site (aliyun.com). Only mobile numbers in the Chinese mainland are supported. You can specify up to 10 mobile numbers. Users of the international site (alibabacloud.com) cannot receive alerts by using mobile numbers, but can configure alert rules for DTS tasks in the CloudMonitor console."
      }
    },
    "ErrorNotice": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to monitor the task status. Valid values: **true** and **false**."
      }
    },
    "DtsJobName": {
      "Type": "String",
      "Description": {
        "en": "The name of the DTS instance."
      }
    },
    "DelayRuleTime": {
      "Type": "Number",
      "Description": {
        "en": "The threshold for latency alerts. Unit: seconds. You can set the threshold based on your business requirements. To prevent jitters caused by network and database overloads, we recommend that you set the threshold to more than 10 seconds."
      }
    },
    "DtsInstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the DTS instance."
      }
    },
    "DbList": {
      "Type": "Json",
      "Description": {
        "en": "The objects for which you want to track data changes."
      }
    },
    "DtsBisLabel": {
      "Type": "String",
      "Description": {
        "en": "The environment tag of the DTS instance. Valid values: **normal** and **online**."
      }
    },
    "SubscriptionDataType": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "DML": {
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to track DML statements. Default value: true. Valid values:\n- **true**: tracks DML statements.\n- **false**: does not track DML statements."
            }
          },
          "DDL": {
            "Type": "Boolean",
            "Description": {
              "en": "Specifies whether to track DDL statements. Default value: true. Valid values:\n- **true**: tracks DDL statements.\n- **false**: does not track DDL statements."
            }
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "Subscription data type."
      }
    },
    "Checkpoint": {
      "Type": "String",
      "Description": {
        "en": "The start offset of incremental data migration or synchronization. This value is a UNIX timestamp representing the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC."
      }
    },
    "DelayNotice": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to monitor the task latency. Valid values: **true** and **false**"
      }
    },
    "DtsJobId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the DTS task."
      }
    },
    "SubscriptionInstance": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "VPCId": {
            "Type": "String",
            "Description": {
              "en": "The ID of the VPC in which the change tracking instance is deployed.\n**Note**: This parameter takes effect and is required only when **NetworkType** is set to **vpc**."
            }
          },
          "NetworkType": {
            "Type": "String",
            "Description": {
              "en": "The network type of the change tracking task. Set the value to **vpc**. A value of vpc indicates the Virtual Private Cloud (VPC) network type.**Note**:\n- To use the new version of the change tracking feature, you must specify **NetworkType**. You must also specify **VPCId** and **VSwitchID**. If you do not specify **NetworkType**, the previous version of the change tracking feature is used.\n- The previous version of the change tracking feature supports self-managed MySQL databases, ApsaraDB RDS for MySQL instances, and PolarDB-X 1.0 instances. The new version of the change tracking feature supports self-managed MySQL databases, ApsaraDB RDS for MySQL instances, PolarDB for MySQL clusters, and Oracle databases."
            }
          },
          "VSwitchId": {
            "AssociationPropertyMetadata": {
              "VpcId": "${.VpcId}",
              "ZoneId": "${.ZoneId}"
            },
            "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
            "Type": "String",
            "Description": {
              "en": "The ID of the vSwitch in the specified VPC.\n**Note**: This parameter takes effect and is required only when **NetworkType** is set to **vpc**."
            }
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "Subscription instance configuration."
      }
    },
    "SourceEndpoint": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "OracleSID": {
            "Type": "String",
            "Description": {
              "en": "The system ID (SID) of the Oracle database.\n**Note**: 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)."
            }
          },
          "UserName": {
            "Type": "String",
            "Description": {
              "en": "The database account of the source database.\n**Note**: In most cases, this parameter is required. The permissions that are required for the database account vary with the migration or synchronization scenario."
            }
          },
          "InstanceID": {
            "Type": "String",
            "Description": {
              "en": "The ID of the source instance. If the source instance is an Alibaba Cloud database instance, you must specify the ID of the database instance. For example, \n- 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 varies with the value of SourceEndpointInstanceType.\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.\n**Note**: If DestinationEndpointInstanceType is set to CEN, you must also specify the ID of the CEN instance in the Reserve parameter."
            }
          },
          "IP": {
            "Type": "String",
            "Description": {
              "en": "The IP address of the source instance. \n**Note**: This parameter is required only when **InstanceType** is set to **OTHER**, **EXPRESS**, **DG**, or **CEN**."
            }
          },
          "Port": {
            "Type": "String",
            "Description": {
              "en": "The port number of the source instance.\n**Note**: This parameter is required only when the source instance is a self-managed database."
            }
          },
          "VSwitchID": {
            "Type": "String",
            "Description": {
              "en": "The ID of the vSwitch used for the data shipping link."
            }
          },
          "DatabaseName": {
            "Type": "String",
            "Description": {
              "en": "The name of the database which contains the objects to be migrated in the source instance.\n**Note**: 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": {
            "Type": "String",
            "Description": {
              "en": "The engine of the source database. Valid values: **MySQL**, **PostgreSQL**, and **Oracle**.\n**Note**: If the source database is a self-managed database, you must specify this parameter."
            }
          },
          "Role": {
            "Type": "String",
            "Description": {
              "en": "The name of the Resource Access Management (RAM) role configured for the Alibaba Cloud account that owns the source instance.\n**Note**: This parameter is required when you migrate or synchronize data across different Alibaba Cloud accounts."
            }
          },
          "OwnerID": {
            "Type": "String",
            "Description": {
              "en": "The ID of the Alibaba Cloud account to which the source database belongs.\n**Note**: You can specify this parameter to migrate or synchronize data across different Alibaba Cloud accounts. In this case, you must specify **Role**."
            }
          },
          "Region": {
            "Type": "String",
            "Description": {
              "en": "The ID of the region in which the source instance resides.\n**Note**: 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:\n- **RDS**: ApsaraDB RDS for MySQL instance\n- **PolarDB**: PolarDB for MySQL cluster\n- **DRDS**: PolarDB-X 1.0 instance\n- **LocalInstance**: self-managed database with a public IP address\n- **ECS**: self-managed database hosted on an Elastic Compute Service (ECS) instance\n- **Express**: self-managed database connected over Express Connect\n- **CEN**: self-managed database connected over Cloud Enterprise Network (CEN)\n- **dg**: self-managed database connected over Database Gateway"
            }
          },
          "Password": {
            "Type": "String",
            "Description": {
              "en": "The password of the source database account."
            }
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "Source instance configuration."
      }
    },
    "ErrorPhone": {
      "Type": "String",
      "Description": {
        "en": "The mobile numbers that receive status-related alerts. Separate multiple mobile numbers with commas (,).\n**Note**: This parameter is available only for users of the China site (aliyun.com). Only mobile numbers in the Chinese mainland are supported. You can specify up to 10 mobile numbers. Users of the international site (alibabacloud.com) cannot receive alerts by using mobile numbers, but can configure alert rules for DTS tasks in the CloudMonitor console."
      }
    }
  },
  "Resources": {
    "SubscriptionJob": {
      "Type": "ALIYUN::DTS::SubscriptionJob2",
      "Properties": {
        "Status": {
          "Ref": "Status"
        },
        "Reserve": {
          "Ref": "Reserve"
        },
        "DedicatedClusterId": {
          "Ref": "DedicatedClusterId"
        },
        "DelayPhone": {
          "Ref": "DelayPhone"
        },
        "ErrorNotice": {
          "Ref": "ErrorNotice"
        },
        "DtsJobName": {
          "Ref": "DtsJobName"
        },
        "DelayRuleTime": {
          "Ref": "DelayRuleTime"
        },
        "DtsInstanceId": {
          "Ref": "DtsInstanceId"
        },
        "DbList": {
          "Ref": "DbList"
        },
        "DtsBisLabel": {
          "Ref": "DtsBisLabel"
        },
        "SubscriptionDataType": {
          "Ref": "SubscriptionDataType"
        },
        "Checkpoint": {
          "Ref": "Checkpoint"
        },
        "DelayNotice": {
          "Ref": "DelayNotice"
        },
        "DtsJobId": {
          "Ref": "DtsJobId"
        },
        "SubscriptionInstance": {
          "Ref": "SubscriptionInstance"
        },
        "SourceEndpoint": {
          "Ref": "SourceEndpoint"
        },
        "ErrorPhone": {
          "Ref": "ErrorPhone"
        }
      }
    }
  },
  "Outputs": {
    "DtsJobId": {
      "Description": "The ID of the task.",
      "Value": {
        "Fn::GetAtt": [
          "SubscriptionJob",
          "DtsJobId"
        ]
      }
    },
    "DtsJobName": {
      "Description": "The name of the DTS job.",
      "Value": {
        "Fn::GetAtt": [
          "SubscriptionJob",
          "DtsJobName"
        ]
      }
    },
    "DtsInstanceId": {
      "Description": "The ID of the DTS instance.",
      "Value": {
        "Fn::GetAtt": [
          "SubscriptionJob",
          "DtsInstanceId"
        ]
      }
    }
  }
}