aws-cdk-lib.aws_cloudwatch.SingleValueWidgetProps

interface SingleValueWidgetProps

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

Properties for a SingleValueWidget.

Example

declare const dashboard: cloudwatch.Dashboard;

dashboard.addWidgets(new cloudwatch.SingleValueWidget({
  metrics: [ /* ... */ ],

  fullPrecision: true,
}));

Properties

NameTypeDescription
metricsIMetric[]Metrics to display.
fullPrecision?booleanWhether to show as many digits as can fit, before rounding.
height?numberHeight of the widget.
region?stringThe region the metrics of this graph should be taken from.
setPeriodToTimeRange?booleanWhether to show the value from the entire time range.
sparkline?booleanWhether to show a graph below the value illustrating the value for the whole time range.
title?stringTitle for the graph.
width?numberWidth of the widget, in a grid of 24 units wide.

metrics

Type: IMetric[]

Metrics to display.


fullPrecision?

Type: boolean (optional, default: false)

Whether to show as many digits as can fit, before rounding.


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.


region?

Type: string (optional, default: Current region)

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


setPeriodToTimeRange?

Type: boolean (optional, default: false)

Whether to show the value from the entire time range.


sparkline?

Type: boolean (optional, default: false)

Whether to show a graph below the value illustrating the value for the whole time range.

Cannot be used in combination with setPeriodToTimeRange


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.