dashboards
Creates, updates, deletes or gets a dashboard
resource or lists dashboards
in a region
Overview
Name | dashboards |
Type | Resource |
Description | Resource Type definition for AWS::CloudWatch::Dashboard |
Id | aws.cloudwatch.dashboards |
Fields
Name | Datatype | Description |
---|---|---|
dashboard_name | string | The 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_body | string | The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard |
region | string | AWS region. |
For more information, see AWS::CloudWatch::Dashboard
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DashboardBody, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cloudwatch.dashboards (
DashboardBody,
region
)
SELECT
'{{ DashboardBody }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cloudwatch.dashboards (
DashboardName,
DashboardBody,
region
)
SELECT
'{{ DashboardName }}',
'{{ DashboardBody }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: dashboard
props:
- name: DashboardName
value: '{{ DashboardName }}'
- name: DashboardBody
value: '{{ DashboardBody }}'
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