- 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.
DescribeTaskExecutionCommand
Provides information about an execution of your DataSync task. You can use this operation to help monitor the progress of an ongoing data transfer or check the results of the transfer.
Some DescribeTaskExecution
response elements are only relevant to a specific task mode. For information, see Understanding task mode differences and Understanding data transfer performance counters .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataSyncClient, DescribeTaskExecutionCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, DescribeTaskExecutionCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // DescribeTaskExecutionRequest
TaskExecutionArn: "STRING_VALUE", // required
};
const command = new DescribeTaskExecutionCommand(input);
const response = await client.send(command);
// { // DescribeTaskExecutionResponse
// TaskExecutionArn: "STRING_VALUE",
// Status: "QUEUED" || "CANCELLING" || "LAUNCHING" || "PREPARING" || "TRANSFERRING" || "VERIFYING" || "SUCCESS" || "ERROR",
// Options: { // Options
// VerifyMode: "POINT_IN_TIME_CONSISTENT" || "ONLY_FILES_TRANSFERRED" || "NONE",
// OverwriteMode: "ALWAYS" || "NEVER",
// Atime: "NONE" || "BEST_EFFORT",
// Mtime: "NONE" || "PRESERVE",
// Uid: "NONE" || "INT_VALUE" || "NAME" || "BOTH",
// Gid: "NONE" || "INT_VALUE" || "NAME" || "BOTH",
// PreserveDeletedFiles: "PRESERVE" || "REMOVE",
// PreserveDevices: "NONE" || "PRESERVE",
// PosixPermissions: "NONE" || "PRESERVE",
// BytesPerSecond: Number("long"),
// TaskQueueing: "ENABLED" || "DISABLED",
// LogLevel: "OFF" || "BASIC" || "TRANSFER",
// TransferMode: "CHANGED" || "ALL",
// SecurityDescriptorCopyFlags: "NONE" || "OWNER_DACL" || "OWNER_DACL_SACL",
// ObjectTags: "PRESERVE" || "NONE",
// },
// Excludes: [ // FilterList
// { // FilterRule
// FilterType: "SIMPLE_PATTERN",
// Value: "STRING_VALUE",
// },
// ],
// Includes: [
// {
// FilterType: "SIMPLE_PATTERN",
// Value: "STRING_VALUE",
// },
// ],
// ManifestConfig: { // ManifestConfig
// Action: "TRANSFER",
// Format: "CSV",
// Source: { // SourceManifestConfig
// S3: { // S3ManifestConfig
// ManifestObjectPath: "STRING_VALUE", // required
// BucketAccessRoleArn: "STRING_VALUE", // required
// S3BucketArn: "STRING_VALUE", // required
// ManifestObjectVersionId: "STRING_VALUE",
// },
// },
// },
// StartTime: new Date("TIMESTAMP"),
// EstimatedFilesToTransfer: Number("long"),
// EstimatedBytesToTransfer: Number("long"),
// FilesTransferred: Number("long"),
// BytesWritten: Number("long"),
// BytesTransferred: Number("long"),
// BytesCompressed: Number("long"),
// Result: { // TaskExecutionResultDetail
// PrepareDuration: Number("long"),
// PrepareStatus: "PENDING" || "SUCCESS" || "ERROR",
// TotalDuration: Number("long"),
// TransferDuration: Number("long"),
// TransferStatus: "PENDING" || "SUCCESS" || "ERROR",
// VerifyDuration: Number("long"),
// VerifyStatus: "PENDING" || "SUCCESS" || "ERROR",
// ErrorCode: "STRING_VALUE",
// ErrorDetail: "STRING_VALUE",
// },
// TaskReportConfig: { // TaskReportConfig
// Destination: { // ReportDestination
// S3: { // ReportDestinationS3
// Subdirectory: "STRING_VALUE",
// S3BucketArn: "STRING_VALUE", // required
// BucketAccessRoleArn: "STRING_VALUE", // required
// },
// },
// OutputType: "SUMMARY_ONLY" || "STANDARD",
// ReportLevel: "ERRORS_ONLY" || "SUCCESSES_AND_ERRORS",
// ObjectVersionIds: "INCLUDE" || "NONE",
// Overrides: { // ReportOverrides
// Transferred: { // ReportOverride
// ReportLevel: "ERRORS_ONLY" || "SUCCESSES_AND_ERRORS",
// },
// Verified: {
// ReportLevel: "ERRORS_ONLY" || "SUCCESSES_AND_ERRORS",
// },
// Deleted: {
// ReportLevel: "ERRORS_ONLY" || "SUCCESSES_AND_ERRORS",
// },
// Skipped: {
// ReportLevel: "ERRORS_ONLY" || "SUCCESSES_AND_ERRORS",
// },
// },
// },
// FilesDeleted: Number("long"),
// FilesSkipped: Number("long"),
// FilesVerified: Number("long"),
// ReportResult: { // ReportResult
// Status: "PENDING" || "SUCCESS" || "ERROR",
// ErrorCode: "STRING_VALUE",
// ErrorDetail: "STRING_VALUE",
// },
// EstimatedFilesToDelete: Number("long"),
// TaskMode: "BASIC" || "ENHANCED",
// FilesPrepared: Number("long"),
// FilesListed: { // TaskExecutionFilesListedDetail
// AtSource: Number("long"),
// AtDestinationForDelete: Number("long"),
// },
// FilesFailed: { // TaskExecutionFilesFailedDetail
// Prepare: Number("long"),
// Transfer: Number("long"),
// Verify: Number("long"),
// Delete: Number("long"),
// },
// };
DescribeTaskExecutionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
TaskExecutionArn Required | string | undefined | Specifies the Amazon Resource Name (ARN) of the task execution that you want information about. |
DescribeTaskExecutionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
BytesCompressed | number | undefined | The number of physical bytes that DataSync transfers over the network after compression (if compression is possible). This number is typically less than BytesTransferred unless the data isn't compressible. |
BytesTransferred | number | undefined | The number of bytes that DataSync sends to the network before compression (if compression is possible). For the number of bytes transferred over the network, see BytesCompressed . |
BytesWritten | number | undefined | The number of logical bytes that DataSync actually writes to the destination location. |
EstimatedBytesToTransfer | number | undefined | The number of logical bytes that DataSync expects to write to the destination location. |
EstimatedFilesToDelete | number | undefined | The number of files, objects, and directories that DataSync expects to delete in your destination location. If you don't configure your task to delete data in the destination that isn't in the source , the value is always |
EstimatedFilesToTransfer | number | undefined | The number of files, objects, and directories that DataSync expects to transfer over the network. This value is calculated while DataSync prepares the transfer. How this gets calculated depends primarily on your task’s transfer mode configuration:
|
Excludes | FilterRule[] | undefined | A list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync . |
FilesDeleted | number | undefined | The number of files, objects, and directories that DataSync actually deletes in your destination location. If you don't configure your task to delete data in the destination that isn't in the source , the value is always |
FilesFailed | TaskExecutionFilesFailedDetail | undefined | The number of objects that DataSync fails to prepare, transfer, verify, and delete during your task execution. Applies only to Enhanced mode tasks . |
FilesListed | TaskExecutionFilesListedDetail | undefined | The number of objects that DataSync finds at your locations. Applies only to Enhanced mode tasks . |
FilesPrepared | number | undefined | The number of objects that DataSync will attempt to transfer after comparing your source and destination locations. Applies only to Enhanced mode tasks . This counter isn't applicable if you configure your task to transfer all data . In that scenario, DataSync copies everything from the source to the destination without comparing differences between the locations. |
FilesSkipped | number | undefined | The number of files, objects, and directories that DataSync skips during your transfer. |
FilesTransferred | number | undefined | The number of files, objects, and directories that DataSync actually transfers over the network. This value is updated periodically during your task execution when something is read from the source and sent over the network. If DataSync fails to transfer something, this value can be less than |
FilesVerified | number | undefined | The number of files, objects, and directories that DataSync verifies during your transfer. When you configure your task to verify only the data that's transferred , DataSync doesn't verify directories in some situations or files that fail to transfer. |
Includes | FilterRule[] | undefined | A list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync . |
ManifestConfig | ManifestConfig | undefined | The configuration of the manifest that lists the files or objects to transfer. For more information, see Specifying what DataSync transfers by using a manifest . |
Options | Options | undefined | Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options. Each option has a default value. Unless you need to, you don't have to configure any option before calling StartTaskExecution . You also can override your task options for each task execution. For example, you might want to adjust the |
ReportResult | ReportResult | undefined | Indicates whether DataSync generated a complete task report for your transfer. |
Result | TaskExecutionResultDetail | undefined | The result of the task execution. |
StartTime | Date | undefined | The time when the task execution started. |
Status | TaskExecutionStatus | undefined | The status of the task execution. |
TaskExecutionArn | string | undefined | The ARN of the task execution that you wanted information about. For example, a |
TaskMode | TaskMode | undefined | The task mode that you're using. For more information, see Choosing a task mode for your data transfer . |
TaskReportConfig | TaskReportConfig | undefined | The configuration of your task report, which provides detailed information about for your DataSync transfer. For more information, see Creating a task report . |
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. |