Skip to main content

report_definitions

Creates, updates, deletes or gets a report_definition resource or lists report_definitions in a region

Overview

Namereport_definitions
TypeResource
DescriptionThe AWS::CUR::ReportDefinition resource creates a Cost & Usage Report with user-defined settings. You can use this resource to define settings like time granularity (hourly, daily, monthly), file format (Parquet, CSV), and S3 bucket for delivery of these reports.
Idaws.cur.report_definitions

Fields

NameDatatypeDescription
report_namestringThe name of the report that you want to create. The name must be unique, is case sensitive, and can't include spaces.
time_unitstringThe granularity of the line items in the report.
formatstringThe format that AWS saves the report in.
compressionstringThe compression format that AWS uses for the report.
additional_schema_elementsarrayA list of strings that indicate additional content that Amazon Web Services includes in the report, such as individual resource IDs.
s3_bucketstringThe S3 bucket where AWS delivers the report.
s3_prefixstringThe prefix that AWS adds to the report name when AWS delivers the report. Your prefix can't include spaces.
s3_regionstringThe region of the S3 bucket that AWS delivers the report into.
additional_artifactsarrayA list of manifests that you want Amazon Web Services to create for this report.
refresh_closed_reportsbooleanWhether you want Amazon Web Services to update your reports after they have been finalized if Amazon Web Services detects charges related to previous months. These charges can include refunds, credits, or support fees.
report_versioningstringWhether you want Amazon Web Services to overwrite the previous version of each report or to deliver the report in addition to the previous versions.
billing_view_arnstringThe Amazon resource name of the billing view. You can get this value by using the billing view service public APIs.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTReportName, TimeUnit, Format, Compression, S3Bucket, S3Prefix, S3Region, RefreshClosedReports, ReportVersioning, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all report_definitions in a region.

SELECT
region,
report_name,
time_unit,
format,
compression,
additional_schema_elements,
s3_bucket,
s3_prefix,
s3_region,
additional_artifacts,
refresh_closed_reports,
report_versioning,
billing_view_arn
FROM aws.cur.report_definitions
WHERE region = 'us-east-1';

Gets all properties from an individual report_definition.

SELECT
region,
report_name,
time_unit,
format,
compression,
additional_schema_elements,
s3_bucket,
s3_prefix,
s3_region,
additional_artifacts,
refresh_closed_reports,
report_versioning,
billing_view_arn
FROM aws.cur.report_definitions
WHERE region = 'us-east-1' AND data__Identifier = '<ReportName>';

INSERT example

Use the following StackQL query and manifest file to create a new report_definition resource, using stack-deploy.

/*+ create */
INSERT INTO aws.cur.report_definitions (
ReportName,
TimeUnit,
Format,
Compression,
S3Bucket,
S3Prefix,
S3Region,
RefreshClosedReports,
ReportVersioning,
region
)
SELECT
'{{ ReportName }}',
'{{ TimeUnit }}',
'{{ Format }}',
'{{ Compression }}',
'{{ S3Bucket }}',
'{{ S3Prefix }}',
'{{ S3Region }}',
'{{ RefreshClosedReports }}',
'{{ ReportVersioning }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.cur.report_definitions
WHERE data__Identifier = '<ReportName>'
AND region = 'us-east-1';

Permissions

To operate on the report_definitions resource, the following permissions are required:

Create

cur:PutReportDefinition,
cur:DescribeReportDefinitions

Read

cur:DescribeReportDefinitions

Update

cur:DescribeReportDefinitions,
cur:ModifyReportDefinition

Delete

cur:DeleteReportDefinition

List

cur:DescribeReportDefinitions