Queries the RAM user groups that a RAM user has joined.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListGroupsForUser

The operation that you want to perform. Set the valid value to ListGroupsForUser.

UserName String Yes zhangq****

The name of the RAM user.

Response parameters

Parameter Type Example Description
Groups Array

The list of the RAM user groups.

Group

The information of a RAM user group.

Comments String Development team

The description of the RAM user group.

GroupName String Dev-Team

The name of the RAM user group.

JoinDate String 2015-01-23T12:33:18Z

The time when the RAM user joined the RAM user group.

RequestId String 0945BF6F-54A4-C384-C89C-C500DCEE367C

The ID of the request.

Examples

Sample requests


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

Sample success responses

XML format

<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>

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"
}

Error codes

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