- 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.
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
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
maxResults | number | undefined | The maximum number of results that are returned per call. You can use 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 |
ListActivitiesCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
activities Required | ActivityListItem[] | undefined | The list of activities. |
nextToken | string | undefined | If |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidToken | client | The provided token is not valid. |
SFNServiceException | Base exception class for all service exceptions from SFN service. |