Class AlarmWidget.Builder

java.lang.Object
software.amazon.awscdk.services.cloudwatch.AlarmWidget.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<AlarmWidget>
Enclosing class:
AlarmWidget

@Stability(Stable) public static final class AlarmWidget.Builder extends Object implements software.amazon.jsii.Builder<AlarmWidget>
A fluent builder for AlarmWidget.
  • Method Details

    • create

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

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

      Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.

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

      @Stability(Stable) public AlarmWidget.Builder region(String region)
      The region the metrics of this graph should be taken from.

      Default: - Current region

      Parameters:
      region - The region the metrics of this graph should be taken from. This parameter is required.
      Returns:
      this
    • title

      @Stability(Stable) public AlarmWidget.Builder title(String title)
      Title for the graph.

      Default: - None

      Parameters:
      title - Title for the graph. This parameter is required.
      Returns:
      this
    • width

      @Stability(Stable) public AlarmWidget.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
    • alarm

      @Stability(Stable) public AlarmWidget.Builder alarm(IAlarm alarm)
      The alarm to show.

      Parameters:
      alarm - The alarm to show. This parameter is required.
      Returns:
      this
    • leftYAxis

      @Stability(Stable) public AlarmWidget.Builder leftYAxis(YAxisProps leftYAxis)
      Left Y axis.

      Default: - No minimum or maximum values for the left Y-axis

      Parameters:
      leftYAxis - Left Y axis. This parameter is required.
      Returns:
      this
    • build

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