# AlarmWidgetProps

Properties for an AlarmWidget.

Extends: AlarmWidgetProps
Extends: MetricWidgetProps
Used as props by: AlarmWidget

- Source: [`aws-cloudwatch/lib/graph.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-cloudwatch/lib/graph.ts#L92)
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

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

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

## Properties

- `accountId`: string — The AWS account ID where the metrics are located.

  **Default:** Current account

  This enables cross-account functionality for CloudWatch dashboards.
  Before using this feature, ensure that proper cross-account sharing is configured
  between the monitoring account and source account.

  For more information, see:
  https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html

- `alarm`: [IAlarmRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cloudwatch.IAlarmRef.html) (required) — The alarm to show.

- `height`: number — Height of the widget.

  **Default:** 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.

- `leftYAxis`: [YAxisProps](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.YAxisProps.html) — Left Y axis.

  **Default:** No minimum or maximum values for the left Y-axis

- `region`: string — The region the metrics of this graph should be taken from.

  **Default:** Current region

- `title`: string = None — Title for the graph.

- `width`: number = 6 — Width of the widget, in a grid of 24 units wide.
