DATASOURCE::DRDS::Accounts
Queries the accounts of a PolarDB-X 1.0 instance.
Syntax
{
"Type": "DATASOURCE::DRDS::Accounts",
"Properties": {
"InstanceId": String,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
InstanceId |
String |
No |
Yes |
The instance ID. |
None. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
Return values
Fn::GetAtt
-
DrdsAccountNames: the names of the accounts.
-
Accounts: details of the accounts.
|
Property |
Type |
Description |
Constraint |
|
DrdsAccountNames |
List |
The names of the accounts. |
None. |
|
Accounts |
List |
Details of the accounts. |
None. |
|
DrdsAccountName |
String |
The account name. |
None. |
|
DbPrivileges |
String |
The database permissions. |
None. |
|
Host |
String |
The IP address allowed to access the database. |
Note
A percent sign (%) indicates that all IP addresses can access the database. |
|
AccountType |
String |
The account type. |
None. |
|
Description |
String |
The description of the account. |
None. |
Examples
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceId:
Description: The ID of the PolarDB-X 1.0 instance.
Type: String
Resources:
ExtensionDataSource:
Properties:
InstanceId:
Ref: InstanceId
Type: DATASOURCE::DRDS::Accounts
Outputs:
Accounts:
Description: Indicates the information about the instance accounts.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Accounts
DrdsAccountNames:
Description: Indicates the username of an instance accounts.
Value:
Fn::GetAtt:
- ExtensionDataSource
- DrdsAccountNames
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": "The ID of the PolarDB-X 1.0 instance."
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::DRDS::Accounts",
"Properties": {
"InstanceId": {
"Ref": "InstanceId"
}
}
}
},
"Outputs": {
"DrdsAccountNames": {
"Description": "Indicates the username of an instance accounts.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"DrdsAccountNames"
]
}
},
"Accounts": {
"Description": "Indicates the information about the instance accounts.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Accounts"
]
}
}
}
}