Skip to main content

dashboards

Creates, updates, deletes or gets a dashboard resource or lists dashboards in a region

Overview

Namedashboards
TypeResource
DescriptionResource Type definition for AWS::CloudWatch::Dashboard
Idawscc.cloudwatch.dashboards

Fields

NameDatatypeDescription
dashboard_namestringThe name of the dashboard. The name must be between 1 and 255 characters. If you do not specify a name, one will be generated automatically.
dashboard_bodystringThe detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard
regionstringAWS region.

For more information, see AWS::CloudWatch::Dashboard.

Methods

NameResourceAccessible byRequired Params
create_resourcedashboardsINSERTDashboardBody, region
delete_resourcedashboardsDELETEIdentifier, region
update_resourcedashboardsUPDATEIdentifier, PatchDocument, region
list_resourcesdashboards_list_onlySELECTregion
get_resourcedashboardsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual dashboard.

SELECT
region,
dashboard_name,
dashboard_body
FROM awscc.cloudwatch.dashboards
WHERE
region = 'us-east-1' AND
Identifier = '{{ dashboard_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.cloudwatch.dashboards (
DashboardBody,
region
)
SELECT
'{{ dashboard_body }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a dashboard resource, using stack-deploy.

/*+ update */
UPDATE awscc.cloudwatch.dashboards
SET PatchDocument = string('{{ {
"DashboardBody": dashboard_body
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ dashboard_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.cloudwatch.dashboards
WHERE
Identifier = '{{ dashboard_name }}' AND
region = 'us-east-1';

Permissions

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

cloudwatch:PutDashboard,
cloudwatch:GetDashboard