dashboards
Creates, updates, deletes or gets a dashboard resource or lists dashboards in a region
Overview
| Name | dashboards |
| Type | Resource |
| Description | Resource schema for AWS::IoTSiteWise::Dashboard |
| Id | awscc.iotsitewise.dashboards |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
project_id | string | The ID of the project in which to create the dashboard. |
dashboard_id | string | The ID of the dashboard. |
dashboard_name | string | A friendly name for the dashboard. |
dashboard_description | string | A description for the dashboard. |
dashboard_definition | string | The dashboard definition specified in a JSON literal. |
dashboard_arn | string | The ARN of the dashboard. |
tags | array | A list of key-value pairs that contain metadata for the dashboard. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
dashboard_id | string | The ID of the dashboard. |
region | string | AWS region. |
For more information, see AWS::IoTSiteWise::Dashboard.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | dashboards | INSERT | DashboardDefinition, DashboardDescription, DashboardName, region |
delete_resource | dashboards | DELETE | Identifier, region |
update_resource | dashboards | UPDATE | Identifier, PatchDocument, region |
list_resources | dashboards_list_only | SELECT | region |
get_resource | dashboards | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual dashboard.
SELECT
region,
project_id,
dashboard_id,
dashboard_name,
dashboard_description,
dashboard_definition,
dashboard_arn,
tags
FROM awscc.iotsitewise.dashboards
WHERE
region = 'us-east-1' AND
Identifier = '{{ dashboard_id }}';
Lists all dashboards in a region.
SELECT
region,
dashboard_id
FROM awscc.iotsitewise.dashboards_list_only
WHERE
region = 'us-east-1';
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 awscc.iotsitewise.dashboards (
DashboardName,
DashboardDescription,
DashboardDefinition,
region
)
SELECT
'{{ dashboard_name }}',
'{{ dashboard_description }}',
'{{ dashboard_definition }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iotsitewise.dashboards (
ProjectId,
DashboardName,
DashboardDescription,
DashboardDefinition,
Tags,
region
)
SELECT
'{{ project_id }}',
'{{ dashboard_name }}',
'{{ dashboard_description }}',
'{{ dashboard_definition }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: dashboard
props:
- name: project_id
value: '{{ project_id }}'
- name: dashboard_name
value: '{{ dashboard_name }}'
- name: dashboard_description
value: '{{ dashboard_description }}'
- name: dashboard_definition
value: '{{ dashboard_definition }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a dashboard resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotsitewise.dashboards
SET PatchDocument = string('{{ {
"DashboardName": dashboard_name,
"DashboardDescription": dashboard_description,
"DashboardDefinition": dashboard_definition,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ dashboard_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iotsitewise.dashboards
WHERE
Identifier = '{{ dashboard_id }}' AND
region = 'us-east-1';
Permissions
To operate on the dashboards resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iotsitewise:CreateDashboard,
iotsitewise:DescribeDashboard,
iotsitewise:ListTagsForResource,
iotsitewise:TagResource,
iotsitewise:DescribeAsset,
iotsitewise:DescribeAssetModel,
iotsitewise:ListAssetModelProperties,
iotsitewise:ListAssetModelCompositeModels
iotsitewise:DescribeDashboard,
iotsitewise:ListTagsForResource
iotsitewise:DescribeDashboard,
iotsitewise:UpdateDashboard,
iotsitewise:TagResource,
iotsitewise:UntagResource,
iotsitewise:ListTagsForResource,
iotsitewise:DescribeAsset,
iotsitewise:DescribeAssetModel,
iotsitewise:ListAssetModelProperties,
iotsitewise:ListAssetModelCompositeModels
iotsitewise:DescribeDashboard,
iotsitewise:DeleteDashboard
iotsitewise:ListDashboards,
iotsitewise:ListPortals,
iotsitewise:ListProjects,
iotsitewise:ListTagsForResource