Interface CustomWidgetProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CustomWidgetProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-06-07T19:09:16.990Z") @Stability(Stable) public interface CustomWidgetProps extends software.amazon.jsii.JsiiSerializable
The properties for a CustomWidget.

Example:

 Dashboard dashboard;
 // Import or create a lambda function
 IFunction fn = Function.fromFunctionArn(dashboard, "Function", "arn:aws:lambda:us-east-1:123456789012:function:MyFn");
 dashboard.addWidgets(CustomWidget.Builder.create()
         .functionArn(fn.getFunctionArn())
         .title("My lambda baked widget")
         .build());
 
  • Method Details

    • getFunctionArn

      @Stability(Stable) @NotNull String getFunctionArn()
      The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget.
    • getTitle

      @Stability(Stable) @NotNull String getTitle()
      The title of the widget.
    • getHeight

      @Stability(Stable) @Nullable default Number getHeight()
      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.

    • getParams

      @Stability(Stable) @Nullable default Object getParams()
      Parameters passed to the lambda function.

      Default: - no parameters are passed to the lambda function

    • getUpdateOnRefresh

      @Stability(Stable) @Nullable default Boolean getUpdateOnRefresh()
      Update the widget on refresh.

      Default: true

    • getUpdateOnResize

      @Stability(Stable) @Nullable default Boolean getUpdateOnResize()
      Update the widget on resize.

      Default: true

    • getUpdateOnTimeRangeChange

      @Stability(Stable) @Nullable default Boolean getUpdateOnTimeRangeChange()
      Update the widget on time range change.

      Default: true

    • getWidth

      @Stability(Stable) @Nullable default Number getWidth()
      Width of the widget, in a grid of 24 units wide.

      Default: 6

    • builder

      @Stability(Stable) static CustomWidgetProps.Builder builder()
      Returns:
      a CustomWidgetProps.Builder of CustomWidgetProps