ALIYUN::RDS::DBProxy类型用于开启RDS实例的数据库代理实例功能。
语法
{
"Type": "ALIYUN::RDS::DBProxy",
"Properties": {
"DBInstanceId": String,
"VPCId": String,
"VSwitchId": String,
"DBProxyInstanceNum": Integer,
"DBProxyNodes": List,
"DBProxyInstanceType": String,
"PersistentConnectionStatus": String,
"ResourceGroupId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DBInstanceId | String | 是 | 否 | 数据库实例 ID。 | 无 |
VPCId | String | 是 | 否 | 实例所属 VPC ID。 | 无 |
VSwitchId | String | 是 | 否 | 实例所属虚拟交换机 ID。 | RDS MySQL 云盘版或 RDS PostgreSQL 开启数据库代理时,该参数必选。 |
DBProxyInstanceNum | Integer | 否 | 否 | 开通代理实例数量。 | 取值:1~16。默认值:1。 |
DBProxyNodes | List | 否 | 否 | 代理节点列表。 | 更多信息,请参见DBProxyNodes属性。 |
DBProxyInstanceType | String | 否 | 否 | 数据库代理实例类型。 | 取值:
|
PersistentConnectionStatus | String | 否 | 否 | 是否开启连接保持。 | 取值:
|
ResourceGroupId | String | 否 | 否 | 资源组 ID。 | 无 |
DBProxyNodes语法
"DBProxyNodes": [
{
"ZoneId": String,
"CpuCores": Integer,
"NodeCounts": Integer
}
]
DBProxyNodes属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
CpuCores | Integer | 是 | 否 | 节点 CPU 核数。 | 取值 1~16。 |
NodeCounts | Integer | 是 | 否 | 可用区中代理节点数量。 | 取值 1~2。 |
ZoneId | String | 是 | 否 | 节点所在的可用区 ID。 | 无 |
返回值
Fn::GetAtt
无
示例
YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DBInstanceId:
Type: String
AssociationProperty: ALIYUN::RDS::Instance::InstanceId
Description:
en: Instance ID of the DB. DescribeDBInstances can be called to get it.
Required: true
VPCId:
Type: String
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Description:
en: The VPC ID to which the instance belongs.
Required: true
VSwitchId:
AssociationPropertyMetadata:
VpcId: ${VpcId}
ZoneId: ${ZoneId}
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
Type: String
Description:
en: The virtual switch ID to which the instance belongs.
Required: true
Resources:
DBProxy:
Type: ALIYUN::RDS::DBProxy
Properties:
DBInstanceId:
Ref: DBInstanceId
VPCId:
Ref: VPCId
VSwitchId:
Ref: VSwitchId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DBInstanceId": {
"Type": "String",
"AssociationProperty": "ALIYUN::RDS::Instance::InstanceId",
"Description": {
"en": "Instance ID of the DB. DescribeDBInstances can be called to get it."
},
"Required": true
},
"VPCId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Description": {
"en": "The VPC ID to which the instance belongs."
},
"Required": true
},
"VSwitchId": {
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}",
"ZoneId": "${ZoneId}"
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"Type": "String",
"Description": {
"en": "The virtual switch ID to which the instance belongs."
},
"Required": true
}
},
"Resources": {
"DBProxy": {
"Type": "ALIYUN::RDS::DBProxy",
"Properties": {
"DBInstanceId": {
"Ref": "DBInstanceId"
},
"VPCId": {
"Ref": "VPCId"
},
"VSwitchId": {
"Ref": "VSwitchId"
}
}
}
}
}
该文章对您有帮助吗?
- 本页导读 (1)
- 语法
- 属性
- DBProxyNodes语法
- DBProxyNodes属性
- 返回值
- 示例