report_definitions
Creates, updates, deletes, gets or lists a report_definitions resource.
Overview
| Name | report_definitions |
| Type | Resource |
| Id | aws.cur.report_definitions |
Fields
The following fields are returned by SELECT queries:
- describe_report_definitions
| Name | Datatype | Description |
|---|---|---|
additional_artifacts | array | A list of manifests that you want Amazon Web Services to create for this report. |
additional_schema_elements | array | A list of strings that indicate additional content that Amazon Web Services includes in the report, such as individual resource IDs. |
billing_view_arn | string | The 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>) |
compression | string | The compression format that Amazon Web Services uses for the report. (ZIP, GZIP, Parquet) |
format | string | The format that Amazon Web Services saves the report in. (textORcsv, Parquet) |
refresh_closed_reports | boolean | Whether 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_name | string | The 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_status | object | The status of the report. |
report_versioning | string | Whether 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_bucket | string | The S3 bucket where Amazon Web Services delivers the report. (pattern: <code>[A-Za-z0-9_.-]+</code>) |
s3_prefix | string | The 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_region | string | The 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_unit | string | The length of time covered by the report. (HOURLY, DAILY, MONTHLY) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_report_definitions | select | region | Lists the Amazon Web Services Cost and Usage Report available to this account. | |
modify_report_definition | update | region, ReportName, ReportDefinition | Allows you to programmatically update your report preferences. | |
put_report_definition | replace | region, ReportDefinition | Creates a new report using the description that you provide. | |
delete_report_definition | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_report_definitions
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
- modify_report_definition
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
- put_report_definition
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
- delete_report_definition
Deletes the specified report. Any tags associated with the report are also deleted.
DELETE FROM aws.cur.report_definitions
WHERE region = '{{ region }}' --required
;