

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

# `AWS-ExportPatchReportToS3`
<a name="automation-aws-exportpatchreporttos3"></a>

 **Description** 

此 Runbook 會擷取修補程式管理員中的 AWS Systems Manager 修補程式摘要資料和修補程式詳細資訊清單，並將其匯出至指定 Amazon Simple Storage Service (Amazon S3) 儲存貯體中的 .csv 檔案。

 [執行此自動化 （主控台）](https://console.aws.amazon.com/systems-manager/automation/execute/AWS-ExportPatchReportToS3) 

**文件類型**

 自動化

**擁有者**

Amazon

**平台**

Linux、macOS、 Windows

**參數**
+  assumeRole 

  類型：字串

  描述：（必要） 允許 Systems Manager Automation 代表您執行動作的 (IAM) 角色的 AWS Identity and Access Management Amazon Resource Name (ARN)。如果未指定角色，Systems Manager Automation 會使用執行本文件之使用者的許可。
+ s3BucketName

  類型：字串

  描述：（必要） 您要下載輸出檔案的 S3 儲存貯體。
+ snsTopicArn

  類型：字串

  描述：（選用） 下載完成時要通知的 Amazon Simple Notification Service (Amazon SNS) 主題 Amazon Resource Name (ARN)。
+ snsSuccessMessage

  類型：字串

  描述：（選用） 執行手冊完成時要傳送的訊息文字。
+ targets

  類型：字串

  描述：（必要） 執行個體 ID 或萬用字元 (\*)，指出要報告特定執行個體或所有執行個體的修補程式資料。

 **文件步驟** 

 ExportReportStep – 此步驟的動作取決於 `targets` 參數的值。如果 `targets` 格式為 `instanceids=*` ，則 步驟會擷取您帳戶中執行個體最多 10，000 個修補程式摘要，並將資料匯出至 .csv 檔案。

 如果 `targets` 格式為 `instanceids=<instance-id>` ，則 步驟會擷取您帳戶中指定執行個體的修補程式摘要和所有修補程式，並將其匯出至 .csv 檔案。

 **輸出** 

PatchSummary/Patches 物件 – 如果執行手冊成功執行，匯出的修補程式報告物件會下載到您的目標 S3 儲存貯體。