ALIYUN::GPDB::Account类型用于创建数据库实例账号。
语法
{
"Type": "ALIYUN::GPDB::Account",
"Properties": {
"AccountDescription": String,
"DBInstanceId": String,
"AccountPassword": String,
"AccountName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
AccountDescription | String | 否 | 否 | 数据库账号描述。 | 无 |
DBInstanceId | String | 是 | 否 | 数据库实例ID。 | 无 |
AccountPassword | String | 是 | 是 | 数据库账号名称的密码。 | 限制:
|
AccountName | String | 是 | 否 | 数据库账号名称。 | 无 |
返回值
Fn::GetAtt
- DBInstanceId:数据库实例ID。
- AccountName:数据库实例账号名称。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DBInstanceId": {
"Type": "String",
"Description": "The ID of the instance.\nNote You can call the DescribeDBInstances operation to query details of all AnalyticDB for PostgreSQL instances in a specific\nregion, including instance IDs."
},
"AccountPassword": {
"Type": "String",
"Description": "The password of the privileged account.\nThe password must contain at least three of the following character types: uppercase\nletters, lowercase letters, digits, and special characters.\nSpecial characters include ! @ # & $ % ^ * ( ) _ + - =\nThe password must be 8 to 32 characters in length."
},
"AccountName": {
"Type": "String",
"Description": "The name of the privileged account.\nThe name can contain lowercase letters, digits, and underscores (_).\nThe name must start with a lowercase letter and end with a lowercase letter or a digit.\nThe name cannot start with gp.\nThe name must be 2 to 16 characters in length."
}
},
"Resources": {
"Account": {
"Type": "ALIYUN::GPDB::Account",
"Properties": {
"DBInstanceId": {
"Ref": "DBInstanceId"
},
"AccountPassword": {
"Ref": "AccountPassword"
},
"AccountName": {
"Ref": "AccountName"
}
}
}
},
"Outputs": {
"DBInstanceId": {
"Description": "The ID of the instance.",
"Value": {
"Fn::GetAtt": [
"Account",
"DBInstanceId"
]
}
},
"AccountName": {
"Description": "The name of the account.",
"Value": {
"Fn::GetAtt": [
"Account",
"AccountName"
]
}
}
}
}