ALIYUN::DMS::Instance2类型用于新版DMS录入数据库实例。
语法
{
"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
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DatabasePassword | String | 是 | 是 | 数据库密码。 | 无 |
DbaId | Integer | 是 | 是 | 实例DBA角色的用户ID。 | 无 |
DatabaseUser | String | 是 | 是 | 数据库账号。 | 无 |
ExportTimeout | Integer | 是 | 是 | 导出超时时间。 | 单位:s(秒)。 |
EnvType | String | 是 | 是 | 环境类型。 | 取值如下:
|
EnableSellTrust | String | 是 | 是 | 实例是否需要开启安全托管。 | 取值:
|
Host | String | 是 | 是 | 数据库连接地址。 | 无 |
InstanceAlias | String | 是 | 是 | 实例别名。 | 无 |
InstanceType | String | 是 | 是 | 数据库类型。 | 无 |
InstanceSource | String | 是 | 是 | 实例来源。 | 取值如下:
|
NetworkType | String | 是 | 是 | 网络类型。 | 取值如下:
|
Port | Integer | 是 | 是 | 数据库连接端口。 | 无 |
QueryTimeout | Integer | 是 | 是 | 查询超时时间。 | 单位:s(秒)。 |
SafeRule | String | 是 | 是 | 为该实例设置安全规则集(GroupName)。 | 无 |
DataLinkName | String | 否 | 是 | 输入跨库查询 datalink名称。 |
|
DdlOnline | Integer | 否 | 是 | 是否开启DMS结构变更优先, | 取值如下:
|
EcsRegion | String | 否 | 是 | 实例所在地域。 | 如果 InstanceSource取值为 RDS、ECS_OWN、GATEWAY或 VPC_IDC,此值必填。 |
EnableSellSitd | String | 否 | 是 | 是否需要为该实例开启敏感数据保护功能。 | 取值:
|
EnableSellStable | String | 否 | 是 | 实例是否需要开通稳定变更功能。 | 取值:
|
EnableSellCommon | String | 否 | 是 | 实例是否需要开通安全协同功能。 |
|
EcsInstanceId | String | 否 | 是 | ECS实例ID。 | 例如您的实例是数据库网关实例,则此处需要填写网关 ID。 如果 InstanceSource取值为 ECS_OWN或 GATEWAY,此值必填。 |
SkipTest | Boolean | 否 | 是 | 实例是否忽略测试连通性。 | 取值如下:
|
Sid | String | 否 | 是 | 实例Sid。 | 如果 InstanceType 为 ORACLE,此项必填。 |
TemplateId | Integer | 否 | 是 | 分类分级模板 ID。 | 无 |
TemplateType | String | 否 | 是 | 分类分级模板类型。 | 无 |
Tid | Integer | 否 | 是 | 租户ID。 | 无 |
UseSsl | Integer | 否 | 是 | 选择是否开启 SSL连接。 | 开启后,DMS 将通过SSL连接到数据库。使用该参数的前提是数据库已开启SSL连接,当前支持如下选项:
说明
|
UseDsql | Integer | 否 | 是 | 是否启用跨实例查询。 | 取值如下:
支持的数据库类型:MySQL、SQL Server、PostgreSQL、PolarDB O 引擎、Redis。 |
VpcId | String | 否 | 是 | 专有网络VPC 的实例ID。 | 如果 InstanceSource 取值为 VPC_IDC 时,此值必填。 |
返回值
Fn::GetAtt
InstanceId:实例ID。
Port:实例连接端口。
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
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"
]
}
}
}
}
- 本页导读 (1)
- 语法
- 属性
- 返回值
- 示例