Queries the Resource Access Management (RAM) user groups to which a RAM user belongs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ram:ListGroupsForUser |
list |
*User
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| UserPrincipalName |
string |
Yes |
The logon name of the RAM user. |
test@example.onaliyun.com |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
7158A935-FB5E-49A7-8E52-FDA5B2B67247 |
| Groups |
object |
||
| Group |
array<object> |
The information about the RAM user groups. |
|
|
object |
|||
| DisplayName |
string |
The display name of the RAM user group. |
Test-Team |
| GroupName |
string |
The name of the RAM user group. |
Test-Team |
| GroupId |
string |
The ID of the RAM user group. |
740317625433843**** |
| Comments |
string |
The description. |
测试团队 |
| JoinDate |
string |
The time when the RAM user was added. |
2020-10-20T06:57:00Z |
Examples
Success response
JSON format
{
"RequestId": "7158A935-FB5E-49A7-8E52-FDA5B2B67247",
"Groups": {
"Group": [
{
"DisplayName": "Test-Team",
"GroupName": "Test-Team",
"GroupId": "740317625433843****",
"Comments": "测试团队",
"JoinDate": "2020-10-20T06:57:00Z"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.