aws-cdk-lib.aws_cloudwatch.DashboardProps

interface DashboardProps

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.DashboardProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#DashboardProps
Javasoftware.amazon.awscdk.services.cloudwatch.DashboardProps
Pythonaws_cdk.aws_cloudwatch.DashboardProps
TypeScript (source)aws-cdk-lib » aws_cloudwatch » DashboardProps

Properties for defining a CloudWatch Dashboard.

Example

import * as cw from 'aws-cdk-lib/aws-cloudwatch';

const dashboard = new cw.Dashboard(this, 'Dash', {
  defaultInterval: Duration.days(7),
});

Properties

NameTypeDescription
dashboardName?stringName of the dashboard.
defaultInterval?DurationInterval duration for metrics.
end?stringThe end of the time range to use for each widget on the dashboard when the dashboard loads.
periodOverride?PeriodOverrideUse this field to specify the period for the graphs when the dashboard loads.
start?stringThe start of the time range to use for each widget on the dashboard.
widgets?IWidget[][]Initial set of widgets on the dashboard.

dashboardName?

Type: string (optional, default: automatically generated name)

Name of the dashboard.

If set, must only contain alphanumerics, dash (-) and underscore (_)


defaultInterval?

Type: Duration (optional, default: When the dashboard loads, the defaultInterval time will be the default time range.)

Interval duration for metrics.

You can specify defaultInterval with the relative time(eg. cdk.Duration.days(7)).


end?

Type: string (optional, default: When the dashboard loads, the end date will be the current time.)

The end of the time range to use for each widget on the dashboard when the dashboard loads.

If you specify a value for end, you must also specify a value for start. Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.


periodOverride?

Type: PeriodOverride (optional, default: Auto)

Use this field to specify the period for the graphs when the dashboard loads.

Specifying Auto causes the period of all graphs on the dashboard to automatically adapt to the time range of the dashboard. Specifying Inherit ensures that the period set for each graph is always obeyed.


start?

Type: string (optional, default: When the dashboard loads, the start time will be the default time range.)

The start of the time range to use for each widget on the dashboard.

You can specify start without specifying end to specify a relative time range that ends with the current time. In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months. You can also use start along with an end field, to specify an absolute time range. When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.


widgets?

Type: IWidget[][] (optional, default: No widgets)

Initial set of widgets on the dashboard.

One array represents a row of widgets.