Defined in: src/cloudwatch-dashboard/cloudwatch-dashboard.ts:23
Properties for configuring a CloudWatchDashboard construct.
This interface extends CloudWatch DashboardProps but excludes properties that are automatically managed by the construct. The following properties are automatically set:
- widgets: Initially populated with a description widget based on dashboardDescription
Example
const dashboard = new CloudWatchDashboard(this, 'MyDashboard', {
dashboardName: 'my-application-dashboard',
dashboardDescription: 'Dashboard for monitoring my application',
periodOverride: cloudwatch.PeriodOverride.INHERIT,
removalPolicy: RemovalPolicy.RETAIN, // Optional: defaults to DESTROY
});
Extends
Omit
<cloudwatch.DashboardProps
,"widgets"
>
Properties
dashboardDescription
dashboardDescription:
string
Defined in: src/cloudwatch-dashboard/cloudwatch-dashboard.ts:31
A descriptive text that will be displayed at the top of the dashboard as a text widget. This provides context and documentation for the dashboard's purpose.
Example
'This dashboard monitors the health and performance of our API Gateway and CloudFront distribution.'
dashboardName?
readonly
optional
dashboardName:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.d.ts:29
Name of the dashboard.
If set, must only contain alphanumerics, dash (-) and underscore (_)
Default
- automatically generated name
Inherited from
Omit.dashboardName
defaultInterval?
readonly
optional
defaultInterval:Duration
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.d.ts:38
Interval duration for metrics. You can specify defaultInterval with the relative time(eg. cdk.Duration.days(7)).
Both properties defaultInterval
and start
cannot be set at once.
Default
When the dashboard loads, the defaultInterval time will be the default time range.
Inherited from
Omit.defaultInterval
end?
readonly
optional
end:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.d.ts:59
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.
Default
When the dashboard loads, the end date will be the current time.
Inherited from
Omit.end
initialWidgets?
optional
initialWidgets:IWidget
[]
Defined in: src/cloudwatch-dashboard/cloudwatch-dashboard.ts:39
Optional initial widgets to add to the dashboard in addition to the description widget. The description widget will always be added first, followed by these widgets.
Default Value
No additional widgets are added initially
periodOverride?
readonly
optional
periodOverride:PeriodOverride
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.d.ts:67
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.
Default
Auto
Inherited from
Omit.periodOverride
removalPolicy?
optional
removalPolicy:RemovalPolicy
Defined in: src/cloudwatch-dashboard/cloudwatch-dashboard.ts:46
Policy to apply when the dashboard is removed from the stack.
Default Value
RemovalPolicy.DESTROY - The dashboard will be deleted when the stack is deleted
start?
readonly
optional
start:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.d.ts:51
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.
Both properties defaultInterval
and start
cannot be set at once.
Default
When the dashboard loads, the start time will be the default time range.
Inherited from
Omit.start
variables?
readonly
optional
variables:IVariable
[]
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-cloudwatch/lib/dashboard.d.ts:83
A list of dashboard variables
See
Default
- No variables
Inherited from
Omit.variables