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
Idaws.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

NameAccessible byRequired Params
create_resourceINSERTDashboardBody, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all dashboards in a region.

SELECT
region,
dashboard_name,
dashboard_body
FROM aws.cloudwatch.dashboards
WHERE region = 'us-east-1';

Gets all properties from an individual dashboard.

SELECT
region,
dashboard_name,
dashboard_body
FROM aws.cloudwatch.dashboards
WHERE region = 'us-east-1' AND data__Identifier = '<DashboardName>';

INSERT example

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

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

DELETE example

/*+ delete */
DELETE FROM aws.cloudwatch.dashboards
WHERE data__Identifier = '<DashboardName>'
AND region = 'us-east-1';

Permissions

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

Create

cloudwatch:PutDashboard,
cloudwatch:GetDashboard

Read

cloudwatch:GetDashboard

Update

cloudwatch:PutDashboard

Delete

cloudwatch:DeleteDashboards,
cloudwatch:GetDashboard

List

cloudwatch:ListDashboards