

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# DescribeTaskExecution
<a name="API_DescribeTaskExecution"></a>

提供 AWS DataSync 任務執行的相關資訊。您可以使用此操作來協助監控持續資料傳輸的進度，或檢查傳輸的結果。

**注意**  
有些`DescribeTaskExecution`回應元素僅與特定任務模式相關。如需詳細資訊，請參閱[了解任務模式差異](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html#task-mode-differences)和[了解資料傳輸效能計數器](https://docs.aws.amazon.com/datasync/latest/userguide/transfer-performance-counters.html)。

## 請求語法
<a name="API_DescribeTaskExecution_RequestSyntax"></a>

```
{
   "TaskExecutionArn": "string"
}
```

## 請求參數
<a name="API_DescribeTaskExecution_RequestParameters"></a>

如需所有動作的一般參數資訊，請參閱《[Common Parameters](CommonParameters.md)》。

請求接受採用 JSON 格式的下列資料。

 ** [TaskExecutionArn](#API_DescribeTaskExecution_RequestSyntax) **   <a name="DataSync-DescribeTaskExecution-request-TaskExecutionArn"></a>
指定您希望取得資訊之任務執行的 Amazon Resource Name (ARN)。  
類型：字串  
長度限制：長度上限為 128。  
模式：`^arn:(aws|aws-cn|aws-us-gov|aws-eusc|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}$`  
必要：是

## 回應語法
<a name="API_DescribeTaskExecution_ResponseSyntax"></a>

```
{
   "BytesCompressed": number,
   "BytesTransferred": number,
   "BytesWritten": number,
   "EndTime": number,
   "EstimatedBytesToTransfer": number,
   "EstimatedFilesToDelete": number,
   "EstimatedFilesToTransfer": number,
   "EstimatedFoldersToDelete": number,
   "EstimatedFoldersToTransfer": number,
   "Excludes": [ 
      { 
         "FilterType": "string",
         "Value": "string"
      }
   ],
   "FilesDeleted": number,
   "FilesFailed": { 
      "Delete": number,
      "Prepare": number,
      "Transfer": number,
      "Verify": number
   },
   "FilesListed": { 
      "AtDestinationForDelete": number,
      "AtSource": number
   },
   "FilesPrepared": number,
   "FilesSkipped": number,
   "FilesTransferred": number,
   "FilesVerified": number,
   "FoldersDeleted": number,
   "FoldersFailed": { 
      "Delete": number,
      "List": number,
      "Prepare": number,
      "Transfer": number,
      "Verify": number
   },
   "FoldersListed": { 
      "AtDestinationForDelete": number,
      "AtSource": number
   },
   "FoldersPrepared": number,
   "FoldersSkipped": number,
   "FoldersTransferred": number,
   "FoldersVerified": number,
   "Includes": [ 
      { 
         "FilterType": "string",
         "Value": "string"
      }
   ],
   "LaunchTime": number,
   "ManifestConfig": { 
      "Action": "string",
      "Format": "string",
      "Source": { 
         "S3": { 
            "BucketAccessRoleArn": "string",
            "ManifestObjectPath": "string",
            "ManifestObjectVersionId": "string",
            "S3BucketArn": "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"
   },
   "ReportResult": { 
      "ErrorCode": "string",
      "ErrorDetail": "string",
      "Status": "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",
   "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"
   }
}
```

## 回應元素
<a name="API_DescribeTaskExecution_ResponseElements"></a>

如果動作成功，則服務傳回 HTTP 200 回應。

服務會傳回下列 JSON 格式的資料。

 ** [BytesCompressed](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-BytesCompressed"></a>
DataSync 在壓縮後透過網路傳輸的實體位元組數 （如果可以壓縮）。除非資料無法壓縮，否則此數字通常小於 [BytesTransferred](https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-BytesTransferred)。  
類型：Long

 ** [BytesTransferred](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-BytesTransferred"></a>
DataSync 在壓縮之前傳送到網路的位元組數 （如果可以壓縮）。如需透過網路傳輸的位元組數，請參閱 [BytesCompressed](https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-BytesCompressed)。  
類型：Long

 ** [BytesWritten](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-BytesWritten"></a>
DataSync 實際寫入目的地位置的邏輯位元組數目。  
類型：Long

 ** [EndTime](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-EndTime"></a>
傳輸任務結束的時間。  
類型：Timestamp

 ** [EstimatedBytesToTransfer](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-EstimatedBytesToTransfer"></a>
DataSync 預期寫入目的地位置的邏輯位元組數。  
類型：Long

 ** [EstimatedFilesToDelete](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-EstimatedFilesToDelete"></a>
DataSync 預期在您的目的地位置刪除的檔案、物件和目錄數量。如果您未設定任務來[刪除目的地中不在來源中的資料](https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html)，則值一律為 `0`。  
對於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)，此計數器僅包含檔案或物件。目錄會在 [EstimatedFoldersToDelete](https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-EstimatedFoldersToDelete) 中計數。
類型：Long

 ** [EstimatedFilesToTransfer](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-EstimatedFilesToTransfer"></a>
DataSync 預期透過網路傳輸的檔案、物件和目錄數量。此值會在 DataSync [準備](https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses)傳輸時計算。  
計算方式主要取決於任務的[傳輸模式](https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-TransferMode)組態：  
+ 如果 `TranserMode` 設定為 `CHANGED` - 計算是根據比較來源和目的地位置的內容，並判斷需要傳輸的差異。差異可能包括：
  + 在來源位置新增或修改的任何項目。
  + 在初始傳輸後，位於兩個位置且於目的地修改的任何內容 （除非 [OverwriteMode](https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-OverwriteMode) 設定為 `NEVER`)。
  +  **（僅限基本任務模式）** DataSync 預期刪除的項目數量 （如果 [PreserveDeletedFiles](https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-PreserveDeletedFiles) 設定為 `REMOVE`)。
+ 如果 `TranserMode` 設定為 `ALL` - 計算僅根據 DataSync 在來源位置找到的項目。
對於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)，此計數器僅包含檔案或物件。目錄在 [EstimatedFoldersToTransfer](https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-EstimatedFoldersToTransfer) 中計數。
類型：Long

 ** [EstimatedFoldersToDelete](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-EstimatedFoldersToDelete"></a>
DataSync 預期在您的目的地位置刪除的目錄數量。如果您未將任務設定為[刪除目的地中不在來源中的資料](https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html)，則值一律為 `0`。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：Long

 ** [EstimatedFoldersToTransfer](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-EstimatedFoldersToTransfer"></a>
DataSync 預期透過網路傳輸的目錄數量。此值的計算方式為 DataSync [準備要傳輸的](https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses)目錄。  
計算方式主要取決於任務的[傳輸模式](https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-TransferMode)組態：  
+ 如果 `TranserMode` 設定為 `CHANGED` - 計算是根據比較來源和目的地位置的內容，並判斷需要傳輸的差異。差異可能包括：
  + 在來源位置新增或修改的任何項目。
  + 在初始傳輸後，位於兩個位置且於目的地修改的任何項目 （除非 [OverwriteMode](https://docs.aws.amazon.com/datasync/latest/userguide/API_Options.html#DataSync-Type-Options-OverwriteMode) 設定為 `NEVER`)。
+ 如果 `TranserMode` 設定為 `ALL` - 計算僅根據 DataSync 在來源位置找到的項目。
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：Long

 ** [Excludes](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-Excludes"></a>
在傳輸期間排除特定資料的篩選條件規則清單。如需詳細資訊和範例，請參閱[篩選 DataSync 傳輸的資料](https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html)。  
類型：[FilterRule](API_FilterRule.md) 物件陣列  
陣列成員：項目數下限為 0。項目數上限為 1。

 ** [FilesDeleted](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FilesDeleted"></a>
DataSync 在您目的地位置中實際刪除的檔案、物件和目錄數量。如果您未將任務設定為[刪除目的地中不在來源中的資料](https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html)，則值一律為 `0`。  
對於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)，此計數器僅包含檔案或物件。目錄會在 [FoldersDeleted](https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-FoldersDeleted) 中計數。
類型：Long

 ** [FilesFailed](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FilesFailed"></a>
DataSync 在任務執行期間無法準備、傳輸、驗證和刪除的檔案或物件數量。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：[TaskExecutionFilesFailedDetail](API_TaskExecutionFilesFailedDetail.md) 物件

 ** [FilesListed](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FilesListed"></a>
DataSync 在您的位置找到的檔案或物件數量。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：[TaskExecutionFilesListedDetail](API_TaskExecutionFilesListedDetail.md) 物件

 ** [FilesPrepared](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FilesPrepared"></a>
在比較來源和目的地位置之後，DataSync 將嘗試傳輸的檔案或物件數量。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
如果您將任務設定為[傳輸所有資料](https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html#task-option-transfer-mode)，則此計數器不適用。在這種情況下，DataSync 會將來源的所有內容複製到目的地，而不會比較位置之間的差異。  
類型：Long

 ** [FilesSkipped](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FilesSkipped"></a>
DataSync 在傳輸期間略過的檔案、物件和目錄數量。  
對於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)，此計數器僅包含檔案或物件。目錄會在 [FoldersSkipped](https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-FoldersSkipped) 中計數。
類型：Long

 ** [FilesTransferred](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FilesTransferred"></a>
DataSync 透過網路實際傳輸的檔案、物件和目錄數量。當您的任務執行期間，從來源讀取物件並透過網路傳送時，此值會定期更新。  
如果 DataSync 無法傳輸某些內容，則此值可以小於 `EstimatedFilesToTransfer`。在某些情況下，此值也可以大於 `EstimatedFilesToTransfer`。此元素對於某些位置類型是特定的實作，因此請不要將其用作正在傳輸的內容或監控任務執行的確切指示。  
對於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)，此計數器僅包含檔案或物件。目錄會在 [FoldersTransferred](https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-FoldersTransferred) 中計數。
類型：Long

 ** [FilesVerified](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FilesVerified"></a>
DataSync 在您傳輸期間驗證的檔案、物件和目錄數量。  
當您將任務設定為[僅驗證已傳輸的資料](https://docs.aws.amazon.com/datasync/latest/userguide/configure-data-verification-options.html)時，DataSync 在某些情況下不會驗證目錄或無法傳輸的檔案。  
對於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)，此計數器僅包含檔案或物件。目錄會在 [FoldersVerified](https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeTaskExecution.html#DataSync-DescribeTaskExecution-response-FoldersVerified) 中計數。
類型：Long

 ** [FoldersDeleted](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FoldersDeleted"></a>
DataSync 在您的目的地位置實際刪除的目錄數量。如果您未將任務設定為[刪除不在來源中的目的地中的資料](https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html)，則值一律為 `0`。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：Long

 ** [FoldersFailed](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FoldersFailed"></a>
DataSync 在任務執行期間無法列出、準備、傳輸、驗證和刪除的目錄數量。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：[TaskExecutionFoldersFailedDetail](API_TaskExecutionFoldersFailedDetail.md) 物件

 ** [FoldersListed](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FoldersListed"></a>
DataSync 在您的位置找到的目錄數量。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：[TaskExecutionFoldersListedDetail](API_TaskExecutionFoldersListedDetail.md) 物件

 ** [FoldersPrepared](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FoldersPrepared"></a>
在比較來源和目的地位置之後，DataSync 將嘗試傳輸的目錄數量。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
如果您將任務設定為[傳輸所有資料](https://docs.aws.amazon.com/datasync/latest/userguide/configure-metadata.html#task-option-transfer-mode)，則此計數器不適用。在這種情況下，DataSync 會將來源的所有內容複製到目的地，而不會比較位置之間的差異。  
類型：Long

 ** [FoldersSkipped](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FoldersSkipped"></a>
DataSync 在傳輸期間略過的目錄數量。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：Long

 ** [FoldersTransferred](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FoldersTransferred"></a>
DataSync 透過網路實際傳輸的目錄數量。當您的任務執行期間，從來源讀取物件並透過網路傳送時，此值會定期更新。  
如果 DataSync 無法傳輸某些內容，則此值可以小於 `EstimatedFoldersToTransfer`。在某些情況下，此值也可以大於 `EstimatedFoldersToTransfer`。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：Long

 ** [FoldersVerified](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-FoldersVerified"></a>
DataSync 在您傳輸期間驗證的目錄數量。  
僅適用於[增強型模式任務](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。
類型：Long

 ** [Includes](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-Includes"></a>
在傳輸期間包含特定資料的篩選條件規則清單。如需詳細資訊和範例，請參閱[篩選 DataSync 傳輸的資料](https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html)。  
類型：[FilterRule](API_FilterRule.md) 物件陣列  
陣列成員：項目數下限為 0。項目數上限為 1。

 ** [LaunchTime](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-LaunchTime"></a>
任務執行實際開始的時間。對於未排入佇列的任務， `LaunchTime`和 `StartTime` 通常相同。對於排入佇列的任務， `LaunchTime` 通常晚於 ，`StartTime`因為先前排入佇列的任務必須先完成執行，才能開始較新的任務。  
類型：Timestamp

 ** [ManifestConfig](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-ManifestConfig"></a>
列出要傳輸之檔案或物件的資訊清單組態。如需詳細資訊，請參閱[使用資訊清單指定 DataSync 傳輸的內容](https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html)。  
類型：[ManifestConfig](API_ManifestConfig.md) 物件

 ** [Options](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-Options"></a>
指出傳輸任務的設定方式。這些選項包括 DataSync 如何在傳輸期間處理檔案、物件及其相關聯的中繼資料。您也可以指定如何驗證資料完整性、設定任務的頻寬限制，以及其他選項。  
每個選項都有預設值。除非需要，否則您不需要在呼叫 [StartTaskExecution](https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html) 之前設定任何選項。  
您也可以覆寫每個任務執行的任務選項。例如，您可能想要調整個別執行`LogLevel`的 。  
類型：[Options](API_Options.md) 物件

 ** [ReportResult](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-ReportResult"></a>
指出 DataSync 是否為您的傳輸產生完整的[任務報告](https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html)。  
類型：[ReportResult](API_ReportResult.md) 物件

 ** [Result](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-Result"></a>
任務執行的結果。  
類型：[TaskExecutionResultDetail](API_TaskExecutionResultDetail.md) 物件

 ** [StartTime](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-StartTime"></a>
DataSync 傳送啟動任務執行請求的時間。對於未佇列的任務， `LaunchTime`和 `StartTime` 通常相同。對於排入佇列的任務， `LaunchTime` 通常晚於 ，`StartTime`因為先前排入佇列的任務必須先完成執行，才能開始較新的任務。  
類型：Timestamp

 ** [Status](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-Status"></a>
任務執行的狀態。  
如需任務執行狀態的詳細資訊，請參閱[任務執行狀態](https://docs.aws.amazon.com/datasync/latest/userguide/run-task.html#understand-task-execution-statuses)。  
類型：字串  
有效值:`QUEUED | CANCELLING | LAUNCHING | PREPARING | TRANSFERRING | VERIFYING | SUCCESS | ERROR` 

 ** [TaskExecutionArn](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-TaskExecutionArn"></a>
您希望取得相關資訊之任務執行的 ARN。 `TaskExecutionArn`是階層式，並`TaskArn`包含所執行任務的 。  
例如，具有 ARN `TaskExecution`的值會使用 ARN `arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b`執行任務`arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2`。  
類型：字串  
長度限制：長度上限為 128。  
模式：`^arn:(aws|aws-cn|aws-us-gov|aws-eusc|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}$`

 ** [TaskMode](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-TaskMode"></a>
您使用的任務模式。如需詳細資訊，請參閱[為您的資料傳輸選擇任務模式](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html)。  
類型：字串  
有效值:`BASIC | ENHANCED` 

 ** [TaskReportConfig](#API_DescribeTaskExecution_ResponseSyntax) **   <a name="DataSync-DescribeTaskExecution-response-TaskReportConfig"></a>
任務報告的組態，可提供有關 DataSync 傳輸的詳細資訊。如需詳細資訊，請參閱[建立任務報告](https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html)。  
類型：[TaskReportConfig](API_TaskReportConfig.md) 物件

## 錯誤
<a name="API_DescribeTaskExecution_Errors"></a>

如需所有動作常見錯誤的資訊，請參閱[常見錯誤](CommonErrors.md)。

 ** InternalException **   
當服務發生錯誤時，就會擲出此 AWS DataSync 例外狀況。  
HTTP 狀態碼：500

 ** InvalidRequestException **   
當用戶端提交格式不正確的請求時，會擲回此例外狀況。  
HTTP 狀態碼：400

## 範例
<a name="API_DescribeTaskExecution_Examples"></a>

### 請求範例
<a name="API_DescribeTaskExecution_Example_1"></a>

此範例說明 `DescribeTaskExecution`請求。

```
{
    "TaskExecutionArn": "arn:aws:datasync:us-east-1:111222333444:task/task-aaaabbbbccccddddf/execution/exec-1234abcd1234abcd1"
}
```

### 增強型模式任務執行的回應 1 範例
<a name="API_DescribeTaskExecution_Example_2"></a>

下列範例說明使用增強模式的 DataSync 任務執行。執行也會使用排除和包含篩選條件來傳輸特定資料。

```
{
    "TaskExecutionArn": "arn:aws:datasync:us-east-1:111222333444:task/task-aaaabbbbccccddddf/execution/exec-1234abcd1234abcd1",
    "Status": "SUCCESS",
    "Options": {
        "VerifyMode": "ONLY_FILES_TRANSFERRED",
        "OverwriteMode": "ALWAYS",
        "Atime": "BEST_EFFORT",
        "Mtime": "PRESERVE",
        "Uid": "NONE",
        "Gid": "NONE",
        "PreserveDeletedFiles": "PRESERVE",
        "PreserveDevices": "NONE",
        "PosixPermissions": "NONE",
        "BytesPerSecond": -1,
        "TaskQueueing": "ENABLED",
        "LogLevel": "BASIC",
        "TransferMode": "CHANGED",
        "SecurityDescriptorCopyFlags": "NONE",
        "ObjectTags": "PRESERVE"
    },
    "Excludes": [{
        "FilterType": "SIMPLE_PATTERN",
        "Value": "/archive-files"
    }],
    "Includes": [{
        "FilterType": "SIMPLE_PATTERN",
        "Value": "/files"
    }],
    "StartTime": "2024-10-16T11:19:56.844000-04:00",
    "EstimatedFilesToTransfer": 7,
    "EstimatedFoldersToTransfer": 2,
    "EstimatedBytesToTransfer": 30,
    "FilesTransferred": 7,
    "FoldersTransferred": 2,
    "BytesWritten": 30,
    "BytesTransferred": 30,
    "BytesCompressed": 30,
    "Result": {
        "PrepareDuration": 0,
        "PrepareStatus": "SUCCESS",
        "TotalDuration": 3310,
        "TransferDuration": 0,
        "TransferStatus": "SUCCESS",
        "VerifyDuration": 0,
        "VerifyStatus": "SUCCESS"
    },
    "FilesDeleted": 0,
    "FilesSkipped": 0,
    "FilesVerified": 7,
    "EstimatedFilesToDelete": 0,
    "TaskMode": "ENHANCED",
    "FilesPrepared": 7,
    "FilesListed": {
        "AtSource": 7,
        "AtDestinationForDelete": 0
    },
    "FilesFailed": {
        "Prepare": 0,
        "Transfer": 0,
        "Verify": 0,
        "Delete": 0
    },
    "FoldersDeleted": 0,
    "FoldersSkipped": 0,
    "FoldersVerified": 2,
    "FoldersPrepared": 2,
    "FoldersListed": {
        "AtSource": 2,
        "AtDestinationForDelete": 0
    },
    "FoldersFailed": {
        "List": 0,
        "Prepare": 0,
        "Transfer": 0,
        "Verify": 0,
        "Delete": 0
    }
}
```

### 增強型模式任務執行的回應 2 範例
<a name="API_DescribeTaskExecution_Example_3"></a>

下列範例說明另一個使用增強模式的 DataSync 任務執行。在這種情況下，執行會使用資訊清單而非篩選條件來傳輸特定資料。

```
{
    "TaskExecutionArn": "arn:aws:datasync:us-east-1:111222333444:task/task-aaaabbbbccccddddf/execution/exec-1234abcd1234abcd1",
    "Status": "SUCCESS",
    "Options": {
        "VerifyMode": "ONLY_FILES_TRANSFERRED",
        "OverwriteMode": "ALWAYS",
        "Atime": "BEST_EFFORT",
        "Mtime": "PRESERVE",
        "Uid": "NONE",
        "Gid": "NONE",
        "PreserveDeletedFiles": "PRESERVE",
        "PreserveDevices": "NONE",
        "PosixPermissions": "NONE",
        "BytesPerSecond": -1,
        "TaskQueueing": "ENABLED",
        "LogLevel": "TRANSFER",
        "TransferMode": "CHANGED",
        "SecurityDescriptorCopyFlags": "NONE",
        "ObjectTags": "PRESERVE"
    },
    "Excludes": [],
    "Includes": [],
    "ManifestConfig": {
        "Action": "TRANSFER",
        "Format": "CSV",
        "S3AccessRoleArn": "arn:aws:iam::111222333444:role/service-role/DataSyncS3ManifestAccess",
        "S3Bucket": "arn:aws:s3:::manifests-datasync",
        "VersionId": "Ixs7NQzEOj8BkL9r4ywX2FtDh_cPf3mG",
        "Source": {
            "S3": {
                "ManifestObjectPath": "manifest-folder/manifest-versioned-files",
                "BucketAccessRoleArn": "arn:aws:iam::111222333444:role/my-manifest-role/DataSyncS3ManifestAccess",
                "S3BucketArn": "arn:aws:s3:::manifests-datasync",
                "ManifestObjectVersionId": "Ixs7NQzEOj8BkL9r4ywX2FtDh_cPf3mG"
            }
        }
    },
    "StartTime": "2024-10-16T09:29:56.757000-04:00",
    "EstimatedFilesToTransfer": 1,
    "EstimatedFoldersToTransfer": 0,
    "EstimatedBytesToTransfer": 6,
    "FilesTransferred": 1,
    "FoldersTransferred": 1,
    "BytesWritten": 6,
    "BytesTransferred": 6,
    "BytesCompressed": 6,
    "Result": {
        "PrepareDuration": 0,
        "PrepareStatus": "SUCCESS",
        "TotalDuration": 3089,
        "TransferDuration": 0,
        "TransferStatus": "SUCCESS",
        "VerifyDuration": 0,
        "VerifyStatus": "SUCCESS"
    },
    "TaskReportConfig": {
        "Destination": {
            "S3": {
                "Subdirectory": "reports/",
                "S3BucketArn": "arn:aws:s3:::my-task-report",
                "BucketAccessRoleArn": "arn:aws:iam::111222333444:role/my-task-report-role/DataSyncTaskReportS3BucketAccess"
            }
        },
        "OutputType": "STANDARD",
        "ReportLevel": "SUCCESSES_AND_ERRORS",
        "ObjectVersionIds": "INCLUDE"
    },
    "FilesDeleted": 0,
    "FilesSkipped": 0,
    "FilesVerified": 1,
    "ReportResult": {
        "Status": "SUCCESS"
    },
    "EstimatedFilesToDelete": 0,
    "TaskMode": "ENHANCED",
    "FilesPrepared": 1,
    "FilesListed": {
        "AtSource": 1,
        "AtDestinationForDelete": 0
    },
    "FilesFailed": {
        "Prepare": 0,
        "Transfer": 0,
        "Verify": 0,
        "Delete": 0
    },
    "FoldersDeleted": 0,
    "FoldersSkipped": 0,
    "FoldersVerified": 0,
    "FoldersPrepared": 0,
    "FoldersListed": {
        "AtSource": 0,
        "AtDestinationForDelete": 0
    },
    "FoldersFailed": {
        "List": 0,
        "Prepare": 0,
        "Transfer": 0,
        "Verify": 0,
        "Delete": 0
    }
  }
```

### 基本模式任務執行的範例回應
<a name="API_DescribeTaskExecution_Example_4"></a>

下列範例說明使用基本模式的 DataSync 任務執行。

```
{
    "TaskExecutionArn": "arn:aws:datasync:us-east-1:111222333444:task/task-aaaabbbbccccddddf/execution/exec-1234abcd1234abcd1",
    "BytesCompressed": 3500,
    "BytesTransferred": 5000,
    "BytesWritten": 5000,
    "EstimatedBytesToTransfer": 5000,
    "EstimatedFilesToDelete": 10,
    "EstimatedFilesToTransfer": 100,
    "FilesDeleted": 10,
    "FilesSkipped": 0,
    "FilesTransferred": 100,
    "FilesVerified": 100,
    "Result": {
        "PrepareDuration": 100,
        "PrepareStatus": "SUCCESS",
        "TransferDuration": 60,
        "TransferStatus": "SUCCESS",
        "VerifyDuration": 30,
        "VerifyStatus": "SUCCESS"
    },
    "StartTime": "2024-10-16T11:19:56.844000-04:00",
    "Status": "SUCCESS",
    "OverrideOptions": {
        "Atime": "BEST_EFFORT",
        "BytesPerSecond": "1000",
        "Gid": "NONE",
        "Mtime": "PRESERVE",
        "PosixPermissions": "PRESERVE",
        "PreserveDeletedFiles": "PRESERVE",
        "Uid": "NONE",
        "VerifyMode": "POINT_IN_TIME_CONSISTENT"
    },
    "TaskReportConfig": {
        "Destination": {
            "S3": {
                "BucketAccessRoleArn": "arn:aws:iam::111222333444:role/my-datasync-role",
                "S3BucketArn": "arn:aws:s3:::my-task-reports-bucket/*",
                "Subdirectory": "reports"
            }
        },
        "ObjectVersionIds": "INCLUDE",
        "OutputType": "STANDARD",
        "Overrides": {
            "Deleted": {
                "ReportLevel": "ERRORS_ONLY"
            },
            "Skipped": {
                "ReportLevel": "SUCCESSES_AND_ERRORS"
            },
            "Transferred": {
                "ReportLevel": "ERRORS_ONLY"
            },
            "Verified": {
                "ReportLevel": "ERRORS_ONLY"
            }
        },
        "ReportLevel": "ERRORS_ONLY"
    }
}
```

## 另請參閱
<a name="API_DescribeTaskExecution_SeeAlso"></a>

如需在其中一種語言特定 AWS SDKs中使用此 API 的詳細資訊，請參閱下列內容：
+  [AWS 命令列界面 V2](https://docs.aws.amazon.com/goto/cli2/datasync-2018-11-09/DescribeTaskExecution) 
+  [AWS 適用於 .NET V4 的 SDK](https://docs.aws.amazon.com/goto/DotNetSDKV4/datasync-2018-11-09/DescribeTaskExecution) 
+  [AWS 適用於 C\$1\$1 的 SDK](https://docs.aws.amazon.com/goto/SdkForCpp/datasync-2018-11-09/DescribeTaskExecution) 
+  [AWS 適用於 Go 的 SDK v2](https://docs.aws.amazon.com/goto/SdkForGoV2/datasync-2018-11-09/DescribeTaskExecution) 
+  [AWS 適用於 Java V2 的 SDK](https://docs.aws.amazon.com/goto/SdkForJavaV2/datasync-2018-11-09/DescribeTaskExecution) 
+  [AWS 適用於 JavaScript V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/datasync-2018-11-09/DescribeTaskExecution) 
+  [AWS 適用於 Kotlin 的 SDK](https://docs.aws.amazon.com/goto/SdkForKotlin/datasync-2018-11-09/DescribeTaskExecution) 
+  [AWS 適用於 PHP V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForPHPV3/datasync-2018-11-09/DescribeTaskExecution) 
+  [AWS 適用於 Python 的 SDK](https://docs.aws.amazon.com/goto/boto3/datasync-2018-11-09/DescribeTaskExecution) 
+  [AWS 適用於 Ruby V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForRubyV3/datasync-2018-11-09/DescribeTaskExecution) 