dashboards
Creates, updates, deletes or gets a dashboard resource or lists dashboards in a region
Overview
| Name | dashboards |
| Type | Resource |
| Description | The Amazon CloudTrail dashboard resource allows customers to manage managed dashboards and create custom dashboards. You can manually refresh custom and managed dashboards. For custom dashboards, you can also set up an automatic refresh schedule and modify dashboard widgets. |
| Id | awscc.cloudtrail.dashboards |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
widgets | array | List of widgets on the dashboard |
created_timestamp | string | The timestamp of the dashboard creation. |
dashboard_arn | string | The ARN of the dashboard. |
refresh_schedule | object | Configures the automatic refresh schedule for the dashboard. Includes the frequency unit (DAYS or HOURS) and value, as well as the status (ENABLED or DISABLED) of the refresh schedule. |
name | string | The name of the dashboard. |
status | string | The status of the dashboard. Values are CREATING, CREATED, UPDATING, UPDATED and DELETING. |
termination_protection_enabled | boolean | Indicates whether the dashboard is protected from termination. |
type | string | The type of the dashboard. Values are CUSTOM and MANAGED. |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
dashboard_arn | string | The ARN of the dashboard. |
region | string | AWS region. |
For more information, see AWS::CloudTrail::Dashboard.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | dashboards | INSERT | , 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,
widgets,
created_timestamp,
dashboard_arn,
refresh_schedule,
name,
status,
termination_protection_enabled,
type,
updated_timestamp,
tags
FROM awscc.cloudtrail.dashboards
WHERE
region = 'us-east-1' AND
Identifier = '{{ dashboard_arn }}';
Lists all dashboards in a region.
SELECT
region,
dashboard_arn
FROM awscc.cloudtrail.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.cloudtrail.dashboards (
,
region
)
SELECT
'{{ }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.cloudtrail.dashboards (
Widgets,
RefreshSchedule,
Name,
TerminationProtectionEnabled,
Tags,
region
)
SELECT
'{{ widgets }}',
'{{ refresh_schedule }}',
'{{ name }}',
'{{ termination_protection_enabled }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: dashboard
props:
- name: widgets
value:
- query_statement: '{{ query_statement }}'
query_parameters:
- '{{ query_parameters[0] }}'
view_properties: {}
- name: refresh_schedule
value:
frequency:
unit: '{{ unit }}'
value: '{{ value }}'
time_of_day: '{{ time_of_day }}'
status: '{{ status }}'
- name: name
value: '{{ name }}'
- name: termination_protection_enabled
value: '{{ termination_protection_enabled }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
UPDATE example
Use the following StackQL query and manifest file to update a dashboard resource, using stack-deploy.
/*+ update */
UPDATE awscc.cloudtrail.dashboards
SET PatchDocument = string('{{ {
"Widgets": widgets,
"RefreshSchedule": refresh_schedule,
"Name": name,
"TerminationProtectionEnabled": termination_protection_enabled,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ dashboard_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.cloudtrail.dashboards
WHERE
Identifier = '{{ dashboard_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the dashboards resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
CloudTrail:CreateDashboard,
CloudTrail:AddTags,
CloudTrail:StartQuery,
CloudTrail:StartDashboardRefresh
CloudTrail:GetDashboard,
CloudTrail:ListDashboards,
CloudTrail:ListTags
CloudTrail:UpdateDashboard,
CloudTrail:AddTags,
CloudTrail:RemoveTags,
CloudTrail:StartQuery,
CloudTrail:StartDashboardRefresh
CloudTrail:DeleteDashboard,
CloudTrail:UpdateDashboard
CloudTrail:ListDashboards,
CloudTrail:GetDashboard,
CloudTrail:ListTags