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 = '{{ region }}' AND
Identifier = '{{ dashboard_id }}';
Lists all dashboards in a region.
SELECT
region,
dashboard_id
FROM awscc.iotsitewise.dashboards_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.iotsitewise.dashboards (
ProjectId,
DashboardName,
DashboardDescription,
DashboardDefinition,
Tags,
region
)
SELECT
'{{ project_id }}',
'{{ dashboard_name }}',
'{{ dashboard_description }}',
'{{ dashboard_definition }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.iotsitewise.dashboards
WHERE
Identifier = '{{ dashboard_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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