aws-cdk-lib.aws_cloudwatch.AlarmWidgetProps

interface AlarmWidgetProps

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

Properties for an AlarmWidget.

Example

declare const dashboard: cloudwatch.Dashboard;
declare const errorAlarm: cloudwatch.Alarm;

dashboard.addWidgets(new cloudwatch.AlarmWidget({
  title: "Errors",
  alarm: errorAlarm,
}));

Properties

NameTypeDescription
alarmIAlarmThe alarm to show.
height?numberHeight of the widget.
leftYAxis?YAxisPropsLeft Y axis.
region?stringThe region the metrics of this graph should be taken from.
title?stringTitle for the graph.
width?numberWidth of the widget, in a grid of 24 units wide.

alarm

Type: IAlarm

The alarm to show.


height?

Type: number (optional, default: 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.)

Height of the widget.


leftYAxis?

Type: YAxisProps (optional, default: No minimum or maximum values for the left Y-axis)

Left Y axis.


region?

Type: string (optional, default: Current region)

The region the metrics of this graph should be taken from.


title?

Type: string (optional, default: None)

Title for the graph.


width?

Type: number (optional, default: 6)

Width of the widget, in a grid of 24 units wide.