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 | aws.cloudtrail.dashboards |
Fields
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. |
updated_timestamp | string | The timestamp showing when the dashboard was updated, if applicable. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp. |
tags | array | |
region | string | AWS region. |
For more information, see AWS::CloudTrail::Dashboard
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | , 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,
widgets,
created_timestamp,
dashboard_arn,
refresh_schedule,
name,
status,
termination_protection_enabled,
type,
updated_timestamp,
tags
FROM aws.cloudtrail.dashboards
WHERE region = 'us-east-1';
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 aws.cloudtrail.dashboards
WHERE region = 'us-east-1' AND data__Identifier = '<DashboardArn>';
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.cloudtrail.dashboards (
,
region
)
SELECT
'{{ }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cloudtrail.dashboards (
Widgets,
RefreshSchedule,
Name,
TerminationProtectionEnabled,
Tags,
region
)
SELECT
'{{ Widgets }}',
'{{ RefreshSchedule }}',
'{{ Name }}',
'{{ TerminationProtectionEnabled }}',
'{{ 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:
- QueryStatement: '{{ QueryStatement }}'
QueryParameters:
- '{{ QueryParameters[0] }}'
ViewProperties: {}
- name: RefreshSchedule
value:
Frequency:
Unit: '{{ Unit }}'
Value: '{{ Value }}'
TimeOfDay: '{{ TimeOfDay }}'
Status: '{{ Status }}'
- name: Name
value: '{{ Name }}'
- name: TerminationProtectionEnabled
value: '{{ TerminationProtectionEnabled }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
DELETE
example
/*+ delete */
DELETE FROM aws.cloudtrail.dashboards
WHERE data__Identifier = '<DashboardArn>'
AND region = 'us-east-1';
Permissions
To operate on the dashboards
resource, the following permissions are required:
Create
CloudTrail:CreateDashboard,
CloudTrail:AddTags,
CloudTrail:StartQuery,
CloudTrail:StartDashboardRefresh
Read
CloudTrail:GetDashboard,
CloudTrail:ListDashboards,
CloudTrail:ListTags
Update
CloudTrail:UpdateDashboard,
CloudTrail:AddTags,
CloudTrail:RemoveTags,
CloudTrail:StartQuery,
CloudTrail:StartDashboardRefresh
Delete
CloudTrail:DeleteDashboard,
CloudTrail:UpdateDashboard
List
CloudTrail:ListDashboards,
CloudTrail:GetDashboard,
CloudTrail:ListTags