Skip to content
v2.278.0

CfnDashboardProps Struct ​

Properties for defining a CfnDashboard.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudtrail as cloudtrail } from 'aws-cdk-lib';
const cfnDashboardProps: cloudtrail.CfnDashboardProps = {
  name: 'name',
  refreshSchedule: {
    frequency: {
      unit: 'unit',
      value: 123,
    },
    status: 'status',
    timeOfDay: 'timeOfDay',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  terminationProtectionEnabled: false,
  widgets: [{
    queryStatement: 'queryStatement',

    // the properties below are optional
    queryParameters: ['queryParameters'],
    viewProperties: {
      viewPropertiesKey: 'viewProperties',
    },
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudtrail as cloudtrail

cfn_dashboard_props = cloudtrail.CfnDashboardProps(
    name="name",
    refresh_schedule=cloudtrail.CfnDashboard.RefreshScheduleProperty(
        frequency=cloudtrail.CfnDashboard.FrequencyProperty(
            unit="unit",
            value=123
        ),
        status="status",
        time_of_day="timeOfDay"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    termination_protection_enabled=False,
    widgets=[cloudtrail.CfnDashboard.WidgetProperty(
        query_statement="queryStatement",

        # the properties below are optional
        query_parameters=["queryParameters"],
        view_properties={
            "view_properties_key": "viewProperties"
        }
    )]
)
java
// 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.*;

CfnDashboardProps cfnDashboardProps = CfnDashboardProps.builder()
        .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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudTrail;

var cfnDashboardProps = new CfnDashboardProps {
    Name = "name",
    RefreshSchedule = new RefreshScheduleProperty {
        Frequency = new FrequencyProperty {
            Unit = "unit",
            Value = 123
        },
        Status = "status",
        TimeOfDay = "timeOfDay"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    TerminationProtectionEnabled = false,
    Widgets = new [] { new WidgetProperty {
        QueryStatement = "queryStatement",

        // the properties below are optional
        QueryParameters = new [] { "queryParameters" },
        ViewProperties = new Dictionary<string, string> {
            { "viewPropertiesKey", "viewProperties" }
        }
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDashboardProps := &CfnDashboardProps{
	Name: jsii.String("name"),
	RefreshSchedule: &RefreshScheduleProperty{
		Frequency: &FrequencyProperty{
			Unit: jsii.String("unit"),
			Value: jsii.Number(123),
		},
		Status: jsii.String("status"),
		TimeOfDay: jsii.String("timeOfDay"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TerminationProtectionEnabled: jsii.Boolean(false),
	Widgets: []interface{}{
		&WidgetProperty{
			QueryStatement: jsii.String("queryStatement"),

			// the properties below are optional
			QueryParameters: []*string{
				jsii.String("queryParameters"),
			},
			ViewProperties: map[string]*string{
				"viewPropertiesKey": jsii.String("viewProperties"),
			},
		},
	},
}

Properties ​

nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string #
The name of the dashboard. The name must be unique to your account.

To create the Highlights dashboard, the name must be AWSCloudTrail-Highlights .

refreshScheduleoptionalIResolvable | CfnDashboard.RefreshSchedulePropertyrefresh_scheduleoptionaltyping.Union[IResolvable, RefreshScheduleProperty]refreshScheduleoptionalIResolvableRefreshScheduleoptionalIResolvableRefreshScheduleoptionalinterface{} #
The schedule for a dashboard refresh.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
A list of tags.
terminationProtectionEnabledoptionalboolean | IResolvabletermination_protection_enabledoptionaltyping.Union[bool, IResolvable]terminationProtectionEnabledoptionalBooleanTerminationProtectionEnabledoptionalboolTerminationProtectionEnabledoptionalinterface{} #
Specifies whether termination protection is enabled for the dashboard.

If termination protection is enabled, you cannot delete the dashboard until termination protection is disabled.

widgetsoptionalIResolvable | IResolvable | CfnDashboard.WidgetProperty[]widgetsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, WidgetProperty]]]widgetsoptionalIResolvableWidgetsoptionalIResolvableWidgetsoptionalinterface{} #
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.