Skip to main content

dashboards

Creates, updates, deletes or gets a dashboard resource or lists dashboards in a region

Overview

Namedashboards
TypeResource
DescriptionThe 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.
Idawscc.cloudtrail.dashboards

Fields

NameDatatypeDescription
widgetsarrayList of widgets on the dashboard
created_timestampstringThe timestamp of the dashboard creation.
dashboard_arnstringThe ARN of the dashboard.
refresh_scheduleobjectConfigures 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.
namestringThe name of the dashboard.
statusstringThe status of the dashboard. Values are CREATING, CREATED, UPDATING, UPDATED and DELETING.
termination_protection_enabledbooleanIndicates whether the dashboard is protected from termination.
typestringThe type of the dashboard. Values are CUSTOM and MANAGED.
tagsarray
regionstringAWS region.

For more information, see AWS::CloudTrail::Dashboard.

Methods

NameResourceAccessible byRequired Params
create_resourcedashboardsINSERT, region
delete_resourcedashboardsDELETEIdentifier, region
update_resourcedashboardsUPDATEIdentifier, PatchDocument, region
list_resourcesdashboards_list_onlySELECTregion
get_resourcedashboardsSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ dashboard_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new dashboard resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.cloudtrail.dashboards (
,
region
)
SELECT
'{{ }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.cloudtrail.dashboards
WHERE
Identifier = '{{ dashboard_arn }}' 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:

ParameterDescription
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:

CloudTrail:CreateDashboard,
CloudTrail:AddTags,
CloudTrail:StartQuery,
CloudTrail:StartDashboardRefresh