interface SingleValueWidgetProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudWatch.SingleValueWidgetProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#SingleValueWidgetProps |
![]() | software.amazon.awscdk.services.cloudwatch.SingleValueWidgetProps |
![]() | aws_cdk.aws_cloudwatch.SingleValueWidgetProps |
![]() | 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
Name | Type | Description |
---|---|---|
metrics | IMetric [] | Metrics to display. |
full | boolean | Whether to show as many digits as can fit, before rounding. |
height? | number | Height of the widget. |
region? | string | The region the metrics of this graph should be taken from. |
set | boolean | Whether to show the value from the entire time range. |
sparkline? | boolean | Whether to show a graph below the value illustrating the value for the whole time range. |
title? | string | Title for the graph. |
width? | number | Width 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.