Class CfnDashboard
- All Implemented Interfaces:
IInspectable,ITaggableV2,IDashboardRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- 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 AWS 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 AWS CloudTrail User Guide .
For more information about dashboards, see CloudTrail Lake dashboards in the AWS CloudTrail User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudtrail.*;
CfnDashboard cfnDashboard = CfnDashboard.Builder.create(this, "MyCfnDashboard")
.name("name")
.refreshSchedule(RefreshScheduleProperty.builder()
.frequency(FrequencyProperty.builder()
.unit("unit")
.value(123)
.build())
.status("status")
.timeOfDay("timeOfDay")
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.terminationProtectionEnabled(false)
.widgets(List.of(WidgetProperty.builder()
.queryStatement("queryStatement")
// the properties below are optional
.queryParameters(List.of("queryParameters"))
.viewProperties(Map.of(
"viewPropertiesKey", "viewProperties"))
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnDashboard.static interfaceSpecifies the frequency for a dashboard refresh schedule.static interfaceThe schedule for a dashboard refresh.static interfaceContains information about a widget on a CloudTrail Lake dashboard.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudtrail.IDashboardRef
IDashboardRef.Jsii$Default, IDashboardRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDashboard(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDashboard(software.amazon.jsii.JsiiObjectRef objRef) CfnDashboard(software.constructs.Construct scope, String id) CfnDashboard(software.constructs.Construct scope, String id, CfnDashboardProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe timestamp that shows when the dashboard was created.The ARN for the dashboard.The status of the dashboard.The type of dashboard.The timestamp that shows when the dashboard was updated.Tag Manager which manages the tags for this resource.A reference to a Dashboard resource.getName()The name of the dashboard.The schedule for a dashboard refresh.getTags()A list of tags.Specifies whether termination protection is enabled for the dashboard.An array of widgets for a custom dashboard.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThe name of the dashboard.voidsetRefreshSchedule(IResolvable value) The schedule for a dashboard refresh.voidThe schedule for a dashboard refresh.voidA list of tags.voidSpecifies whether termination protection is enabled for the dashboard.voidSpecifies whether termination protection is enabled for the dashboard.voidsetWidgets(List<Object> value) An array of widgets for a custom dashboard.voidsetWidgets(IResolvable value) An array of widgets for a custom dashboard.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDashboard
protected CfnDashboard(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDashboard
protected CfnDashboard(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDashboard
@Stability(Stable) public CfnDashboard(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnDashboardProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties.
-
CfnDashboard
@Stability(Stable) public CfnDashboard(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrCreatedTimestamp
The timestamp that shows when the dashboard was created. -
getAttrDashboardArn
The ARN for the dashboard. -
getAttrStatus
The status of the dashboard. -
getAttrType
The type of dashboard. -
getAttrUpdatedTimestamp
The timestamp that shows when the dashboard was updated. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDashboardRef
A reference to a Dashboard resource.- Specified by:
getDashboardRefin interfaceIDashboardRef
-
getName
The name of the dashboard.The name must be unique to your account.
-
setName
The name of the dashboard.The name must be unique to your account.
-
getRefreshSchedule
The schedule for a dashboard refresh.Returns union: either
IResolvableorCfnDashboard.RefreshScheduleProperty -
setRefreshSchedule
The schedule for a dashboard refresh. -
setRefreshSchedule
@Stability(Stable) public void setRefreshSchedule(@Nullable CfnDashboard.RefreshScheduleProperty value) The schedule for a dashboard refresh. -
getTags
A list of tags. -
setTags
A list of tags. -
getTerminationProtectionEnabled
Specifies whether termination protection is enabled for the dashboard.Returns union: either
BooleanorIResolvable -
setTerminationProtectionEnabled
Specifies whether termination protection is enabled for the dashboard. -
setTerminationProtectionEnabled
Specifies whether termination protection is enabled for the dashboard. -
getWidgets
An array of widgets for a custom dashboard.A custom dashboard can have a maximum of ten widgets.
Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnDashboard.WidgetProperty> -
setWidgets
An array of widgets for a custom dashboard.A custom dashboard can have a maximum of ten widgets.
-
setWidgets
An array of widgets for a custom dashboard.A custom dashboard can have a maximum of ten widgets.
-