DescribeTaskExecution
Returns detailed metadata about a task that is being executed.
Request Syntax
{
"TaskExecutionArn": "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.
- TaskExecutionArn
-
The Amazon Resource Name (ARN) of the task that is being executed.
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}$
Required: Yes
Response Syntax
{
"BytesTransferred": number,
"BytesWritten": number,
"EstimatedBytesToTransfer": number,
"EstimatedFilesToTransfer": number,
"Excludes": [
{
"FilterType": "string",
"Value": "string"
}
],
"FilesTransferred": number,
"Includes": [
{
"FilterType": "string",
"Value": "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"
},
"Result": {
"ErrorCode": "string",
"ErrorDetail": "string",
"PrepareDuration": number,
"PrepareStatus": "string",
"TotalDuration": number,
"TransferDuration": number,
"TransferStatus": "string",
"VerifyDuration": number,
"VerifyStatus": "string"
},
"StartTime": number,
"Status": "string",
"TaskExecutionArn": "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.
- BytesTransferred
-
The physical number of bytes transferred over the network.
Type: Long
- BytesWritten
-
The number of logical bytes written to the destination AWS storage resource.
Type: Long
- EstimatedBytesToTransfer
-
The estimated physical number of bytes that is to be transferred over the network.
Type: Long
- EstimatedFilesToTransfer
-
The expected number of files that is to be transferred over the network. This value is calculated during the PREPARING phase, before the TRANSFERRING phase. This value is the expected number of files to be transferred. It's calculated based on comparing the content of the source and destination locations and finding the delta that needs to be transferred.
Type: Long
- Excludes
-
A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example:
"/folder1|/folder2"
Type: Array of FilterRule objects
Array Members: Minimum number of 0 items. Maximum number of 1 item.
- FilesTransferred
-
The actual number of files that was transferred over the network. This value is calculated and updated on an ongoing basis during the TRANSFERRING phase. It's updated periodically when each file is read from the source and sent over the network.
If failures occur during a transfer, this value can be less than
EstimatedFilesToTransfer
. This value can also be greater thanEstimatedFilesTransferred
in some cases. This element is implementation-specific for some location types, so don't use it as an indicator for a correct file number or to monitor your task execution.Type: Long
- Includes
-
A list of filter rules that determines which files to include when running a task. The list should contain a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example:
"/folder1|/folder2"
Type: Array of FilterRule objects
Array Members: Minimum number of 0 items. Maximum number of 1 item.
- Options
-
Represents the options that are available to control the behavior of a StartTaskExecution operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.
A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution, the default value is used. You can override the defaults options on each task execution by specifying an overriding
Options
value to StartTaskExecution.Type: Options object
- Result
-
The result of the task execution.
Type: TaskExecutionResultDetail object
- StartTime
-
The time that the task execution was started.
Type: Timestamp
- Status
-
The status of the task execution.
For detailed information about task execution statuses, see Understanding Task Statuses.
Type: String
Valid Values:
QUEUED | LAUNCHING | PREPARING | TRANSFERRING | VERIFYING | SUCCESS | ERROR
- TaskExecutionArn
-
The Amazon Resource Name (ARN) of the task execution that was described.
TaskExecutionArn
is hierarchical and includesTaskArn
for the task that was executed.For example, a
TaskExecution
value with the ARNarn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b
executed the task with the ARNarn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2
.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}$
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
Example
The following example returns information about the TaskExecution
value
specified in the sample request.
Sample Request
{
"TaskExecutionArn": "arn:aws:datasync:us-east-1:111222333444:task/task-08de6e6697796f026/execution/exec-04ce9d516d69bd52f"
}
Example
This example illustrates one usage of DescribeTaskExecution.
Sample Response
{
"BytesTransferred": "5000",
"BytesWritten": "5000",
"EstimatedBytesToTransfer": "5000",
"EstimatedFilesToTransfer": "100",
"FilesTransferred": "100",
"Result": {
"ErrorCode": "??????",
"ErrorDetail": "??????",
"PrepareDuration": "100",
"PrepareStatus": "SUCCESS",
"TransferDuration": "60",
"TransferStatus": "AVAILABLE",
"VerifyDuration": "30",
"VerifyStatus": "SUCCESS"
},
"StartTime": "1532660733.39",
"Status": "SUCCESS",
"OverrideOptions": {
"Atime": "BEST_EFFORT",
"BytesPerSecond": "1000",
"Gid": "NONE",
"Mtime": "PRESERVE",
"PosixPermissions": "PRESERVE",
"PreserveDevices": "NONE",
"PreserveDeletedFiles": "PRESERVE",
"Uid": "NONE",
"VerifyMode": "POINT_IN_TIME_CONSISTENT"
},
"TaskExecutionArn": "arn:aws:datasync:us-east-2:111222333444:task/task-08de6e6697796f026/execution/exec-04ce9d516d69bd52f"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: