Class AlarmStatusWidgetProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.AlarmStatusWidgetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AlarmStatusWidgetProps>
- Enclosing interface:
AlarmStatusWidgetProps
@Stability(Stable)
public static final class AlarmStatusWidgetProps.Builder
extends Object
implements software.amazon.jsii.Builder<AlarmStatusWidgetProps>
A builder for
AlarmStatusWidgetProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofAlarmStatusWidgetProps.getAlarms()
build()
Builds the configured instance.Sets the value ofAlarmStatusWidgetProps.getHeight()
sortBy
(AlarmStatusWidgetSortBy sortBy) Sets the value ofAlarmStatusWidgetProps.getSortBy()
states
(List<? extends AlarmState> states) Sets the value ofAlarmStatusWidgetProps.getStates()
Sets the value ofAlarmStatusWidgetProps.getTitle()
Sets the value ofAlarmStatusWidgetProps.getWidth()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
alarms
Sets the value ofAlarmStatusWidgetProps.getAlarms()
- Parameters:
alarms
- CloudWatch Alarms to show in widget. This parameter is required.- Returns:
this
-
height
Sets the value ofAlarmStatusWidgetProps.getHeight()
- Parameters:
height
- Height of the widget.- Returns:
this
-
sortBy
Sets the value ofAlarmStatusWidgetProps.getSortBy()
- Parameters:
sortBy
- Specifies how to sort the alarms in the widget.- Returns:
this
-
states
Sets the value ofAlarmStatusWidgetProps.getStates()
- Parameters:
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.
- Returns:
this
-
title
Sets the value ofAlarmStatusWidgetProps.getTitle()
- Parameters:
title
- The title of the widget.- Returns:
this
-
width
Sets the value ofAlarmStatusWidgetProps.getWidth()
- Parameters:
width
- Width of the widget, in a grid of 24 units wide.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AlarmStatusWidgetProps>
- Returns:
- a new instance of
AlarmStatusWidgetProps
- Throws:
NullPointerException
- if any required attribute was not provided
-