Class AlarmStatusWidget.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.AlarmStatusWidget.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AlarmStatusWidget>
- Enclosing class:
AlarmStatusWidget
@Stability(Stable)
public static final class AlarmStatusWidget.Builder
extends Object
implements software.amazon.jsii.Builder<AlarmStatusWidget>
A fluent builder for
AlarmStatusWidget
.-
Method Summary
Modifier and TypeMethodDescriptionCloudWatch Alarms to show in widget.build()
static AlarmStatusWidget.Builder
create()
Height of the widget.sortBy
(AlarmStatusWidgetSortBy sortBy) Specifies how to sort the alarms in the widget.states
(List<? extends AlarmState> states) Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states.The title of the widget.Width of the widget, in a grid of 24 units wide.
-
Method Details
-
create
- Returns:
- a new instance of
AlarmStatusWidget.Builder
.
-
alarms
CloudWatch Alarms to show in widget.- Parameters:
alarms
- CloudWatch Alarms to show in widget. This parameter is required.- Returns:
this
-
height
Height of the widget.Default: 3
- Parameters:
height
- Height of the widget. This parameter is required.- Returns:
this
-
sortBy
Specifies how to sort the alarms in the widget.Default: - alphabetical order
- Parameters:
sortBy
- Specifies how to sort the alarms in the widget. This parameter is required.- Returns:
this
-
states
Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states.You can specify one or more alarm states in the value for this field. The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK.
If you omit this field or specify an empty array, all the alarms specifed in alarms are displayed.
Default: - all the alarms specified in alarms are displayed.
- Parameters:
states
- Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states. This parameter is required.- Returns:
this
-
title
The title of the widget.Default: 'Alarm Status'
- Parameters:
title
- The title of the widget. This parameter is required.- Returns:
this
-
width
Width of the widget, in a grid of 24 units wide.Default: 6
- Parameters:
width
- Width of the widget, in a grid of 24 units wide. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AlarmStatusWidget>
- Returns:
- a newly built instance of
AlarmStatusWidget
.
-