Queries the Resource Access Management (RAM) user groups to which a RAM user belongs.
Operation description
This topic provides an example on how to query the RAM user groups to which the RAM user Alice belongs. The response shows that Alice belongs to the RAM user 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 name of the RAM user. | Alice |
For more information about common request parameters, see Common parameters.
Response elements
Element | Type | Description | Example |
object | |||
RequestId | string | The ID of the request. | DA772B52-BF9F-54CA-AC77-AA7A2DA89D46 |
| Groups | object | ||
| Group | array<object> | The information about the RAM user groups. | |
object | The information about the RAM user group. | ||
GroupId | string | The ID of the RAM user group. | g-zYtroLrgbZR1**** |
GroupName | string | The name of the RAM user group. | Dev-Team |
Comments | string | The description. | Dev-Team |
JoinDate | string | The time when the RAM user was added to the RAM user group. | 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": "Dev-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.