

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# AWS Backup API를 사용하여 보고서 계획 생성
<a name="create-report-plan-api"></a>

프로그래밍 방식으로 보고서 계획을 사용할 수도 있습니다.

보고서에는 두 가지 유형이 있습니다. 첫 번째 유형은 지난 24시간 동안 완료된 작업과 모든 활성화된 작업을 보여주는 **작업 보고서**입니다. 두 번째 유형의 보고서는 **규정 준수 보고서**입니다. 규정 준수 보고서는 리소스 수준 또는 적용 중인 다양한 컨트롤을 모니터링할 수 있습니다. 보고서를 생성할 경우, 생성하려는 보고서 유형을 선택합니다.

**백업 계획과 마찬가지로, 보고서 생성을 자동화하고 해당 보고서의 대상 Amazon S3 버킷을 정의하는 **보고서 계획을 만듭니다. 보고서 계획에는 보고서를 수신할 S3 버킷이 있어야 합니다. 새 S3 버킷 설정에 대한 지침은 *Amazon Simple Storage Service 사용 설명서*의 [1단계: 첫 번째 S3 버킷 생성](https://docs.aws.amazon.com/AmazonS3/latest/userguide/GetStartedWithS3.html#creating-bucket)을 참조하세요.

사용자 지정 KMS 키를 사용하여 버킷을 암호화하는 경우 KMS 키 정책은 다음 요구 사항을 충족해야 합니다.
+ `Principal` 속성에는 Backup Audit Manager 서비스 연결 역할인 [https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/aws-service-role/AWSServiceRolePolicyForBackupReports](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/aws-service-role/AWSServiceRolePolicyForBackupReports) ARN이 포함되어야 합니다.
+ `Action` 속성에는 최소한 `kms:GenerateDataKey` 및 `kms:Decrypt`가 포함되어야 합니다.

 [AWSServiceRolePolicyForBackupReports](https://console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/aws-service-role/AWSServiceRolePolicyForBackupReports) 정책에는 이런 권한들이 있습니다.

단일 계정, 단일 리전 보고서의 경우 다음 구문을 사용하여 [CreateReportPlan](API_CreateReportPlan.md)을 호출합니다.

```
{
   "ReportPlanName": "string",
   "ReportPlanDescription": "string",
   "ReportSetting": {
        "ReportTemplate": enum, // Can be RESOURCE_COMPLIANCE_REPORT, CONTROL_COMPLIANCE_REPORT, BACKUP_JOB_REPORT, COPY_JOB_REPORT, or RESTORE_JOB_REPORT. Only include "ReportCoverageList" if your report is a COMPLIANCE_REPORT.
   "ReportDeliveryChannel": {
       "S3BucketName": "string",
       "S3KeyPrefix": "string",
       "Formats": [ enum ] // Optional. Can be either CSV, JSON, or both. Default is CSV if left blank.
   },
   "ReportPlanTags": { 
       "string" : "string" // Optional.
   },
   "IdempotencyToken": "string"
}
```

보고서 계획의 고유한 이름을 사용하여 [DescribeReportPlan](API_DescribeReportPlan.md)을 호출하면 AWS Backup API는 다음과 같은 정보로 응답합니다.

```
{
    "ReportPlanArn": "string",
    "ReportPlanName": "string",
    "ReportPlanDescription": "string",
    "ReportSetting": {
        "ReportTemplate": enum,
    },
    "ReportDeliveryChannel": {
        "S3BucketName": "string",
        "S3KeyPrefix": "string",
        "Formats": [ enum ]
    },
    "DeploymentStatus": enum
    "CreationTime": timestamp,
    "LastAttemptExecutionTime": timestamp,
    "LastSuccessfulExecutionTime": timestamp
}
```

다중 계정, 다중 리전 보고서의 경우 다음 구문을 사용하여 [CreateReportPlan](API_CreateReportPlan.md)을 호출합니다.

```
{
   "IdempotencyToken": "string",
   "ReportDeliveryChannel": { 
      "Formats": [ "string" ], *//Organization report only support CSV file*
      "S3BucketName": "string",
      "S3KeyPrefix": "string"
   },
   "ReportPlanDescription": "string",
   "ReportPlanName": "string",
   "ReportPlanTags": { 
      "string" : "string" 
   },
   "ReportSetting": { 
      "Accounts": [ "string" ], // Use string value of "ROOT" to include all organizational units
      "OrganizationUnits": [ "string" ],
      "Regions": ["string"], // Use wildcard value in string to include all Regions
      "FrameworkArns": [ "string" ],
      "NumberOfFrameworks": number,
      "ReportTemplate": "string"
   }
}
```

보고서 계획의 고유한 이름을 사용하여 [DescribeReportPlan](API_DescribeReportPlan.md)을 호출하면 AWS Backup API는 다중 계정, 다중 리전 계획에 대한 다음과 같은 정보로 응답합니다.

```
{
   "ReportPlan": { 
      "CreationTime": number,
      "DeploymentStatus": "string",
      "LastAttemptedExecutionTime": number,
      "LastSuccessfulExecutionTime": number,
      "ReportDeliveryChannel": { 
         "Formats": [ "string" ],
         "S3BucketName": "string",
         "S3KeyPrefix": "string"
      },
      "ReportPlanArn": "string",
      "ReportPlanDescription": "string",
      "ReportPlanName": "string",
      "ReportSetting": { 
         "Accounts":[ "string" ],
         "OrganizationUnits":[ "string" ],
         "Regions": [ "string" ], 
         "FrameworkArns": [ "string" ],
         "NumberOfFrameworks": number,
         "ReportTemplate": "string"
      }
   }
}
```