Queries groups.
Operation description
This topic provides an example on how to query the groups in the directory d-00fc2p61****. The returned result shows that the directory contains three groups. The groups group1 and group2 are synchronized from an external identity provider (IdP). The group TestGroup is manually created in CloudSSO.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cloudsso:ListGroups |
list |
*Group
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DirectoryId |
string |
Yes |
The ID of the directory. |
d-00fc2p61**** |
| NextToken |
string |
No |
The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of When you call this operation for the first time, if the total number of entries to return is larger than the value of the |
K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4**** |
| MaxResults |
integer |
No |
The number of entries per page. Valid values: 1 to 100. Default value: 10. |
10 |
| Filter |
string |
No |
The filter condition. You must specify the value in the For example, if you set Filter to GroupName sw test, the operation queries the groups whose names start with test. If you set Filter to GroupName eq testgroup, the operation queries the group whose name is testgroup. |
GroupName eq testgroup |
| ProvisionType |
string |
No |
The type of the group. The type can be used to filter groups. Valid values:
|
Manual |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| NextToken |
string |
A pagination token. It can be used in the next request to retrieve a new page of results. Note
This parameter is returned only when the value of the |
K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4**** |
| RequestId |
string |
The request ID. |
768F908D-A66A-5A5D-816C-20C93CBBFEE3 |
| Groups |
array<object> |
The groups. |
|
|
object |
The group. |
||
| GroupName |
string |
The name of the group. |
TestGroup |
| Description |
string |
The description of the group. |
This is a group. |
| CreateTime |
string |
The time when the group was created. The value is in the ISO 8601 standard in the |
2021-11-01T02:38:27Z |
| ProvisionType |
string |
The type of the group. Valid values:
|
Manual |
| UpdateTime |
string |
The time when the group was modified. The value is in the ISO 8601 standard in the |
2021-11-01T02:38:27Z |
| GroupId |
string |
The ID of the group. |
g-00jqzghi2n3o5hkh**** |
| MaxResults |
integer |
The number of entries per page. |
10 |
| TotalCounts |
integer |
The total number of entries returned. |
3 |
| IsTruncated |
boolean |
Indicates whether the queried entries are truncated. Valid values:
|
false |
Examples
Success response
JSON format
{
"NextToken": "K1c3o9K7pFxoTtxH1Nm7MMLb7zrDGvftYBQBPDVv7AD3a8yhRb3Mk8L9ivmN6bFSjfkZNTAg3h4****",
"RequestId": "768F908D-A66A-5A5D-816C-20C93CBBFEE3",
"Groups": [
{
"GroupName": "TestGroup",
"Description": "This is a group.",
"CreateTime": "2021-11-01T02:38:27Z",
"ProvisionType": "Manual",
"UpdateTime": "2021-11-01T02:38:27Z",
"GroupId": "g-00jqzghi2n3o5hkh****"
}
],
"MaxResults": 10,
"TotalCounts": 3,
"IsTruncated": false
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.