ALIYUN::ADB::Account is used to create a database account for an AnalyticDB for MySQL cluster.
Syntax
{
"Type": "ALIYUN::ADB::Account",
"Properties": {
"AccountDescription": String,
"DBClusterId": String,
"AccountType": String,
"AccountPassword": String,
"AccountName": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
AccountName | String | Yes | No | The username of the database account. | None. |
AccountPassword | String | Yes | Yes | The password of the database account. | The following limits apply:
|
DBClusterId | String | Yes | No | The ID of the AnalyticDB for MySQL cluster. | None. |
AccountDescription | String | No | No | The description of the database account. | The following limits apply:
|
AccountType | String | No | No | The type of the database account. | Valid values:
|
Return values
Fn::GetAtt
DBClusterId: the ID of the AnalyticDB for MySQL cluster.
AccountType: the type of the database account.
AccountName: the username of the database account.
Examples
YAML format
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
format
{
"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"
]
}
}
}
}