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 Details

    • create

      @Stability(Stable) public static AlarmStatusWidget.Builder create()
      Returns:
      a new instance of AlarmStatusWidget.Builder.
    • alarms

      @Stability(Stable) public AlarmStatusWidget.Builder alarms(List<? extends IAlarm> alarms)
      CloudWatch Alarms to show in widget.

      Parameters:
      alarms - CloudWatch Alarms to show in widget. This parameter is required.
      Returns:
      this
    • height

      @Stability(Stable) public AlarmStatusWidget.Builder height(Number height)
      Height of the widget.

      Default: 3

      Parameters:
      height - Height of the widget. This parameter is required.
      Returns:
      this
    • sortBy

      @Stability(Stable) public AlarmStatusWidget.Builder sortBy(AlarmStatusWidgetSortBy 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

      @Stability(Stable) public AlarmStatusWidget.Builder 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.

      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

      @Stability(Stable) public AlarmStatusWidget.Builder title(String title)
      The title of the widget.

      Default: 'Alarm Status'

      Parameters:
      title - The title of the widget. This parameter is required.
      Returns:
      this
    • width

      @Stability(Stable) public AlarmStatusWidget.Builder width(Number 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

      @Stability(Stable) public AlarmStatusWidget build()
      Specified by:
      build in interface software.amazon.jsii.Builder<AlarmStatusWidget>
      Returns:
      a newly built instance of AlarmStatusWidget.