ListActivitiesCommand

Lists the existing activities.

If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.

Example Syntax

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

import { SFNClient, ListActivitiesCommand } from "@aws-sdk/client-sfn"; // ES Modules import
// const { SFNClient, ListActivitiesCommand } = require("@aws-sdk/client-sfn"); // CommonJS import
const client = new SFNClient(config);
const input = { // ListActivitiesInput
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
};
const command = new ListActivitiesCommand(input);
const response = await client.send(command);
// { // ListActivitiesOutput
//   activities: [ // ActivityList // required
//     { // ActivityListItem
//       activityArn: "STRING_VALUE", // required
//       name: "STRING_VALUE", // required
//       creationDate: new Date("TIMESTAMP"), // required
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListActivitiesCommand Input

See ListActivitiesCommandInput for more details

Parameter
Type
Description
maxResults
number | undefined

The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.

This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.

nextToken
string | undefined

If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

ListActivitiesCommand Output

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

The list of activities.

nextToken
string | undefined

If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

Throws

Name
Fault
Details
InvalidToken
client

The provided token is not valid.

SFNServiceException
Base exception class for all service exceptions from SFN service.