ALIYUN::SLS::RdsExternalStore类型用于创建RDS外部存储。
语法
{
"Type": "ALIYUN::SLS::RdsExternalStore",
"Properties": {
"Db": String,
"ExternalStoreName": String,
"Host": String,
"Project": String,
"Port": Integer,
"Password": String,
"Region": String,
"StoreType": String,
"Table": String,
"Username": String,
"VpcId": String,
"InstanceId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Db | String | 是 | 是 | RDS MySQL 实例的数据库名称。 | 无 |
ExternalStoreName | String | 是 | 否 | 外部存储名称。 | 无 |
Host | String | 是 | 是 | RDS MySQL 实例的内网地址或外网地址。 | 无 |
Project | String | 是 | 否 | Project 名称。 | 无 |
Port | Integer | 是 | 是 | RDS MySQL 实例的内网或者外网端口。 | 无 |
Password | String | 是 | 是 | RDS MySQL 实例中账号对应的密码。 | 无 |
Region | String | 是 | 是 | RDS MySQL 实例所在地域 | 当前支持:
|
StoreType | String | 是 | 否 | 存储类型。 | 固定取值为 rds-vpc,表示 VPC 下的 RDS MySQL 数据库。 |
Table | String | 是 | 是 | RDS MySQL 实例的数据库表名称。 | 无 |
Username | String | 是 | 是 | RDS MySQL 实例中的账号名称。 | 无 |
VpcId | String | 是 | 是 | RDS MySQL 实例所属的 VPC ID。 | 无 |
InstanceId | String | 否 | 是 | RDS实例ID。 | 无 |
返回值
Fn::GetAtt
Project:Project 名称。
ExternalStoreName:外部存储名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
StoreType:
Type: String
Description:
en: The storage type. Set the value to rds-vpc, which indicates an ApsaraDB RDS for MySQL database in a virtual private cloud (VPC).
AllowedValues:
- rds-vpc
Required: true
Project:
Type: String
Description:
en: The name of the project.
Required: true
Table:
Type: String
Description:
en: The name of the database table in the ApsaraDB RDS for MySQL instance.
Required: true
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
en: The ID of the VPC to which the ApsaraDB RDS for MySQL instance belongs.
Required: true
Username:
Type: String
Description:
en: The username that is used to log on to the ApsaraDB RDS for MySQL instance.
Required: true
Port:
Type: Number
Description:
en: The internal or public port of the ApsaraDB RDS for MySQL instance.
Required: true
Region:
Type: String
Description:
en: 'The region where the ApsaraDB RDS for MySQL instance resides. Valid values: cn-qingdao, cn-beijing, and cn-hangzhou.'
AllowedValues:
- cn-qingdao
- cn-beijing
- cn-hangzhou
Required: true
Host:
Type: String
Description:
en: The internal or public endpoint of the ApsaraDB RDS for MySQL instance.
Required: true
ExternalStoreName:
Type: String
Description:
en: The name of the external store. The name must be unique in a project and different from Logstore.
Required: true
Db:
Type: String
Description:
en: The name of the database in the ApsaraDB RDS for MySQL instance.
Required: true
Password:
Type: String
Description:
en: The password that is used to log on to the ApsaraDB RDS for MySQL instance.
Required: true
Resources:
RdsExternalStore:
Type: ALIYUN::SLS::RdsExternalStore
Properties:
StoreType:
Ref: StoreType
Project:
Ref: Project
Table:
Ref: Table
VpcId:
Ref: VpcId
Username:
Ref: Username
Port:
Ref: Port
Region:
Ref: Region
Host:
Ref: Host
ExternalStoreName:
Ref: ExternalStoreName
Db:
Ref: Db
Password:
Ref: Password
Outputs:
Project:
Description: The name of the project to which the external store belongs.
Value:
Fn::GetAtt:
- RdsExternalStore
- Project
ExternalStoreName:
Description: The name of the external store.
Value:
Fn::GetAtt:
- RdsExternalStore
- ExternalStoreName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"StoreType": {
"Type": "String",
"Description": {
"en": "The storage type. Set the value to rds-vpc, which indicates an ApsaraDB RDS for MySQL database in a virtual private cloud (VPC)."
},
"AllowedValues": [
"rds-vpc"
],
"Required": true
},
"Project": {
"Type": "String",
"Description": {
"en": "The name of the project."
},
"Required": true
},
"Table": {
"Type": "String",
"Description": {
"en": "The name of the database table in the ApsaraDB RDS for MySQL instance."
},
"Required": true
},
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"en": "The ID of the VPC to which the ApsaraDB RDS for MySQL instance belongs."
},
"Required": true
},
"Username": {
"Type": "String",
"Description": {
"en": "The username that is used to log on to the ApsaraDB RDS for MySQL instance."
},
"Required": true
},
"Port": {
"Type": "Number",
"Description": {
"en": "The internal or public port of the ApsaraDB RDS for MySQL instance."
},
"Required": true
},
"Region": {
"Type": "String",
"Description": {
"en": "The region where the ApsaraDB RDS for MySQL instance resides. Valid values: cn-qingdao, cn-beijing, and cn-hangzhou."
},
"AllowedValues": [
"cn-qingdao",
"cn-beijing",
"cn-hangzhou"
],
"Required": true
},
"Host": {
"Type": "String",
"Description": {
"en": "The internal or public endpoint of the ApsaraDB RDS for MySQL instance."
},
"Required": true
},
"ExternalStoreName": {
"Type": "String",
"Description": {
"en": "The name of the external store. The name must be unique in a project and different from Logstore."
},
"Required": true
},
"Db": {
"Type": "String",
"Description": {
"en": "The name of the database in the ApsaraDB RDS for MySQL instance."
},
"Required": true
},
"Password": {
"Type": "String",
"Description": {
"en": "The password that is used to log on to the ApsaraDB RDS for MySQL instance."
},
"Required": true
}
},
"Resources": {
"RdsExternalStore": {
"Type": "ALIYUN::SLS::RdsExternalStore",
"Properties": {
"StoreType": {
"Ref": "StoreType"
},
"Project": {
"Ref": "Project"
},
"Table": {
"Ref": "Table"
},
"VpcId": {
"Ref": "VpcId"
},
"Username": {
"Ref": "Username"
},
"Port": {
"Ref": "Port"
},
"Region": {
"Ref": "Region"
},
"Host": {
"Ref": "Host"
},
"ExternalStoreName": {
"Ref": "ExternalStoreName"
},
"Db": {
"Ref": "Db"
},
"Password": {
"Ref": "Password"
}
}
}
},
"Outputs": {
"Project": {
"Description": "The name of the project to which the external store belongs.",
"Value": {
"Fn::GetAtt": [
"RdsExternalStore",
"Project"
]
}
},
"ExternalStoreName": {
"Description": "The name of the external store.",
"Value": {
"Fn::GetAtt": [
"RdsExternalStore",
"ExternalStoreName"
]
}
}
}
}
文档内容是否对您有帮助?