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 Summary
Modifier and TypeMethodDescriptionbuild()
static CustomWidget.Builder
create()
functionArn
(String functionArn) The Arn of the AWS Lambda function that returns HTML or JSON that will be displayed in the widget.Height of the widget.Parameters passed to the lambda function.The title of the widget.updateOnRefresh
(Boolean updateOnRefresh) Update the widget on refresh.updateOnResize
(Boolean updateOnResize) Update the widget on resize.updateOnTimeRangeChange
(Boolean updateOnTimeRangeChange) Update the widget on time range change.Width of the widget, in a grid of 24 units wide.
-
Method Details
-
create
- Returns:
- a new instance of
CustomWidget.Builder
.
-
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
The title of the widget.- Parameters:
title
- The title of the widget. This parameter is required.- Returns:
this
-
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
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
Update the widget on refresh.Default: true
- Parameters:
updateOnRefresh
- Update the widget on refresh. This parameter is required.- Returns:
this
-
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CustomWidget>
- Returns:
- a newly built instance of
CustomWidget
.
-