Queries the list of user groups that a user has joined.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the bastion host instance. Note
You can call the DescribeInstances operation to obtain this parameter. |
bastionhost-cn-m413tuhlo03 |
| RegionId |
string |
No |
The region ID of the bastion host. Note
For the mapping between region IDs and region names, see Regions and zones. |
cn-hangzhou |
| UserId |
string |
Yes |
The user ID. |
1 |
| PageNumber |
string |
Yes |
The page number for a paged query. Default value: 1. |
1 |
| PageSize |
string |
Yes |
The maximum number of entries per page for a paged query. Note
Do not leave PageSize empty. |
20 |
| Keyword |
string |
No |
The name of the user group to query. Fuzzy match is supported. |
test |
| PagingOff |
string |
No |
Specifies whether to disable paging. Valid values:
|
true |
| ProjectId |
integer |
No |
The project ID. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Count |
integer |
The total number of user groups returned. |
12 |
| RequestId |
string |
The request ID. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| UserGroups |
array<object> |
The list of user groups. |
|
|
object |
The list of user groups. |
||
| UserGroupName |
string |
The name of the user group. |
group |
| Comment |
string |
The remarks of the user group. |
comment |
| UserGroupId |
string |
The ID of the user group. |
2 |
| ProjectId |
string |
The ID of the project to which the user group belongs. |
2 |
| ProjectName |
string |
The name of the project to which the user group belongs. |
test |
Examples
Success response
JSON format
{
"Count": 12,
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"UserGroups": [
{
"UserGroupName": "group",
"Comment": "comment",
"UserGroupId": "2",
"ProjectId": "2",
"ProjectName": "test"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.