report_plans
Creates, updates, deletes, gets or lists a report_plans resource.
Overview
| Name | report_plans |
| Type | Resource |
| Id | aws.backup.report_plans |
Fields
The following fields are returned by SELECT queries:
- describe_report_plan
- list_report_plans
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The date and time that a report plan is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. |
deployment_status | string | The deployment status of a report plan. The statuses are: CREATE_IN_PROGRESS | UPDATE_IN_PROGRESS | DELETE_IN_PROGRESS | COMPLETED |
last_attempted_execution_time | string (date-time) | The date and time that a report job associated with this report plan last attempted to run, in Unix format and Coordinated Universal Time (UTC). The value of LastAttemptedExecutionTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. |
last_successful_execution_time | string (date-time) | The date and time that a report job associated with this report plan last successfully ran, in Unix format and Coordinated Universal Time (UTC). The value of LastSuccessfulExecutionTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. |
report_delivery_channel | object | Contains information from your report plan about where to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports. |
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 1,024 characters. (pattern: <code>.\S.</code>) |
report_plan_name | string | The unique name of the report plan. This name is between 1 and 256 characters starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_). (pattern: <code>[a-zA-Z][_a-zA-Z0-9]*</code>) |
report_setting | object | Contains detailed information about a report setting. |
| Name | Datatype | Description |
|---|---|---|
next_token | string | An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list. |
report_plans | array | The report plans with detailed information for each plan. This information includes the Amazon Resource Name (ARN), report plan name, description, settings, delivery channel, deployment status, creation time, and last times the report plan attempted to and successfully ran. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_report_plan | select | report_plan_name, region | Returns a list of all report plans for an Amazon Web Services account and Amazon Web Services Region. | |
list_report_plans | select | region | MaxResults, NextToken | Returns a list of your report plans. For detailed information about a single report plan, use DescribeReportPlan. |
create_report_plan | insert | region, ReportPlanName, ReportDeliveryChannel, ReportSetting | Creates a report plan. A report plan is a document that contains information about the contents of the report and where Backup will deliver it. If you call CreateReportPlan with a plan that already exists, you receive an AlreadyExistsException exception. | |
update_report_plan | update | report_plan_name, region | Updates the specified report plan. | |
delete_report_plan | delete | report_plan_name, region | Deletes the report plan specified by a report plan name. | |
start_report_job | exec | report_plan_name, region | Starts an on-demand report job for the specified report plan. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
report_plan_name | string | The unique name of a report plan. |
MaxResults | integer | The number of desired results from 1 to 1000. Optional. If unspecified, the query will return 1 MB of data. |
NextToken | string | An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list. |
SELECT examples
- describe_report_plan
- list_report_plans
Returns a list of all report plans for an Amazon Web Services account and Amazon Web Services Region.
SELECT
creation_time,
deployment_status,
last_attempted_execution_time,
last_successful_execution_time,
report_delivery_channel,
report_plan_arn,
report_plan_description,
report_plan_name,
report_setting
FROM aws.backup.report_plans
WHERE report_plan_name = '{{ report_plan_name }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of your report plans. For detailed information about a single report plan, use DescribeReportPlan.
SELECT
next_token,
report_plans
FROM aws.backup.report_plans
WHERE region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_report_plan
- Manifest
Creates a report plan. A report plan is a document that contains information about the contents of the report and where Backup will deliver it. If you call CreateReportPlan with a plan that already exists, you receive an AlreadyExistsException exception.
INSERT INTO aws.backup.report_plans (
ReportPlanName,
ReportPlanDescription,
ReportDeliveryChannel,
ReportSetting,
ReportPlanTags,
IdempotencyToken,
region
)
SELECT
'{{ ReportPlanName }}' /* required */,
'{{ ReportPlanDescription }}',
'{{ ReportDeliveryChannel }}' /* required */,
'{{ ReportSetting }}' /* required */,
'{{ ReportPlanTags }}',
'{{ IdempotencyToken }}',
'{{ region }}'
RETURNING
creation_time,
report_plan_arn,
report_plan_name
;
# Description fields are for documentation purposes
- name: report_plans
props:
- name: region
value: "{{ region }}"
description: Required parameter for the report_plans resource.
- name: ReportPlanName
value: "{{ ReportPlanName }}"
- name: ReportPlanDescription
value: "{{ ReportPlanDescription }}"
- name: ReportDeliveryChannel
description: |
Contains information from your report plan about where to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.
value:
S3BucketName: "{{ S3BucketName }}"
S3KeyPrefix: "{{ S3KeyPrefix }}"
Formats:
- "{{ Formats }}"
- name: ReportSetting
description: |
Contains detailed information about a report setting.
value:
ReportTemplate: "{{ ReportTemplate }}"
FrameworkArns:
- "{{ FrameworkArns }}"
NumberOfFrameworks: {{ NumberOfFrameworks }}
Accounts:
- "{{ Accounts }}"
OrganizationUnits:
- "{{ OrganizationUnits }}"
Regions:
- "{{ Regions }}"
- name: ReportPlanTags
value: "{{ ReportPlanTags }}"
- name: IdempotencyToken
value: "{{ IdempotencyToken }}"
UPDATE examples
- update_report_plan
Updates the specified report plan.
UPDATE aws.backup.report_plans
SET
ReportPlanDescription = '{{ ReportPlanDescription }}',
ReportDeliveryChannel = '{{ ReportDeliveryChannel }}',
ReportSetting = '{{ ReportSetting }}',
IdempotencyToken = '{{ IdempotencyToken }}'
WHERE
report_plan_name = '{{ report_plan_name }}' --required
AND region = '{{ region }}' --required
RETURNING
creation_time,
report_plan_arn,
report_plan_name;
DELETE examples
- delete_report_plan
Deletes the report plan specified by a report plan name.
DELETE FROM aws.backup.report_plans
WHERE report_plan_name = '{{ report_plan_name }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- start_report_job
Starts an on-demand report job for the specified report plan.
EXEC aws.backup.report_plans.start_report_job
@report_plan_name='{{ report_plan_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"IdempotencyToken": "{{ IdempotencyToken }}"
}'
;