DescribeTask - AWS DataSync

DescribeTask

Provides information about a task, which defines where and how AWS DataSync transfers your data.

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

Specifies the Amazon Resource Name (ARN) of the transfer task that you want information about.

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" } ], "ManifestConfig": { "Action": "string", "Format": "string", "Source": { "S3": { "BucketAccessRoleArn": "string", "ManifestObjectPath": "string", "ManifestObjectVersionId": "string", "S3BucketArn": "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", "Status": "string" }, "ScheduleDetails": { "DisabledBy": "string", "DisabledReason": "string", "StatusUpdateTime": number }, "SourceLocationArn": "string", "SourceNetworkInterfaceArns": [ "string" ], "Status": "string", "TaskArn": "string", "TaskMode": "string", "TaskReportConfig": { "Destination": { "S3": { "BucketAccessRoleArn": "string", "S3BucketArn": "string", "Subdirectory": "string" } }, "ObjectVersionIds": "string", "OutputType": "string", "Overrides": { "Deleted": { "ReportLevel": "string" }, "Skipped": { "ReportLevel": "string" }, "Transferred": { "ReportLevel": "string" }, "Verified": { "ReportLevel": "string" } }, "ReportLevel": "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 an Amazon CloudWatch log group for monitoring your task.

For more information, see Monitoring data transfers with CloudWatch Logs.

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 ARN of the most recent task execution.

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 ARN of your transfer's destination 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 ARNs of the network interfaces that DataSync created for your destination location.

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

If there's an issue with your task, you can use the error code to help you troubleshoot the problem. For more information, see Troubleshooting issues with DataSync transfers.

Type: String

ErrorDetail

If there's an issue with your task, you can use the error details to help you troubleshoot the problem. For more information, see Troubleshooting issues with DataSync transfers.

Type: String

Excludes

The exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. For more information and examples, see Specifying what DataSync transfers by using filters.

Type: Array of FilterRule objects

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

Includes

The include filters that define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see Specifying what DataSync transfers by using filters.

Type: Array of FilterRule objects

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

ManifestConfig

The configuration of the manifest that lists the files or objects that you want DataSync to transfer. For more information, see Specifying what DataSync transfers by using a manifest.

Type: ManifestConfig object

Name

The name of your task.

Type: String

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

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

Options

The task's settings. For example, what file metadata gets preserved, how data integrity gets verified at the end of your transfer, bandwidth limits, among other options.

Type: Options object

Schedule

The schedule for when you want your task to run. For more information, see Scheduling your task.

Type: TaskSchedule object

ScheduleDetails

The details about your task schedule.

Type: TaskScheduleDetails object

SourceLocationArn

The ARN of your transfer's source 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 ARNs of the network interfaces that DataSync created for your source location.

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 your task. For information about what each status means, see Task statuses.

Type: String

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

TaskArn

The ARN of your task.

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}$

TaskMode

The task mode that you're using. For more information, see Choosing a task mode for your data transfer.

Type: String

Valid Values: BASIC | ENHANCED

TaskReportConfig

The configuration of your task report, which provides detailed information about your DataSync transfer. For more information, see Monitoring your DataSync transfers with task reports.

Type: TaskReportConfig object

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 AWS DataSync service.

HTTP Status Code: 500

InvalidRequestException

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

HTTP Status Code: 400

Examples

Sample Request

The following example specifies the ARN of a DataSync task to get information about.

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

Sample Response

The following example shows a DescribeTask response.

{ "TaskArn": "arn:aws:datasync:us-east-2:111222333444:task/task-08de6e6697796f026", "Name": "MyTask", "TaskMode": "BASIC", "Status": "RUNNING", "SourceLocationArn": "arn:aws:datasync:us-east-2:111222333444:location/loc-1111aaaa2222bbbb3", "DestinationLocationArn": "arn:aws:datasync:us-east-2:111222333444:location/loc-0000zzzz1111yyyy2", "CurrentTaskExecutionArn": "arn:aws:datasync:us-east-2:111222333444:task/task-08de6e6697796f026/execution/exec-04ce9d516d69bd52f", "CreationTime": 1532660733.39, "Options": { "Atime": "BEST_EFFORT", "BytesPerSecond": 1000, "Gid": "NONE", "Mtime": "PRESERVE", "PosixPermissions": "PRESERVE", "PreserveDevices": "NONE", "PreserveDeletedFiles": "PRESERVE", "Uid": "NONE", "VerifyMode": "POINT_IN_TIME_CONSISTENT" }, "CloudWatchLogGroupArn": "arn:aws:logs:us-east-2:111222333444:log-group:/log-group-name:*" }

See Also

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