report_definitions
Creates, updates, deletes, gets or lists a report_definitions resource.
Overview
| Name | report_definitions |
| Type | Resource |
| Id | aws.applicationcostprofiler.report_definitions |
Fields
The following fields are returned by SELECT queries:
- get_report_definition
- list_report_definitions
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | Timestamp (milliseconds) when this report definition was created. |
destination_s3_location | object | Amazon Simple Storage Service (Amazon S3) location where the report is uploaded. |
format_ | string | Format of the generated report. (CSV, PARQUET) |
last_updated | string (date-time) | Timestamp (milliseconds) when this report definition was last updated. |
report_description | string | Description of the report. (pattern: <code>.\S.</code>) |
report_frequency | string | Cadence used to generate the report. (MONTHLY, DAILY, ALL) |
report_id | string | ID of the report retrieved. (pattern: <code>^[0-9A-Za-z.-_]+$</code>) |
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | Timestamp (milliseconds) when this report definition was created. |
destination_s3_location | object | Represents the Amazon Simple Storage Service (Amazon S3) location where AWS Application Cost Profiler reports are generated and then written to. |
format_ | string | The format used for the generated reports. (CSV, PARQUET) |
last_updated_at | string (date-time) | Timestamp (milliseconds) when this report definition was last updated. |
report_description | string | Description of the report (pattern: <code>.\S.</code>) |
report_frequency | string | The cadence at which the report is generated. (MONTHLY, DAILY, ALL) |
report_id | string | The ID of the report. (pattern: <code>^[0-9A-Za-z.-_]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_report_definition | select | report_id, region | Retrieves the definition of a report already configured in AWS Application Cost Profiler. | |
list_report_definitions | select | region | nextToken, maxResults | Retrieves a list of all reports and their configurations for your AWS account. The maximum number of reports is one. |
update_report_definition | update | report_id, region, reportDescription, reportFrequency, format, destinationS3Location | Updates existing report in AWS Application Cost Profiler. | |
put_report_definition | replace | region, reportId, reportDescription, reportFrequency, format, destinationS3Location | Creates the report definition for a report in Application Cost Profiler. | |
delete_report_definition | delete | report_id, region | Deletes the specified report definition in AWS Application Cost Profiler. This stops the report from being generated. |
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_id | string | Required. ID of the report to delete. |
maxResults | integer | The maximum number of results to return. |
nextToken | string | The token value from a previous call to access the next page of results. |
SELECT examples
- get_report_definition
- list_report_definitions
Retrieves the definition of a report already configured in AWS Application Cost Profiler.
SELECT
created_at,
destination_s3_location,
format_,
last_updated,
report_description,
report_frequency,
report_id
FROM aws.applicationcostprofiler.report_definitions
WHERE report_id = '{{ report_id }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves a list of all reports and their configurations for your AWS account. The maximum number of reports is one.
SELECT
created_at,
destination_s3_location,
format_,
last_updated_at,
report_description,
report_frequency,
report_id
FROM aws.applicationcostprofiler.report_definitions
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
UPDATE examples
- update_report_definition
Updates existing report in AWS Application Cost Profiler.
UPDATE aws.applicationcostprofiler.report_definitions
SET
reportDescription = '{{ reportDescription }}',
reportFrequency = '{{ reportFrequency }}',
format = '{{ format }}',
destinationS3Location = '{{ destinationS3Location }}'
WHERE
report_id = '{{ report_id }}' --required
AND region = '{{ region }}' --required
AND reportDescription = '{{ reportDescription }}' --required
AND reportFrequency = '{{ reportFrequency }}' --required
AND format = '{{ format }}' --required
AND destinationS3Location = '{{ destinationS3Location }}' --required
RETURNING
report_id;
REPLACE examples
- put_report_definition
Creates the report definition for a report in Application Cost Profiler.
REPLACE aws.applicationcostprofiler.report_definitions
SET
reportId = '{{ reportId }}',
reportDescription = '{{ reportDescription }}',
reportFrequency = '{{ reportFrequency }}',
format = '{{ format }}',
destinationS3Location = '{{ destinationS3Location }}'
WHERE
region = '{{ region }}' --required
AND reportId = '{{ reportId }}' --required
AND reportDescription = '{{ reportDescription }}' --required
AND reportFrequency = '{{ reportFrequency }}' --required
AND format = '{{ format }}' --required
AND destinationS3Location = '{{ destinationS3Location }}' --required
RETURNING
report_id;
DELETE examples
- delete_report_definition
Deletes the specified report definition in AWS Application Cost Profiler. This stops the report from being generated.
DELETE FROM aws.applicationcostprofiler.report_definitions
WHERE report_id = '{{ report_id }}' --required
AND region = '{{ region }}' --required
;