create_dashboard¶
Operation¶
create_dashboard
async
¶
create_dashboard(input: CreateDashboardInput, plugins: list[Plugin] | None = None) -> CreateDashboardOutput
Creates a custom dashboard or the Highlights dashboard.
-
Custom dashboards - Custom dashboards allow you to query events in any event data store type. You can add up to 10 widgets to a custom dashboard. You can manually refresh a custom dashboard, or you can set a refresh schedule.
-
Highlights dashboard - You can create the Highlights dashboard to see a summary of key user activities and API usage across all your event data stores. CloudTrail Lake manages the Highlights dashboard and refreshes the dashboard every 6 hours. To create the Highlights dashboard, you must set and enable a refresh schedule.
CloudTrail runs queries to populate the dashboard's widgets during a
manual or scheduled refresh. CloudTrail must be granted permissions to
run the StartQuery operation on your behalf. To provide permissions,
run the PutResourcePolicy operation to attach a resource-based policy
to each event data store. For more information, see Example: Allow
CloudTrail to run queries to populate a
dashboard
in the CloudTrail User Guide.
To set a refresh schedule, CloudTrail must be granted permissions to run
the StartDashboardRefresh operation to refresh the dashboard on your
behalf. To provide permissions, run the PutResourcePolicy operation to
attach a resource-based policy to the dashboard. For more information,
see Resource-based policy example for a
dashboard
in the CloudTrail User Guide.
For more information about dashboards, see CloudTrail Lake dashboards in the CloudTrail User Guide.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateDashboardInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CreateDashboardOutput
|
An instance of |
Input¶
CreateDashboardInput
dataclass
¶
Dataclass for CreateDashboardInput structure.
Attributes¶
name
class-attribute
instance-attribute
¶
name: str | None = None
The name of the dashboard. The name must be unique to your account.
To create the Highlights dashboard, the name must be
AWSCloudTrail-Highlights.
refresh_schedule
class-attribute
instance-attribute
¶
refresh_schedule: RefreshSchedule | None = None
The refresh schedule configuration for the dashboard.
To create the Highlights dashboard, you must set a refresh schedule and
set the Status to ENABLED. The Unit for the refresh schedule must
be HOURS and the Value must be 6.
termination_protection_enabled
class-attribute
instance-attribute
¶
termination_protection_enabled: bool | None = None
Specifies whether termination protection is enabled for the dashboard. If termination protection is enabled, you cannot delete the dashboard until termination protection is disabled.
widgets
class-attribute
instance-attribute
¶
widgets: list[RequestWidget] | None = None
An array of widgets for a custom dashboard. A custom dashboard can have a maximum of ten widgets.
You do not need to specify widgets for the Highlights dashboard.
Output¶
CreateDashboardOutput
dataclass
¶
Dataclass for CreateDashboardOutput structure.
Attributes¶
dashboard_arn
class-attribute
instance-attribute
¶
dashboard_arn: str | None = None
The ARN for the dashboard.
refresh_schedule
class-attribute
instance-attribute
¶
refresh_schedule: RefreshSchedule | None = None
The refresh schedule for the dashboard, if configured.