Queries information about database accounts of an ApsaraDB RDS instance.
Syntax
{
"Type": "DATASOURCE::RDS::Accounts",
"Properties": {
"DBInstanceId": String,
"AccountName": String,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
DBInstanceId |
String |
Yes |
Yes |
The instance ID. |
Note
Instances that run SQL Server 2017 EE or PostgreSQL are not supported. |
|
AccountName |
String |
No |
Yes |
The name of the database account. |
None. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
Return values (Fn::GetAtt)
-
AccountNames: the names of the database accounts.
-
Accounts: details of the database accounts.
|
Property |
Type |
Description |
Constraint |
|
AccountNames |
List |
The names of the database accounts. |
None. |
|
Accounts |
List |
Details of the database accounts. |
None. |
|
AccountStatus |
String |
The status of the database account. |
Valid values:
|
|
AccountDescription |
String |
The description of the database account. |
None. |
|
DBInstanceId |
String |
The instance ID of the database account. |
None. |
|
PrivExceeded |
String |
Indicates whether the number of databases managed by the database account exceeds the upper limit. |
Valid values:
|
|
AccountType |
String |
The type of the database account. |
Valid values:
|
|
AccountName |
String |
The name of the database account. |
None. |
|
DatabasePrivileges |
Map |
The database permissions granted to the database account. |
Example:
|
Examples
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DBInstanceId": {
"Type": "String",
"Description": "The ID of the RDS instance."
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::RDS::Accounts",
"Properties": {
"DBInstanceId": {
"Ref": "DBInstanceId"
}
}
}
},
"Outputs": {
"AccountNames": {
"Description": "The list of The RDS account names.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"AccountNames"
]
}
},
"Accounts": {
"Description": "The list of The RDS accounts.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Accounts"
]
}
}
}
}ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DBInstanceId:
Type: String
Description: The ID of the RDS instance.
Resources:
ExtensionDataSource:
Type: DATASOURCE::RDS::Accounts
Properties:
DBInstanceId:
Ref: DBInstanceId
Outputs:
AccountNames:
Description: The list of The RDS account names.
Value:
Fn::GetAtt:
- ExtensionDataSource
- AccountNames
Accounts:
Description: The list of The RDS accounts.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Accounts