DATASOURCE::RDS::Accounts is used to query the database accounts of an ApsaraDB RDS instance.
Syntax
{
"Type": "DATASOURCE::RDS::Accounts",
"Properties": {
"DBInstanceId": String,
"AccountName": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
DBInstanceId | String | Yes | Yes | The ID of the instance. |
Note Instances that run SQL Server 2017 EE or PostgreSQL are not supported.
|
AccountName | String | No | Yes | The name of the database account. | None |
Response parameters (Fn::GetAtt)
- AccountNames: the names of the database accounts.
- Accounts: details of the database accounts.
Parameter | Type | Description | Constraint |
---|---|---|---|
AccountNames | List | The names of the database accounts. | None. |
Accounts | List | Details of the database accounts. | None. |
AccountStatus | String | The state of the database account. | Valid values:
|
AccountDescription | String | The description of the database account. | None. |
DBInstanceId | String | The ID of the instance to which the database account belongs. | None. |
PrivExceeded | String | Indicates whether the number of databases that are 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 | Details of the database permissions that are granted to the database account. | Example:
|
Examples
-
JSON
format{ "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" ] } } } }