ALIYUN::GPDB::Account creates a database account for an AnalyticDB for PostgreSQL instance.
Syntax
{
"Type": "ALIYUN::GPDB::Account",
"Properties": {
"AccountDescription": String,
"DBInstanceId": String,
"AccountPassword": String,
"AccountType": String,
"AccountName": String
}
}
Properties
|
Parameter |
Type |
Required |
Editable |
Description |
Constraints |
|
AccountDescription |
String |
No |
No |
The account description. |
None |
|
DBInstanceId |
String |
Yes |
No |
The instance ID. |
None |
|
AccountPassword |
String |
Yes |
Yes |
The account password. |
Limitations:
|
|
AccountName |
String |
Yes |
No |
The account name. |
None |
|
AccountType |
String |
No |
Yes |
The account type. |
Valid values:
|
Response parameters
Fn::GetAtt
-
DBInstanceId: the instance ID.
-
AccountName: the account name.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DBInstanceId:
Type: String
Description: |-
The ID of the database instance.
Note You can call the DescribeDBInstances operation to query details of all AnalyticDB for PostgreSQL instances in a specific
region, including instance IDs.
AccountPassword:
Type: String
Description: |-
The password for the database account.
The password must contain at least three of the following character types: uppercase
letters, lowercase letters, digits, and special characters.
Special characters include ! @ # & $ % ^ * ( ) _ + - =
The password must be 8 to 32 characters in length.
AccountName:
Type: String
Description: |-
The name of the database account.
The name can contain lowercase letters, digits, and underscores (_).
The name must start with a lowercase letter and end with a lowercase letter or a digit.
The name cannot start with gp.
The 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 database instance.
Value:
Fn::GetAtt:
- Account
- DBInstanceId
AccountName:
Description: The name of the database account.
Value:
Fn::GetAtt:
- Account
- AccountName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DBInstanceId": {
"Type": "String",
"Description": "The ID of the database 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 for the database 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 database 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 database instance.",
"Value": {
"Fn::GetAtt": [
"Account",
"DBInstanceId"
]
}
},
"AccountName": {
"Description": "The name of the database account.",
"Value": {
"Fn::GetAtt": [
"Account",
"AccountName"
]
}
}
}
}该文章对您有帮助吗?