- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListGroupsCommand
Lists all groups in the identity store. Returns a paginated list of complete Group
objects. Filtering for a Group
by the DisplayName
attribute is deprecated. Instead, use the GetGroupId
API action.
If you have administrator access to a member account, you can use this API from the member account. Read about member accounts in the Organizations User Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IdentitystoreClient, ListGroupsCommand } from "@aws-sdk/client-identitystore"; // ES Modules import
// const { IdentitystoreClient, ListGroupsCommand } = require("@aws-sdk/client-identitystore"); // CommonJS import
const client = new IdentitystoreClient(config);
const input = { // ListGroupsRequest
IdentityStoreId: "STRING_VALUE", // required
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
Filters: [ // Filters
{ // Filter
AttributePath: "STRING_VALUE", // required
AttributeValue: "STRING_VALUE", // required
},
],
};
const command = new ListGroupsCommand(input);
const response = await client.send(command);
// { // ListGroupsResponse
// Groups: [ // Groups // required
// { // Group
// GroupId: "STRING_VALUE", // required
// DisplayName: "STRING_VALUE",
// ExternalIds: [ // ExternalIds
// { // ExternalId
// Issuer: "STRING_VALUE", // required
// Id: "STRING_VALUE", // required
// },
// ],
// Description: "STRING_VALUE",
// IdentityStoreId: "STRING_VALUE", // required
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListGroupsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
IdentityStoreId Required | string | undefined | The globally unique identifier for the identity store, such as |
Filters | Filter[] | undefined | A list of |
MaxResults | number | undefined | The maximum number of results to be returned per request. This parameter is used in the |
NextToken | string | undefined | The pagination token used for the |
ListGroupsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Groups Required | Group[] | undefined | A list of |
NextToken | string | undefined | The pagination token used for the |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ResourceNotFoundException | client | Indicates that a requested resource is not found. |
ValidationException | client | The request failed because it contains a syntax error. |
AccessDeniedException | client | You do not have sufficient access to perform this action. |
InternalServerException | server | The request processing has failed because of an unknown error, exception or failure with an internal server. |
ThrottlingException | client | Indicates that the principal has crossed the throttling limits of the API operations. |
IdentitystoreServiceException | Base exception class for all service exceptions from Identitystore service. |