ListDatasetGroupsCommand

Returns a list of dataset groups. The response provides the properties for each dataset group, including the Amazon Resource Name (ARN). For more information on dataset groups, see CreateDatasetGroup .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { PersonalizeClient, ListDatasetGroupsCommand } from "@aws-sdk/client-personalize"; // ES Modules import
// const { PersonalizeClient, ListDatasetGroupsCommand } = require("@aws-sdk/client-personalize"); // CommonJS import
const client = new PersonalizeClient(config);
const input = { // ListDatasetGroupsRequest
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
};
const command = new ListDatasetGroupsCommand(input);
const response = await client.send(command);
// { // ListDatasetGroupsResponse
//   datasetGroups: [ // DatasetGroups
//     { // DatasetGroupSummary
//       name: "STRING_VALUE",
//       datasetGroupArn: "STRING_VALUE",
//       status: "STRING_VALUE",
//       creationDateTime: new Date("TIMESTAMP"),
//       lastUpdatedDateTime: new Date("TIMESTAMP"),
//       failureReason: "STRING_VALUE",
//       domain: "ECOMMERCE" || "VIDEO_ON_DEMAND",
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListDatasetGroupsCommand Input

See ListDatasetGroupsCommandInput for more details

Parameter
Type
Description
maxResults
number | undefined

The maximum number of dataset groups to return.

nextToken
string | undefined

A token returned from the previous call to ListDatasetGroups for getting the next set of dataset groups (if they exist).

ListDatasetGroupsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
datasetGroups
DatasetGroupSummary[] | undefined

The list of your dataset groups.

nextToken
string | undefined

A token for getting the next set of dataset groups (if they exist).

Throws

Name
Fault
Details
InvalidNextTokenException
client

The token is not valid.

PersonalizeServiceException
Base exception class for all service exceptions from Personalize service.