Skip to main content

dashboards

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

Overview

Namedashboards
TypeResource
Idaws.bcm_dashboards.dashboards

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the retrieved dashboard. (pattern: <code>(?!.* {2})[a-zA-Z][a-zA-Z0-9 -]{0,48}[a-zA-Z0-9-]</code>)
arnstringThe ARN of the retrieved dashboard. (pattern: <code>arn:aws[-a-z0-9]*:bcm-dashboards::[0-9]{12}:dashboard/(*|[-a-z0-9]+)</code>)
created_atstring (date-time)The timestamp when the dashboard was created.
descriptionstringThe description of the retrieved dashboard. (pattern: <code>(?!.* {2})[ a-zA-Z0-9.,!?;:@#$%&-_/\]*</code>)
type_stringIndicates the dashboard type. (CUSTOM)
updated_atstring (date-time)The timestamp when the dashboard was last modified.
widgetsarrayAn array of widget configurations that make up the dashboard.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_dashboardselectregionRetrieves the configuration and metadata of a specified dashboard, including its widgets and layout settings.
list_dashboardsselectregionReturns a list of all dashboards in your account.
create_dashboardinsertregion, name, widgetsCreates a new dashboard that can contain multiple widgets displaying cost and usage data. You can add custom widgets or use predefined widgets, arranging them in your preferred layout.
update_dashboardupdateregion, arn, nameUpdates an existing dashboard's properties, including its name, description, and widget configurations.
delete_dashboarddeleteregionDeletes a specified dashboard. This action cannot be undone.

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

Retrieves the configuration and metadata of a specified dashboard, including its widgets and layout settings.

SELECT
name,
arn,
created_at,
description,
type_,
updated_at,
widgets
FROM aws.bcm_dashboards.dashboards
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new dashboard that can contain multiple widgets displaying cost and usage data. You can add custom widgets or use predefined widgets, arranging them in your preferred layout.

INSERT INTO aws.bcm_dashboards.dashboards (
name,
description,
widgets,
resourceTags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ widgets }}' /* required */,
'{{ resourceTags }}',
'{{ region }}'
RETURNING
arn
;

UPDATE examples

Updates an existing dashboard's properties, including its name, description, and widget configurations.

UPDATE aws.bcm_dashboards.dashboards
SET
arn = '{{ arn }}',
name = '{{ name }}',
description = '{{ description }}',
widgets = '{{ widgets }}'
WHERE
region = '{{ region }}' --required
AND arn = '{{ arn }}' --required
AND name = '{{ name }}' --required
RETURNING
arn;

DELETE examples

Deletes a specified dashboard. This action cannot be undone.

DELETE FROM aws.bcm_dashboards.dashboards
WHERE region = '{{ region }}' --required
;