O recurso ALIYUN::ClickHouse::SynDb cria uma tarefa de sincronização para um cluster ApsaraDB for ClickHouse Community-compatible Edition.
Sintaxe
{
"Type": "ALIYUN::ClickHouse::SynDb",
"Properties": {
"RdsVpcUrl": String,
"LimitUpper": Integer,
"SkipUnsupported": Boolean,
"RdsId": String,
"RdsPassword": String,
"RdsUserName": String,
"CkPassword": String,
"CkUserName": String,
"ClickhousePort": Integer,
"SynDbTables": List,
"DbClusterId": String,
"RdsPort": Integer,
"RdsVpcId": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
CkPassword |
String |
Sim |
Não |
Senha da conta do banco de dados ApsaraDB for ClickHouse. |
Nenhuma. |
|
CkUserName |
String |
Sim |
Não |
Conta do banco de dados do cluster ApsaraDB for ClickHouse. |
Nenhuma. |
|
DbClusterId |
String |
Sim |
Não |
ID do cluster ApsaraDB for ClickHouse. |
Nenhuma. |
|
RdsId |
String |
Sim |
Não |
ID da instância ApsaraDB RDS for MySQL. |
Nenhuma. |
|
RdsPassword |
String |
Sim |
Não |
Senha da conta do banco de dados ApsaraDB RDS for MySQL. |
Nenhuma. |
|
RdsUserName |
String |
Sim |
Não |
Conta do banco de dados da instância ApsaraDB RDS for MySQL. |
Nenhuma. |
|
SkipUnsupported |
Boolean |
Sim |
Não |
Indica se esquemas de tabela não suportados serão ignorados durante a sincronização. |
Valores válidos:
|
|
SynDbTables |
List |
Sim |
Não |
Tabelas a sincronizar. |
Para mais informações, consulte Propriedades de SynDbTables. |
|
ClickhousePort |
Integer |
Não |
Não |
Número da porta do cluster ApsaraDB for ClickHouse. |
Nenhuma. |
|
LimitUpper |
Integer |
Não |
Não |
Limite máximo de linhas sincronizadas por segundo. |
Nenhuma. |
|
RdsPort |
Integer |
Não |
Não |
Número da porta da instância ApsaraDB RDS for MySQL. |
Nenhuma. |
|
RdsVpcId |
String |
Não |
Não |
ID da VPC da instância ApsaraDB RDS for MySQL. |
Nenhuma. |
|
RdsVpcUrl |
String |
Não |
Não |
Endpoint privado da instância ApsaraDB RDS for MySQL. |
Nenhuma. |
Sintaxe de SynDbTables
"SynDbTables": [
{
"Schema": String,
"Tables": List
}
]
Propriedades de SynDbTables
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
Schema |
String |
Sim |
Não |
Nome do banco de dados. |
Nenhuma. |
|
Tables |
List |
Sim |
Não |
Detalhes das tabelas. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
SynDbs: os dados sincronizados.
DbClusterId: o ID do cluster ApsaraDB for ClickHouse.
RdsId: o ID da instância ApsaraDB RDS for MySQL.
Exemplos
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CkPassword:
Description: The password of the database account
Type: String
CkUserName:
Description: The account of the clickhouse database.
Type: String
ClickhousePort:
Description: The port of clickhouse id.
Type: Number
DbClusterId:
Description: Clickhouse cluster id.
Type: String
LimitUpper:
Description: The maximum number of rows to sync per second.
Type: Number
RdsId:
Description: The instance id of RDS.
Type: String
RdsPassword:
Description: The password of the RDS database account.
Type: String
RdsPort:
Description: The port of rds.
Type: Number
RdsUserName:
Description: The account of the RDS database.
Type: String
RdsVpcId:
Description: The vpc of rds.
Type: String
RdsVpcUrl:
Description: Intranet address of ApsaraDB for RDS.
Type: String
SkipUnsupported:
Description: Skip unsupported table or not.
Type: Boolean
SynDbTables:
Description: The tables to syn.
MaxLength: 10
Type: Json
Resources:
SynDb:
Properties:
CkPassword:
Ref: CkPassword
CkUserName:
Ref: CkUserName
ClickhousePort:
Ref: ClickhousePort
DbClusterId:
Ref: DbClusterId
LimitUpper:
Ref: LimitUpper
RdsId:
Ref: RdsId
RdsPassword:
Ref: RdsPassword
RdsPort:
Ref: RdsPort
RdsUserName:
Ref: RdsUserName
RdsVpcId:
Ref: RdsVpcId
RdsVpcUrl:
Ref: RdsVpcUrl
SkipUnsupported:
Ref: SkipUnsupported
SynDbTables:
Ref: SynDbTables
Type: ALIYUN::ClickHouse::SynDb
Outputs:
DbClusterId:
Description: The id of clickhouse.
Value:
Fn::GetAtt:
- SynDb
- DbClusterId
RdsId:
Description: The id of RDS
Value:
Fn::GetAtt:
- SynDb
- RdsId
SynDbs:
Description: Sync Dbs
Value:
Fn::GetAtt:
- SynDb
- SynDbs
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"RdsVpcUrl": {
"Type": "String",
"Description": "Intranet address of ApsaraDB for RDS."
},
"LimitUpper": {
"Type": "Number",
"Description": "The maximum number of rows to sync per second."
},
"SkipUnsupported": {
"Type": "Boolean",
"Description": "Skip unsupported table or not."
},
"RdsId": {
"Type": "String",
"Description": "The instance id of RDS."
},
"RdsPassword": {
"Type": "String",
"Description": "The password of the RDS database account."
},
"RdsUserName": {
"Type": "String",
"Description": "The account of the RDS database."
},
"CkPassword": {
"Type": "String",
"Description": "The password of the database account"
},
"CkUserName": {
"Type": "String",
"Description": "The account of the clickhouse database."
},
"ClickhousePort": {
"Type": "Number",
"Description": "The port of clickhouse id."
},
"SynDbTables": {
"Type": "Json",
"Description": "The tables to syn.",
"MaxLength": 10
},
"DbClusterId": {
"Type": "String",
"Description": "Clickhouse cluster id."
},
"RdsPort": {
"Type": "Number",
"Description": "The port of rds."
},
"RdsVpcId": {
"Type": "String",
"Description": "The vpc of rds."
}
},
"Resources": {
"SynDb": {
"Type": "ALIYUN::ClickHouse::SynDb",
"Properties": {
"RdsVpcUrl": {
"Ref": "RdsVpcUrl"
},
"LimitUpper": {
"Ref": "LimitUpper"
},
"SkipUnsupported": {
"Ref": "SkipUnsupported"
},
"RdsId": {
"Ref": "RdsId"
},
"RdsPassword": {
"Ref": "RdsPassword"
},
"RdsUserName": {
"Ref": "RdsUserName"
},
"CkPassword": {
"Ref": "CkPassword"
},
"CkUserName": {
"Ref": "CkUserName"
},
"ClickhousePort": {
"Ref": "ClickhousePort"
},
"SynDbTables": {
"Ref": "SynDbTables"
},
"DbClusterId": {
"Ref": "DbClusterId"
},
"RdsPort": {
"Ref": "RdsPort"
},
"RdsVpcId": {
"Ref": "RdsVpcId"
}
}
}
},
"Outputs": {
"SynDbs": {
"Description": "Sync Dbs",
"Value": {
"Fn::GetAtt": [
"SynDb",
"SynDbs"
]
}
},
"DbClusterId": {
"Description": "The id of clickhouse.",
"Value": {
"Fn::GetAtt": [
"SynDb",
"DbClusterId"
]
}
},
"RdsId": {
"Description": "The id of RDS",
"Value": {
"Fn::GetAtt": [
"SynDb",
"RdsId"
]
}
}
}
}