report_plans
Creates, updates, deletes or gets a report_plan
resource or lists report_plans
in a region
Overview
Name | report_plans |
Type | Resource |
Description | Contains detailed information about a report plan in AWS Backup Audit Manager. |
Id | aws.backup.report_plans |
Fields
Name | Datatype | Description |
---|---|---|
report_plan_name | string | The unique name of the report plan. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_). |
report_plan_arn | string | An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type. |
report_plan_description | string | An optional description of the report plan with a maximum of 1,024 characters. |
report_plan_tags | array | Metadata that you can assign to help organize the report plans that you create. Each tag is a key-value pair. |
report_delivery_channel | object | A structure that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports. |
report_setting | object | Identifies the report template for the report. Reports are built using a report template. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ReportDeliveryChannel, ReportSetting, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all report_plans
in a region.
SELECT
region,
report_plan_name,
report_plan_arn,
report_plan_description,
report_plan_tags,
report_delivery_channel,
report_setting
FROM aws.backup.report_plans
WHERE region = 'us-east-1';
Gets all properties from an individual report_plan
.
SELECT
region,
report_plan_name,
report_plan_arn,
report_plan_description,
report_plan_tags,
report_delivery_channel,
report_setting
FROM aws.backup.report_plans
WHERE region = 'us-east-1' AND data__Identifier = '<ReportPlanArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new report_plan
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.backup.report_plans (
ReportDeliveryChannel,
ReportSetting,
region
)
SELECT
'{{ ReportDeliveryChannel }}',
'{{ ReportSetting }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.backup.report_plans (
ReportPlanName,
ReportPlanDescription,
ReportPlanTags,
ReportDeliveryChannel,
ReportSetting,
region
)
SELECT
'{{ ReportPlanName }}',
'{{ ReportPlanDescription }}',
'{{ ReportPlanTags }}',
'{{ ReportDeliveryChannel }}',
'{{ ReportSetting }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: report_plan
props:
- name: ReportPlanName
value: '{{ ReportPlanName }}'
- name: ReportPlanDescription
value: '{{ ReportPlanDescription }}'
- name: ReportPlanTags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: ReportDeliveryChannel
value:
Formats:
- '{{ Formats[0] }}'
S3BucketName: '{{ S3BucketName }}'
S3KeyPrefix: '{{ S3KeyPrefix }}'
- name: ReportSetting
value:
ReportTemplate: '{{ ReportTemplate }}'
FrameworkArns:
- '{{ FrameworkArns[0] }}'
Accounts:
- '{{ Accounts[0] }}'
OrganizationUnits:
- '{{ OrganizationUnits[0] }}'
Regions:
- '{{ Regions[0] }}'
DELETE
example
/*+ delete */
DELETE FROM aws.backup.report_plans
WHERE data__Identifier = '<ReportPlanArn>'
AND region = 'us-east-1';
Permissions
To operate on the report_plans
resource, the following permissions are required:
Create
backup:CreateReportPlan,
backup:DescribeReportPlan,
backup:ListTags,
backup:TagResource,
iam:CreateServiceLinkedRole
Read
backup:DescribeReportPlan,
backup:ListTags
Update
backup:DescribeReportPlan,
backup:UpdateReportPlan,
backup:ListTags,
backup:UntagResource,
backup:TagResource
Delete
backup:DeleteReportPlan,
backup:DescribeReportPlan
List
backup:ListReportPlans