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"
]
}
}
}
}