ALIYUN::DMS::Instance2 is used to register a database instance in new Data Management (DMS).
Syntax
{
"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
}
}Properties
Property | Type | Required | Editable | Description | Constraint |
DatabasePassword | String | Yes | Yes | The password of the database account. | None. |
DbaId | Integer | Yes | Yes | The ID of the user who assumes the database administrator (DBA) role of the database instance. | None. |
DatabaseUser | String | Yes | Yes | The database account. | None. |
ExportTimeout | Integer | Yes | Yes | The timeout period for exporting data. | Unit: seconds. |
EnvType | String | Yes | Yes | The type of the environment. | Valid values:
|
EnableSellTrust | String | Yes | Yes | Specifies whether to enable the security hosting feature for the database instance. | Valid values:
|
Host | String | Yes | Yes | The endpoint of the database. | None. |
InstanceAlias | String | Yes | Yes | The alias of the database instance. | None. |
InstanceType | String | Yes | Yes | The type of the database engine. | None. |
InstanceSource | String | Yes | Yes | The source of the database instance. | Valid values:
|
NetworkType | String | Yes | Yes | The type of the network. | Valid values:
|
Port | Integer | Yes | Yes | The port of the database instance. | None. |
QueryTimeout | Integer | Yes | Yes | The timeout period for querying data. | Unit: seconds. |
SafeRule | String | Yes | Yes | The security rule set that you want to configure for the database instance. The name of the security rule set is specified by GroupName. | None. |
DataLinkName | String | No | Yes | The name of the database link for cross-database queries. | Note
|
DdlOnline | Integer | No | Yes | Specifies whether to enable the lock-free schema change feature. | Valid values:
Note
|
EcsRegion | String | No | Yes | The region of the database instance. | Note This property must be specified when InstanceSource is set to RDS, ECS_OWN, GATEWAY, or VPC_IDC. |
EnableSellSitd | String | No | Yes | Specifies whether to enable the sensitive data protection feature for the database instance. | Valid values:
|
EnableSellStable | String | No | Yes | Specifies whether to enable the Stable Change feature for the database instance. | Valid values:
|
EnableSellCommon | String | No | Yes | Specifies whether to enable the Security Collaboration feature for the database instance. | Note
|
EcsInstanceId | String | No | Yes | The ID of the ECS instance. | If your instance is a database instance connected by using a database gateway, specify the gateway ID as the value of this property. Note This property must be specified when InstanceSource is set to ECS_OWN or GATEWAY. |
SkipTest | Boolean | No | Yes | Specifies whether to skip the connectivity test for the database instance. | Valid values:
|
Sid | String | No | Yes | The system ID (SID) of the database instance. | Note This property must be specified when InstanceType is set to ORACLE. |
TemplateId | Integer | No | Yes | The ID of the classification and grading template. | None. |
TemplateType | String | No | Yes | The type of the classification and grading template. | None. |
Tid | Integer | No | Yes | The ID of the tenant. | None. |
UseSsl | Integer | No | Yes | Specifies whether to enable the SSL connection feature for the database instance. | If you enable the feature for the database instance, DMS can connect to the database by using SSL. This property is available only when the SSL connection feature is already enabled for the database. Valid values:
Note Take note of the following information:
|
UseDsql | Integer | No | Yes | Specifies whether to enable the cross-database query feature. | Valid values:
Note The following types of databases are supported: MySQL, SQL Server, PostgreSQL, PolarDB for Oracle, and Redis databases. |
VpcId | String | No | Yes | The ID of the VPC. | Note This property must be specified when InstanceSource is set to VPC_IDC. |
Return values
Fn::GetAtt
InstanceId: the ID of the database instance.
Port: the port of the database instance.
Host: the endpoint of the database instance.
Examples
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"
]
}
}
}
}