Queries a list of database accounts that the current Resource Access Management (RAM) user is authorized to manage.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:ListOperationDatabaseAccounts |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the bastion host. Note
You can call the DescribeInstances operation to query the ID of the bastion host. |
bastionhost-cn-2r42t9cvf0i |
| RegionId |
string |
No |
The region ID of the bastion host. Note
For more information about the mapping between region IDs and region names, see Regions and zones. |
cn-shanghai |
| DatabaseId |
string |
Yes |
The database ID. Note
You can call the ListOperationDatabases operation to query the database ID. |
56 |
| PageNumber |
string |
No |
The page number. Default value: 1. |
1 |
| PageSize |
string |
No |
The number of entries per page. Note
We recommend that you do not leave this parameter empty. |
20 |
| DatabaseAccountName |
string |
No |
The name of the database account. Exact match is supported. |
test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| DatabaseAccounts |
array<object> |
The database accounts returned. |
|
|
object |
|||
| DBName |
string |
The name of the PostgreSQL or Oracle database. |
xe |
| DatabaseAccountId |
string |
The database account ID. |
3 |
| DatabaseAccountName |
string |
The name of the database account. |
system |
| DatabaseId |
string |
The database ID. |
2 |
| HasPassword |
string |
Indicates whether a password is configured for the database host account. |
true |
| LoginAttribute |
string |
The logon attribute. One of the following values is returned if the database engine is Oracle:
|
SID |
| ProtocolName |
string |
The protocol that is used by the database account. |
MySQL |
| RequestId |
string |
The request ID. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| TotalCount |
integer |
The total number of entries returned. |
5 |
Examples
Success response
JSON format
{
"DatabaseAccounts": [
{
"DBName": "xe",
"DatabaseAccountId": "3",
"DatabaseAccountName": "system",
"DatabaseId": "2",
"HasPassword": "true",
"LoginAttribute": "SID",
"ProtocolName": "MySQL"
}
],
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"TotalCount": 5
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The argument is invalid. | The argument is invalid. |
| 500 | InternalError | An unknown error occurred. | An unknown error occurred. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.