DescribeTask - Amazon DataSync
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

DescribeTask

Returns metadata about a task.

Request Syntax

{ "TaskArn": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

TaskArn

The Amazon Resource Name (ARN) of the task to describe.

Type: String

Length Constraints: Maximum length of 128.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$

Required: Yes

Response Syntax

{ "CloudWatchLogGroupArn": "string", "CreationTime": number, "CurrentTaskExecutionArn": "string", "DestinationLocationArn": "string", "DestinationNetworkInterfaceArns": [ "string" ], "ErrorCode": "string", "ErrorDetail": "string", "Excludes": [ { "FilterType": "string", "Value": "string" } ], "Includes": [ { "FilterType": "string", "Value": "string" } ], "Name": "string", "Options": { "Atime": "string", "BytesPerSecond": number, "Gid": "string", "LogLevel": "string", "Mtime": "string", "ObjectTags": "string", "OverwriteMode": "string", "PosixPermissions": "string", "PreserveDeletedFiles": "string", "PreserveDevices": "string", "SecurityDescriptorCopyFlags": "string", "TaskQueueing": "string", "TransferMode": "string", "Uid": "string", "VerifyMode": "string" }, "Schedule": { "ScheduleExpression": "string" }, "SourceLocationArn": "string", "SourceNetworkInterfaceArns": [ "string" ], "Status": "string", "TaskArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CloudWatchLogGroupArn

The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was used to monitor and log events in the task.

For more information on these groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch User Guide.

Type: String

Length Constraints: Maximum length of 562.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):logs:[a-z\-0-9]*:[0-9]{12}:log-group:([^:\*]*)(:\*)?$

CreationTime

The time that the task was created.

Type: Timestamp

CurrentTaskExecutionArn

The Amazon Resource Name (ARN) of the task execution that is transferring files.

Type: String

Length Constraints: Maximum length of 128.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}/execution/exec-[0-9a-f]{17}$

DestinationLocationArn

The Amazon Resource Name (ARN) of the Amazon storage resource's location.

Type: String

Length Constraints: Maximum length of 128.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$

DestinationNetworkInterfaceArns

The Amazon Resource Names (ARNs) of the network interfaces created for your destination location. For more information, see Network interface requirements.

Type: Array of strings

Length Constraints: Maximum length of 128.

Pattern: ^arn:aws[\-a-z]{0,}:ec2:[a-z\-0-9]*:[0-9]{12}:network-interface/eni-[0-9a-f]+$

ErrorCode

Errors that Amazon DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.

Type: String

ErrorDetail

Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.

Type: String

Excludes

A list of filter rules that exclude specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.

Type: Array of FilterRule objects

Array Members: Minimum number of 0 items. Maximum number of 1 item.

Includes

A list of filter rules that include specific data during your transfer. For more information and examples, see Filtering data transferred by DataSync.

Type: Array of FilterRule objects

Array Members: Minimum number of 0 items. Maximum number of 1 item.

Name

The name of the task that was described.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^[a-zA-Z0-9\s+=._:@/-]+$

Options

The configuration options that control the behavior of the StartTaskExecution operation. Some options include preserving file or object metadata and verifying data integrity.

You can override these options for each task execution. For more information, see StartTaskExecution.

Type: Options object

Schedule

The schedule used to periodically transfer files from a source to a destination location.

Type: TaskSchedule object

SourceLocationArn

The Amazon Resource Name (ARN) of the source file system's location.

Type: String

Length Constraints: Maximum length of 128.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$

SourceNetworkInterfaceArns

The Amazon Resource Names (ARNs) of the network interfaces created for your source location. For more information, see Network interface requirements.

Type: Array of strings

Length Constraints: Maximum length of 128.

Pattern: ^arn:aws[\-a-z]{0,}:ec2:[a-z\-0-9]*:[0-9]{12}:network-interface/eni-[0-9a-f]+$

Status

The status of the task that was described.

For detailed information about task execution statuses, see Understanding Task Statuses in the Amazon DataSync User Guide.

Type: String

Valid Values: AVAILABLE | CREATING | QUEUED | RUNNING | UNAVAILABLE

TaskArn

The Amazon Resource Name (ARN) of the task that was described.

Type: String

Length Constraints: Maximum length of 128.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):datasync:[a-z\-0-9]*:[0-9]{12}:task/task-[0-9a-f]{17}$

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalException

This exception is thrown when an error occurs in the Amazon DataSync service.

HTTP Status Code: 500

InvalidRequestException

This exception is thrown when the client submits a malformed request.

HTTP Status Code: 400

Examples

Example

The following example returns information about the task specified in the sample request.

Sample Request

{ "TaskArn": "arn:aws:datasync:us-east-2:111222333444:task/task-08de6e6697796f026" }

Example

This example illustrates one usage of DescribeTask.

Sample Response

{ "CloudWatchLogGroupArn": "arn:aws:logs:us-east-2:111222333444:log-group" "CreationTime": 1532660733.39, "CurrentTaskExecutionArn": "arn:aws:datasync:us-east-2:111222333444:task/task-08de6e6697796f026/execution/exec-04ce9d516d69bd52f", "Options": { "Atime": "BEST_EFFORT", "BytesPerSecond": 1000, "Gid": "NONE", "Mtime": "PRESERVE", "PosixPermissions": "PRESERVE", "PreserveDevices": "NONE", "PreserveDeletedFiles": "PRESERVE", "Uid": "NONE", "VerifyMode": "POINT_IN_TIME_CONSISTENT" }, "DestinationLocationArn": "arn:aws:datasync:us-east-2:111222333444:location/loc-07db7abfc326c50fb", "ErrorCode": "???????", "ErrorDetail": "??????", "Name": "MyTask", "SourceLocationArn": "arn:aws:datasync:us-east-2:111222333444:location/loc-07db7abfc326c50aa", "Status": "CREATING", "TaskArn": "arn:aws:datasync:us-east-2:111222333444:task/task-08de6e6697796f026" }

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: