ALIYUN::ADB::Account类型用于创建数据库集群账号。
语法
{
"Type": "ALIYUN::ADB::Account",
"Properties": {
"AccountDescription": String,
"DBClusterId": String,
"AccountType": String,
"AccountPassword": String,
"AccountName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
AccountName | String | 是 | 否 | 数据库账号名称。 | 无 |
AccountPassword | String | 是 | 是 | 数据库账号名称的密码。 | 限制:
|
DBClusterId | String | 是 | 否 | 数据库实例ID。 | 无 |
AccountDescription | String | 否 | 否 | 数据库账号描述。 | 限制:
|
AccountType | String | 否 | 否 | 数据库账号类型。 | 取值:
|
返回值
Fn::GetAtt
DBClusterId:数据库集群ID。
AccountType:数据库集群账号类型。
AccountName:数据库集群账号名称。
示例
YAML格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DBClusterId:
Type: String
Description: The ID of the cluster.
AccountPassword:
Type: String
Description: |-
The password of the account.
The password must contain uppercase letters, lowercase letters, digits, and special
characters.
Special characters include ! @ # $ % ^ * () _ + - and =
The password must be 8 to 32 characters in length.
AccountName:
Type: String
Description: The name of the account.
Resources:
Account:
Type: ALIYUN::ADB::Account
Properties:
DBClusterId:
Ref: DBClusterId
AccountPassword:
Ref: AccountPassword
AccountName:
Ref: AccountName
Outputs:
DBClusterId:
Description: The ID of the cluster.
Value:
Fn::GetAtt:
- Account
- DBClusterId
AccountType:
Description: The type of the account.
Value:
Fn::GetAtt:
- Account
- AccountType
AccountName:
Description: The name of the account.
Value:
Fn::GetAtt:
- Account
- AccountName
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DBClusterId": {
"Type": "String",
"Description": "The ID of the cluster."
},
"AccountPassword": {
"Type": "String",
"Description": "The password of the account.\nThe password must contain uppercase letters, lowercase letters, digits, and special\ncharacters.\nSpecial characters include ! @ # $ % ^ * () _ + - and =\nThe password must be 8 to 32 characters in length."
},
"AccountName": {
"Type": "String",
"Description": "The name of the account."
}
},
"Resources": {
"Account": {
"Type": "ALIYUN::ADB::Account",
"Properties": {
"DBClusterId": {
"Ref": "DBClusterId"
},
"AccountPassword": {
"Ref": "AccountPassword"
},
"AccountName": {
"Ref": "AccountName"
}
}
}
},
"Outputs": {
"DBClusterId": {
"Description": "The ID of the cluster.",
"Value": {
"Fn::GetAtt": [
"Account",
"DBClusterId"
]
}
},
"AccountType": {
"Description": "The type of the account.",
"Value": {
"Fn::GetAtt": [
"Account",
"AccountType"
]
}
},
"AccountName": {
"Description": "The name of the account.",
"Value": {
"Fn::GetAtt": [
"Account",
"AccountName"
]
}
}
}
}