

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

# GetBackupPlan
<a name="API_GetBackupPlan"></a>

傳回指定 `BackupPlanId` 的 `BackupPlan` 詳細資訊。詳細資料是 JSON 格式的備份計畫內文，並包括計畫中繼資料。

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

```
GET /backup/plans/backupPlanId/?MaxScheduledRunsPreview=MaxScheduledRunsPreview&versionId=VersionId HTTP/1.1
```

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

請求會使用下列 URI 參數。

 ** [backupPlanId](#API_GetBackupPlan_RequestSyntax) **   <a name="Backup-GetBackupPlan-request-uri-BackupPlanId"></a>
唯一識別備份計畫。  
必要：是

 ** [MaxScheduledRunsPreview](#API_GetBackupPlan_RequestSyntax) **   <a name="Backup-GetBackupPlan-request-uri-MaxScheduledRunsPreview"></a>
要預覽的未來排程備份執行數目。設為 0 （預設） 時，回應中不會包含排定的執行預覽。有效範圍為 0-10。  
有效範圍：最小值為 0。最大值為 10。

 ** [VersionId](#API_GetBackupPlan_RequestSyntax) **   <a name="Backup-GetBackupPlan-request-uri-VersionId"></a>
唯一隨機產生的 Unicode、UTF-8 編碼字串，最長 1,024 個位元組。版本 ID 不能編輯。

## 請求主體
<a name="API_GetBackupPlan_RequestBody"></a>

請求沒有請求主體。

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

```
HTTP/1.1 200
Content-type: application/json

{
   "AdvancedBackupSettings": [ 
      { 
         "BackupOptions": { 
            "string" : "string" 
         },
         "ResourceType": "string"
      }
   ],
   "BackupPlan": { 
      "AdvancedBackupSettings": [ 
         { 
            "BackupOptions": { 
               "string" : "string" 
            },
            "ResourceType": "string"
         }
      ],
      "BackupPlanName": "string",
      "Rules": [ 
         { 
            "CompletionWindowMinutes": number,
            "CopyActions": [ 
               { 
                  "DestinationBackupVaultArn": "string",
                  "Lifecycle": { 
                     "DeleteAfterDays": number,
                     "DeleteAfterEvent": "string",
                     "MoveToColdStorageAfterDays": number,
                     "OptInToArchiveForSupportedResources": boolean
                  }
               }
            ],
            "EnableContinuousBackup": boolean,
            "IndexActions": [ 
               { 
                  "ResourceTypes": [ "string" ]
               }
            ],
            "Lifecycle": { 
               "DeleteAfterDays": number,
               "DeleteAfterEvent": "string",
               "MoveToColdStorageAfterDays": number,
               "OptInToArchiveForSupportedResources": boolean
            },
            "RecoveryPointTags": { 
               "string" : "string" 
            },
            "RuleId": "string",
            "RuleName": "string",
            "ScanActions": [ 
               { 
                  "MalwareScanner": "string",
                  "ScanMode": "string"
               }
            ],
            "ScheduleExpression": "string",
            "ScheduleExpressionTimezone": "string",
            "StartWindowMinutes": number,
            "TargetBackupVaultName": "string",
            "TargetLogicallyAirGappedBackupVaultArn": "string"
         }
      ],
      "ScanSettings": [ 
         { 
            "MalwareScanner": "string",
            "ResourceTypes": [ "string" ],
            "ScannerRoleArn": "string"
         }
      ]
   },
   "BackupPlanArn": "string",
   "BackupPlanId": "string",
   "CreationDate": number,
   "CreatorRequestId": "string",
   "DeletionDate": number,
   "LastExecutionDate": number,
   "ScheduledRunsPreview": [ 
      { 
         "ExecutionTime": number,
         "RuleExecutionType": "string",
         "RuleId": "string"
      }
   ],
   "VersionId": "string"
}
```

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

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

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

 ** [AdvancedBackupSettings](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-AdvancedBackupSettings"></a>
包含每種資源類型的 `BackupOptions` 清單。只有在為備份計畫設定進階選項時，才會填入清單。  
類型：[AdvancedBackupSetting](API_AdvancedBackupSetting.md) 物件陣列

 ** [BackupPlan](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-BackupPlan"></a>
指定備份計畫的內文。包括一個 `BackupPlanName` 和一或多組 `Rules`。  
類型：[BackupPlan](API_BackupPlan.md) 物件

 ** [BackupPlanArn](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-BackupPlanArn"></a>
可唯一識別備份計畫的 Amazon Resource Name (ARN)，例如 `arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50`。  
類型：字串

 ** [BackupPlanId](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-BackupPlanId"></a>
唯一識別備份計畫。  
類型：字串

 ** [CreationDate](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-CreationDate"></a>
建立備份計畫時的日期和時間，以 Unix 格式和國際標準時間 (UTC) 顯示。`CreationDate` 的值精確到毫秒。例如，值 1516925490.087 代表 2018 年 1 月 26 日星期五上午 12 點 11 分 30.087 秒。  
類型：Timestamp

 ** [CreatorRequestId](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-CreatorRequestId"></a>
可識別請求的唯一字串，且允許重試失敗的請求，而不會有兩次執行操作的風險。  
類型：字串

 ** [DeletionDate](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-DeletionDate"></a>
刪除備份計畫時的日期和時間，以 Unix 格式和國際標準時間 (UTC) 顯示。`DeletionDate` 的值精確到毫秒。例如，值 1516925490.087 代表 2018 年 1 月 26 日星期五上午 12 點 11 分 30.087 秒。  
類型：Timestamp

 ** [LastExecutionDate](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-LastExecutionDate"></a>
上次執行此備份計畫的時間。日期和時間，以 Unix 格式和國際標準時間 (UTC) 顯示。`LastExecutionDate` 的值精確到毫秒。例如，值 1516925490.087 代表 2018 年 1 月 26 日星期五上午 12 點 11 分 30.087 秒。  
類型：Timestamp

 ** [ScheduledRunsPreview](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-ScheduledRunsPreview"></a>
近期排程備份執行的清單。僅在`MaxScheduledRunsPreview`參數大於 0 時包含。包含最多 10 個未來的備份執行及其排程時間、執行類型和關聯的規則 IDs。  
類型：[ScheduledPlanExecutionMember](API_ScheduledPlanExecutionMember.md) 物件陣列

 ** [VersionId](#API_GetBackupPlan_ResponseSyntax) **   <a name="Backup-GetBackupPlan-response-VersionId"></a>
唯一隨機產生的 Unicode、UTF-8 編碼字串，最長 1,024 個位元組。版本 ID 不能編輯。  
類型：字串

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

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

 ** InvalidParameterValueException **   
表示參數的值出現問題。例如，值超出範圍。    
 ** Context **   
  
 ** Type **   

HTTP 狀態碼：400

 ** MissingParameterValueException **   
表示缺少必要的參數。    
 ** Context **   
  
 ** Type **   

HTTP 狀態碼：400

 ** ResourceNotFoundException **   
動作所需的資源不存在。    
 ** Context **   
  
 ** Type **   

HTTP 狀態碼：400

 ** ServiceUnavailableException **   
由於伺服器發生臨時故障，請求失敗。    
 ** Context **   
  
 ** Type **   

HTTP 狀態碼：500

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

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