Lists information about the RAM user groups to which a RAM user is added.

Debug

Use API Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
Action String Yes ListGroupsForUser

The name of this action.

Value: ListGroupsForUser

UserName String Yes Alice The username of the RAM user.

Response parameters

Parameter Type Example value Description
Groups N/A N/A The information about the RAM user groups.
Comments String Development team The comment.
GroupName String Dev-Team The RAM user group name.
JoinDate String 2015-01-23T12:33:18Z The date and time when the user joined a user group.
RequestId String 0945BF6F-54A4-C384-C89C-C500DCEE367C The request ID.

Example

Request example

https://ram.aliyuncs.com/?Action=ListGroupsForUser
&UserName=Alice
&<Common parameters>

Response example

XML format

<ListGroupsForUserResponse>
  <RequestId>0945BF6F-54A4-C384-C89C-C500DCEE367C</RequestId>
  <Groups>
    <Group>
      <GroupName>Dev-Team</GroupName>
      <Comments>Development team</Comments>
      <JoinDate>2015-01-23T12:33:18Z</JoinDate>
    </Group>
    <Group>
      <GroupName>QA-Team</GroupName>
      <Comments>Test team</Comments>
      <JoinDate>2015-02-18T17:22:08Z</JoinDate>
    </Group>
  </Groups>
</ListGroupsForUserResponse>

JSON format

{
    "Groups":{
        "Group":[
            {
                "Comments":"Development team",
                "GroupName":"Dev-Team",
                "JoinDate":"2015-01-23T12:33:18Z"
            },
            {
                "Comments":"Test team",
                "GroupName":"QA-Team",
                "JoinDate":"2015-02-18T17:22:08Z"
            }
        ]
    },
    "RequestId":"0945BF6F-54A4-C384-C89C-C500DCEE367C"
}

Errors

For a list of error codes, visit the API Error Center.