Class CustomWidgetProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.CustomWidgetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CustomWidgetProps>
- Enclosing interface:
- CustomWidgetProps
@Stability(Stable)
public static final class CustomWidgetProps.Builder
extends Object
implements software.amazon.jsii.Builder<CustomWidgetProps>
A builder for
CustomWidgetProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.functionArn(String functionArn) Sets the value ofCustomWidgetProps.getFunctionArn()Sets the value ofCustomWidgetProps.getHeight()Sets the value ofCustomWidgetProps.getParams()Sets the value ofCustomWidgetProps.getTitle()updateOnRefresh(Boolean updateOnRefresh) Sets the value ofCustomWidgetProps.getUpdateOnRefresh()updateOnResize(Boolean updateOnResize) Sets the value ofCustomWidgetProps.getUpdateOnResize()updateOnTimeRangeChange(Boolean updateOnTimeRangeChange) Sets the value ofCustomWidgetProps.getUpdateOnTimeRangeChange()Sets the value ofCustomWidgetProps.getWidth()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
functionArn
Sets the value ofCustomWidgetProps.getFunctionArn()- 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
Sets the value ofCustomWidgetProps.getTitle()- Parameters:
title- The title of the widget. This parameter is required.- Returns:
this
-
height
Sets the value ofCustomWidgetProps.getHeight()- Parameters:
height- Height of the widget.- Returns:
this
-
params
Sets the value ofCustomWidgetProps.getParams()- Parameters:
params- Parameters passed to the lambda function.- Returns:
this
-
updateOnRefresh
Sets the value ofCustomWidgetProps.getUpdateOnRefresh()- Parameters:
updateOnRefresh- Update the widget on refresh.- Returns:
this
-
updateOnResize
Sets the value ofCustomWidgetProps.getUpdateOnResize()- Parameters:
updateOnResize- Update the widget on resize.- Returns:
this
-
updateOnTimeRangeChange
@Stability(Stable) public CustomWidgetProps.Builder updateOnTimeRangeChange(Boolean updateOnTimeRangeChange) Sets the value ofCustomWidgetProps.getUpdateOnTimeRangeChange()- Parameters:
updateOnTimeRangeChange- Update the widget on time range change.- Returns:
this
-
width
Sets the value ofCustomWidgetProps.getWidth()- Parameters:
width- Width of the widget, in a grid of 24 units wide.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CustomWidgetProps>- Returns:
- a new instance of
CustomWidgetProps - Throws:
NullPointerException- if any required attribute was not provided
-