Registra uma instância de banco de dados no novo Data Management (DMS).
Sintaxe
{
"Type": "ALIYUN::DMS::Instance2",
"Properties": {
"DatabasePassword": String,
"DbaId": Integer,
"DatabaseUser": String,
"ExportTimeout": Integer,
"EnvType": String,
"EnableSellTrust": String,
"Host": String,
"InstanceAlias": String,
"InstanceType": String,
"InstanceSource": String,
"NetworkType": String,
"Port": Integer,
"QueryTimeout": Integer,
"SafeRule": String,
"DataLinkName": String,
"DdlOnline": Integer,
"EcsRegion": String,
"EnableSellSitd": String,
"EnableSellStable": String,
"EnableSellCommon": String,
"EcsInstanceId": String,
"SkipTest": Boolean,
"Sid": String,
"TemplateId": Integer,
"TemplateType": String,
"Tid": Integer,
"UseSsl": Integer,
"UseDsql": Integer,
"VpcId": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
DatabasePassword |
String |
Sim |
Sim |
Senha da conta do banco de dados. |
Nenhuma. |
|
DbaId |
Integer |
Sim |
Sim |
ID de usuário do administrador de banco de dados (DBA) da instância. |
Nenhuma. |
|
DatabaseUser |
String |
Sim |
Sim |
Conta do banco de dados. |
Nenhuma. |
|
ExportTimeout |
Integer |
Sim |
Sim |
Tempo limite para exportação de dados. |
Unidade: segundos. |
|
EnvType |
String |
Sim |
Sim |
Tipo de ambiente. |
Valores válidos:
|
|
EnableSellTrust |
String |
Sim |
Sim |
Indica se a hospedagem segura está ativada para a instância de banco de dados. |
Valores válidos:
|
|
Host |
String |
Sim |
Sim |
Endpoint do banco de dados. |
Nenhuma. |
|
InstanceAlias |
String |
Sim |
Sim |
Alias da instância de banco de dados. |
Nenhuma. |
|
InstanceType |
String |
Sim |
Sim |
Tipo de mecanismo do banco de dados. |
Nenhuma. |
|
InstanceSource |
String |
Sim |
Sim |
Origem da instância de banco de dados. |
Valores válidos:
|
|
NetworkType |
String |
Sim |
Sim |
Tipo de rede. |
Valores válidos:
|
|
Port |
Integer |
Sim |
Sim |
Porta de conexão da instância de banco de dados. |
Nenhuma. |
|
QueryTimeout |
Integer |
Sim |
Sim |
Tempo limite para consulta de dados. |
Unidade: segundos. |
|
SafeRule |
String |
Sim |
Sim |
Conjunto de regras de segurança da instância de banco de dados, especificado por GroupName. |
Nenhuma. |
|
DataLinkName |
String |
Não |
Sim |
Nome do link de banco de dados para consultas entre bancos de dados. |
Nota
|
|
DdlOnline |
Integer |
Não |
Sim |
Indica se a alteração de esquema sem bloqueio está ativada. |
Valores válidos:
Nota
|
|
EcsRegion |
String |
Não |
Sim |
Região da instância de banco de dados. |
Nota
Especifique esta propriedade quando InstanceSource estiver definido como RDS, ECS_OWN, GATEWAY ou VPC_IDC. |
|
EnableSellSitd |
String |
Não |
Sim |
Indica se a proteção de dados sensíveis está ativada para a instância de banco de dados. |
Valores válidos:
|
|
EnableSellStable |
String |
Não |
Sim |
Indica se o recurso Stable Change está ativado para a instância de banco de dados. |
Valores válidos:
|
|
EnableSellCommon |
String |
Não |
Sim |
Indica se o recurso Security Collaboration está ativado para a instância de banco de dados. |
Nota
|
|
EcsInstanceId |
String |
Não |
Sim |
ID da instância ECS. |
Para uma instância de banco de dados conectada por meio de um gateway de banco de dados, especifique o ID do gateway. Nota
Especifique esta propriedade quando InstanceSource estiver definido como ECS_OWN ou GATEWAY. |
|
SkipTest |
Boolean |
Não |
Sim |
Indica se o teste de conectividade da instância de banco de dados será ignorado. |
Valores válidos:
|
|
Sid |
String |
Não |
Sim |
ID do sistema (SID) da instância de banco de dados. |
Nota
Especifique esta propriedade quando InstanceType estiver definido como ORACLE. |
|
TemplateId |
Integer |
Não |
Sim |
ID do modelo de classificação e graduação. |
Nenhuma. |
|
TemplateType |
String |
Não |
Sim |
Tipo do modelo de classificação e graduação. |
Nenhuma. |
|
Tid |
Integer |
Não |
Sim |
ID do locatário. |
Nenhuma. |
|
UseSsl |
Integer |
Não |
Sim |
Indica se as conexões SSL estão ativadas para a instância de banco de dados. |
Disponível apenas quando o SSL já estiver ativado para o banco de dados. Valores válidos:
Nota
Observe as seguintes informações:
|
|
UseDsql |
Integer |
Não |
Sim |
Indica se a consulta entre bancos de dados está ativada. |
Valores válidos:
Nota
Tipos de banco de dados compatíveis: MySQL, SQL Server, PostgreSQL, PolarDB for Oracle e Redis. |
|
VpcId |
String |
Não |
Sim |
ID da VPC. |
Nota
Especifique esta propriedade quando InstanceSource estiver definido como VPC_IDC. |
Valores de retorno
Fn::GetAtt
InstanceId: ID da instância de banco de dados.
Port: porta da instância de banco de dados.
Host: endpoint da instância de banco de dados.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DatabasePassword:
Type: String
Description:
en: The logon password of the database instance.
Required: true
Port:
Type: Number
Description:
en: The connection port of the database instance.
Required: true
SafeRule:
Type: String
Description:
en: |-
The security rule of the database instance. Enter the name of the security rule for
your enterprise.
Note To query a specified security rule, log on to the DMS Enterprise console and choose
System Management > Security Rules. The security rule appears in the security rule
list.
Required: true
ExportTimeout:
Type: Number
Description:
en: 'The timeout period for exporting the database instance. Unit: seconds.'
Required: true
EnvType:
Type: String
Description:
en: |-
The type of the environment to which the database instance belongs. Valid values:
product: the production environment.
dev: the test environment.
Required: true
DbaId:
Type: Number
Description:
en: The user ID of the instance DBA role. You can call the ListUsers or GetInstance operation to obtain the value of this parameter.
Required: true
InstanceAlias:
Type: String
Description:
en: |-
The alias of the database instance. The alias helps you quickly find the required
instance.
Required: true
NetworkType:
Type: String
Description:
en: |-
The network type of the database instance. Valid values:
CLASSIC
VPC
AllowedValues:
- CLASSIC
- VPC
Required: true
EnableSellTrust:
Type: String
Description:
en: |-
Whether the instance needs to enable secure hosting.
- Y: Enable secure hosting mode.
- NULL or other: Do not enable secure hosting mode.
Required: true
InstanceType:
Type: String
Description:
en: 'The type of the database instance. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis'
Required: true
QueryTimeout:
Type: Number
Description:
en: 'The timeout period for querying the database instance. Unit: seconds.'
Required: true
InstanceSource:
Type: String
Description:
en: |-
The source of the database instance. Valid values:
PUBLIC_OWN: an on-premises database built on the public network.
RDS: an ApsaraDB for RDS (RDS) instance.
ECS_OWN: an on-premises database built on an Elastic Compute Service (ECS) instance.
VPC_IDC: an on-premises database built in an Internet data center (IDC) in Virtual Private
Cloud (VPC).
Required: true
Host:
Type: String
Description:
en: The endpoint of the database instance.
Required: true
DatabaseUser:
Type: String
Description:
en: The logon username of the database instance.
Required: true
Resources:
Instance2:
Type: ALIYUN::DMS::Instance2
Properties:
DatabasePassword:
Ref: DatabasePassword
Port:
Ref: Port
SafeRule:
Ref: SafeRule
ExportTimeout:
Ref: ExportTimeout
EnvType:
Ref: EnvType
DbaId:
Ref: DbaId
InstanceAlias:
Ref: InstanceAlias
NetworkType:
Ref: NetworkType
EnableSellTrust:
Ref: EnableSellTrust
InstanceType:
Ref: InstanceType
QueryTimeout:
Ref: QueryTimeout
InstanceSource:
Ref: InstanceSource
Host:
Ref: Host
DatabaseUser:
Ref: DatabaseUser
Outputs:
InstanceId:
Description: The ID of the database instance.
Value:
Fn::GetAtt:
- Instance2
- InstanceId
Port:
Description: The connection port of the database instance.
Value:
Fn::GetAtt:
- Instance2
- Port
Host:
Description: The endpoint of the database instance.
Value:
Fn::GetAtt:
- Instance2
- Host
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DatabasePassword": {
"Type": "String",
"Description": {
"en": "The logon password of the database instance."
},
"Required": true
},
"Port": {
"Type": "Number",
"Description": {
"en": "The connection port of the database instance."
},
"Required": true
},
"SafeRule": {
"Type": "String",
"Description": {
"en": "The security rule of the database instance. Enter the name of the security rule for\nyour enterprise.\nNote To query a specified security rule, log on to the DMS Enterprise console and choose\nSystem Management > Security Rules. The security rule appears in the security rule\nlist."
},
"Required": true
},
"ExportTimeout": {
"Type": "Number",
"Description": {
"en": "The timeout period for exporting the database instance. Unit: seconds."
},
"Required": true
},
"EnvType": {
"Type": "String",
"Description": {
"en": "The type of the environment to which the database instance belongs. Valid values:\nproduct: the production environment.\ndev: the test environment."
},
"Required": true
},
"DbaId": {
"Type": "Number",
"Description": {
"en": "The user ID of the instance DBA role. You can call the ListUsers or GetInstance operation to obtain the value of this parameter."
},
"Required": true
},
"InstanceAlias": {
"Type": "String",
"Description": {
"en": "The alias of the database instance. The alias helps you quickly find the required\ninstance."
},
"Required": true
},
"NetworkType": {
"Type": "String",
"Description": {
"en": "The network type of the database instance. Valid values:\nCLASSIC\nVPC"
},
"AllowedValues": [
"CLASSIC",
"VPC"
],
"Required": true
},
"EnableSellTrust": {
"Type": "String",
"Description": {
"en": "Whether the instance needs to enable secure hosting.\n- Y: Enable secure hosting mode.\n- NULL or other: Do not enable secure hosting mode."
},
"Required": true
},
"InstanceType": {
"Type": "String",
"Description": {
"en": "The type of the database instance. Valid values: MySQL, SQLServer, PostgreSQL, Oracle, DRDS, OceanBase, Mongo, Redis"
},
"Required": true
},
"QueryTimeout": {
"Type": "Number",
"Description": {
"en": "The timeout period for querying the database instance. Unit: seconds."
},
"Required": true
},
"InstanceSource": {
"Type": "String",
"Description": {
"en": "The source of the database instance. Valid values:\nPUBLIC_OWN: an on-premises database built on the public network.\nRDS: an ApsaraDB for RDS (RDS) instance.\nECS_OWN: an on-premises database built on an Elastic Compute Service (ECS) instance.\nVPC_IDC: an on-premises database built in an Internet data center (IDC) in Virtual Private\nCloud (VPC)."
},
"Required": true
},
"Host": {
"Type": "String",
"Description": {
"en": "The endpoint of the database instance."
},
"Required": true
},
"DatabaseUser": {
"Type": "String",
"Description": {
"en": "The logon username of the database instance."
},
"Required": true
}
},
"Resources": {
"Instance2": {
"Type": "ALIYUN::DMS::Instance2",
"Properties": {
"DatabasePassword": {
"Ref": "DatabasePassword"
},
"Port": {
"Ref": "Port"
},
"SafeRule": {
"Ref": "SafeRule"
},
"ExportTimeout": {
"Ref": "ExportTimeout"
},
"EnvType": {
"Ref": "EnvType"
},
"DbaId": {
"Ref": "DbaId"
},
"InstanceAlias": {
"Ref": "InstanceAlias"
},
"NetworkType": {
"Ref": "NetworkType"
},
"EnableSellTrust": {
"Ref": "EnableSellTrust"
},
"InstanceType": {
"Ref": "InstanceType"
},
"QueryTimeout": {
"Ref": "QueryTimeout"
},
"InstanceSource": {
"Ref": "InstanceSource"
},
"Host": {
"Ref": "Host"
},
"DatabaseUser": {
"Ref": "DatabaseUser"
}
}
}
},
"Outputs": {
"InstanceId": {
"Description": "The ID of the database instance.",
"Value": {
"Fn::GetAtt": [
"Instance2",
"InstanceId"
]
}
},
"Port": {
"Description": "The connection port of the database instance.",
"Value": {
"Fn::GetAtt": [
"Instance2",
"Port"
]
}
},
"Host": {
"Description": "The endpoint of the database instance.",
"Value": {
"Fn::GetAtt": [
"Instance2",
"Host"
]
}
}
}
}