Class CustomWidget.Builder

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

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

    • create

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

      @Stability(Stable) public CustomWidget.Builder functionArn(String functionArn)
      The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget.

      Parameters:
      functionArn - The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget. This parameter is required.
      Returns:
      this
    • title

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

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

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

      @Stability(Stable) public CustomWidget.Builder params(Object params)
      Parameters passed to the lambda function.

      Default: - no parameters are passed to the lambda function

      Parameters:
      params - Parameters passed to the lambda function. This parameter is required.
      Returns:
      this
    • updateOnRefresh

      @Stability(Stable) public CustomWidget.Builder updateOnRefresh(Boolean updateOnRefresh)
      Update the widget on refresh.

      Default: true

      Parameters:
      updateOnRefresh - Update the widget on refresh. This parameter is required.
      Returns:
      this
    • updateOnResize

      @Stability(Stable) public CustomWidget.Builder updateOnResize(Boolean updateOnResize)
      Update the widget on resize.

      Default: true

      Parameters:
      updateOnResize - Update the widget on resize. This parameter is required.
      Returns:
      this
    • updateOnTimeRangeChange

      @Stability(Stable) public CustomWidget.Builder updateOnTimeRangeChange(Boolean updateOnTimeRangeChange)
      Update the widget on time range change.

      Default: true

      Parameters:
      updateOnTimeRangeChange - Update the widget on time range change. This parameter is required.
      Returns:
      this
    • width

      @Stability(Stable) public CustomWidget.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 CustomWidget build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CustomWidget>
      Returns:
      a newly built instance of CustomWidget.