DescribeAccountRoles
Queries the defined roles, including role names and definition databases, on a specified ApsaraDB for MongoDB instance. This serves as a data source for role selection when creating accounts or modifying account permissions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:DescribeAccountRoles |
get |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The ID of the ApsaraDB for MongoDB instance. |
dds-uf6e9433e955**** |
| DBName |
string |
No |
The name of the database to which the custom role belongs. |
testDB |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
7FEF1BEF-2842-5758-9126-415A297***** |
| Roles |
object |
||
| Role |
array<object> |
The list of custom roles. |
|
|
object |
|||
| Role |
string |
The name of the custom role. References: Manage database accounts in the console. |
readRole |
| DBName |
string |
The name of the database to which the custom role belongs. |
testDB |
Examples
Success response
JSON format
{
"RequestId": "7FEF1BEF-2842-5758-9126-415A297*****",
"Roles": {
"Role": [
{
"Role": "readRole",
"DBName": "testDB"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | ResponseEmptyError | The Response is empty, maybe server request timeout. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.