Skip to main content

report_definitions

Creates, updates, deletes, gets or lists a report_definitions resource.

Overview

Namereport_definitions
TypeResource
Idaws.cur.report_definitions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
additional_artifactsarrayA list of manifests that you want Amazon Web Services to create for this report.
additional_schema_elementsarrayA list of strings that indicate additional content that Amazon Web Services includes in the report, such as individual resource IDs.
billing_view_arnstringThe Amazon resource name of the billing view. The BillingViewArn is needed to create Amazon Web Services Cost and Usage Report for each billing group maintained in the Amazon Web Services Billing Conductor service. The BillingViewArn for a billing group can be constructed as: arn:aws:billing::payer-account-id:billingview/billing-group-primary-account-id (pattern: <code>(arn:aws(-cn)?:billing::[0-9]{12}:billingview/)?[a-zA-Z0-9_+=.-@].{1,30}</code>)
compressionstringThe compression format that Amazon Web Services uses for the report. (ZIP, GZIP, Parquet)
formatstringThe format that Amazon Web Services saves the report in. (textORcsv, Parquet)
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_namestringThe name of the report that you want to create. The name must be unique, is case sensitive, and can't include spaces. (pattern: <code>[0-9A-Za-z!-_.*'()]+</code>)
report_statusobjectThe status of the report.
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. (CREATE_NEW_REPORT, OVERWRITE_REPORT)
s3_bucketstringThe S3 bucket where Amazon Web Services delivers the report. (pattern: <code>[A-Za-z0-9_.-]+</code>)
s3_prefixstringThe prefix that Amazon Web Services adds to the report name when Amazon Web Services delivers the report. Your prefix can't include spaces. (pattern: <code>[0-9A-Za-z!-_.'()/]</code>)
s3_regionstringThe region of the S3 bucket that Amazon Web Services delivers the report into. (af-south-1, ap-east-1, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-northeast-1, ap-northeast-2, ap-northeast-3, ca-central-1, eu-central-1, eu-central-2, eu-west-1, eu-west-2, eu-west-3, eu-north-1, eu-south-1, eu-south-2, me-central-1, me-south-1, sa-east-1, us-east-1, us-east-2, us-west-1, us-west-2, cn-north-1, cn-northwest-1)
time_unitstringThe length of time covered by the report. (HOURLY, DAILY, MONTHLY)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_report_definitionsselectregionLists the Amazon Web Services Cost and Usage Report available to this account.
modify_report_definitionupdateregion, ReportName, ReportDefinitionAllows you to programmatically update your report preferences.
put_report_definitionreplaceregion, ReportDefinitionCreates a new report using the description that you provide.
delete_report_definitiondeleteregionDeletes the specified report. Any tags associated with the report are also deleted.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Lists the Amazon Web Services Cost and Usage Report available to this account.

SELECT
additional_artifacts,
additional_schema_elements,
billing_view_arn,
compression,
format,
refresh_closed_reports,
report_name,
report_status,
report_versioning,
s3_bucket,
s3_prefix,
s3_region,
time_unit
FROM aws.cur.report_definitions
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Allows you to programmatically update your report preferences.

UPDATE aws.cur.report_definitions
SET
ReportName = '{{ ReportName }}',
ReportDefinition = '{{ ReportDefinition }}'
WHERE
region = '{{ region }}' --required
AND ReportName = '{{ ReportName }}' --required
AND ReportDefinition = '{{ ReportDefinition }}' --required;

REPLACE examples

Creates a new report using the description that you provide.

REPLACE aws.cur.report_definitions
SET
ReportDefinition = '{{ ReportDefinition }}',
Tags = '{{ Tags }}'
WHERE
region = '{{ region }}' --required
AND ReportDefinition = '{{ ReportDefinition }}' --required;

DELETE examples

Deletes the specified report. Any tags associated with the report are also deleted.

DELETE FROM aws.cur.report_definitions
WHERE region = '{{ region }}' --required
;