Invokes the ListGroupsForUser operation to query the information about the groups to which a specified Resource Access Management (RAM) user is added.
Operation description
Usage notes
This topic provides an example on how to query the information about the groups to which the Resource Access Management (RAM) user Alice is added. The response shows that Alice is added to the group named Dev-Team.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ram:ListGroupsForUser |
get |
*User
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| UserName |
string |
No |
The username of the Resource Access Management (RAM) user. |
Alice |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
DA772B52-BF9F-54CA-AC77-AA7A2DA89D46 |
| Groups |
object |
||
| Group |
array<object> |
The group information. |
|
|
object |
The group information. |
||
| GroupId |
string |
The ID of the group. |
g-zYtroLrgbZR1**** |
| GroupName |
string |
The name of the group. |
Dev-Team |
| Comments |
string |
The comments. |
Development team |
| JoinDate |
string |
The time when the RAM user was added to the group. The time is displayed in UTC. The format is |
2015-01-23T12:33:18Z |
Examples
Success response
JSON format
{
"RequestId": "DA772B52-BF9F-54CA-AC77-AA7A2DA89D46",
"Groups": {
"Group": [
{
"GroupId": "g-zYtroLrgbZR1****",
"GroupName": "Dev-Team",
"Comments": "Development team",
"JoinDate": "2015-01-23T12:33:18Z"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.