interface GaugeWidgetProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudWatch.GaugeWidgetProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#GaugeWidgetProps |
![]() | software.amazon.awscdk.services.cloudwatch.GaugeWidgetProps |
![]() | aws_cdk.aws_cloudwatch.GaugeWidgetProps |
![]() | aws-cdk-lib » aws_cloudwatch » GaugeWidgetProps |
Properties for a GaugeWidget.
Example
declare const dashboard: cloudwatch.Dashboard;
declare const errorAlarm: cloudwatch.Alarm;
declare const gaugeMetric: cloudwatch.Metric;
dashboard.addWidgets(new cloudwatch.GaugeWidget({
metrics: [gaugeMetric],
leftYAxis: {
min: 0,
max: 1000,
}
}));
Properties
Name | Type | Description |
---|---|---|
annotations? | Horizontal [] | Annotations for the left Y axis. |
end? | string | The end of the time range to use for each widget independently from those of the dashboard. |
height? | number | Height of the widget. |
left | YAxis | Left Y axis. |
legend | Legend | Position of the legend. |
live | boolean | Whether the graph should show live data. |
metrics? | IMetric [] | Metrics to display on left Y axis. |
period? | Duration | The default period for all metrics in this 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. Only applicable for Bar and Pie charts. |
start? | string | The start of the time range to use for each widget independently from those of the dashboard. |
statistic? | string | The default statistic to be displayed for each metric. |
title? | string | Title for the graph. |
width? | number | Width of the widget, in a grid of 24 units wide. |
annotations?
Type:
Horizontal
[]
(optional, default: No annotations)
Annotations for the left Y axis.
end?
Type:
string
(optional, default: When the dashboard loads, the end date will be the current time.)
The end of the time range to use for each widget independently from those of the dashboard.
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.
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:
YAxis
(optional, default: None)
Left Y axis.
legendPosition?
Type:
Legend
(optional, default: bottom)
Position of the legend.
liveData?
Type:
boolean
(optional, default: false)
Whether the graph should show live data.
metrics?
Type:
IMetric
[]
(optional, default: No metrics)
Metrics to display on left Y axis.
period?
Type:
Duration
(optional, default: cdk.Duration.seconds(300))
The default period for all metrics in this widget.
The period is the length of time represented by one data point on the graph. This default can be overridden within each metric definition.
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. Only applicable for Bar and Pie charts.
If false, values will be from the most recent period of your chosen time range; if true, shows the value from the entire time range.
start?
Type:
string
(optional, default: When the dashboard loads, the start time will be the default time range.)
The start of the time range to use for each widget independently from those of 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.
statistic?
Type:
string
(optional, default: The statistic for each metric is used)
The default statistic to be displayed for each metric.
This default can be overridden within the definition of each individual metric
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.