- 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.
ListTaskExecutionsCommand
Returns a list of executions for an DataSync transfer task.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataSyncClient, ListTaskExecutionsCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, ListTaskExecutionsCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // ListTaskExecutionsRequest
TaskArn: "STRING_VALUE",
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new ListTaskExecutionsCommand(input);
const response = await client.send(command);
// { // ListTaskExecutionsResponse
// TaskExecutions: [ // TaskExecutionList
// { // TaskExecutionListEntry
// TaskExecutionArn: "STRING_VALUE",
// Status: "QUEUED" || "CANCELLING" || "LAUNCHING" || "PREPARING" || "TRANSFERRING" || "VERIFYING" || "SUCCESS" || "ERROR",
// TaskMode: "BASIC" || "ENHANCED",
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListTaskExecutionsCommand Input
See ListTaskExecutionsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxResults | number | undefined | Specifies how many results you want in the response. |
NextToken | string | undefined | Specifies an opaque string that indicates the position at which to begin the next list of results in the response. |
TaskArn | string | undefined | Specifies the Amazon Resource Name (ARN) of the task that you want execution information about. |
ListTaskExecutionsCommand Output
See ListTaskExecutionsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NextToken | string | undefined | The opaque string that indicates the position to begin the next list of results in the response. |
TaskExecutions | TaskExecutionListEntry[] | undefined | A list of the task's executions. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalException | server | This exception is thrown when an error occurs in the DataSync service. |
InvalidRequestException | client | This exception is thrown when the client submits a malformed request. |
DataSyncServiceException | Base exception class for all service exceptions from DataSync service. |