Class GraphWidgetProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.GraphWidgetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GraphWidgetProps>
- Enclosing interface:
- GraphWidgetProps
@Stability(Stable)
public static final class GraphWidgetProps.Builder
extends Object
implements software.amazon.jsii.Builder<GraphWidgetProps>
A builder for
GraphWidgetProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofMetricWidgetProps.getHeight()
Sets the value ofGraphWidgetProps.getLeft()
leftAnnotations
(List<? extends HorizontalAnnotation> leftAnnotations) Sets the value ofGraphWidgetProps.getLeftAnnotations()
leftYAxis
(YAxisProps leftYAxis) Sets the value ofGraphWidgetProps.getLeftYAxis()
legendPosition
(LegendPosition legendPosition) Sets the value ofGraphWidgetProps.getLegendPosition()
Sets the value ofGraphWidgetProps.getLiveData()
Sets the value ofGraphWidgetProps.getPeriod()
Sets the value ofMetricWidgetProps.getRegion()
Sets the value ofGraphWidgetProps.getRight()
rightAnnotations
(List<? extends HorizontalAnnotation> rightAnnotations) Sets the value ofGraphWidgetProps.getRightAnnotations()
rightYAxis
(YAxisProps rightYAxis) Sets the value ofGraphWidgetProps.getRightYAxis()
setPeriodToTimeRange
(Boolean setPeriodToTimeRange) Sets the value ofGraphWidgetProps.getSetPeriodToTimeRange()
Sets the value ofGraphWidgetProps.getStacked()
Sets the value ofGraphWidgetProps.getStatistic()
Sets the value ofMetricWidgetProps.getTitle()
view
(GraphWidgetView view) Sets the value ofGraphWidgetProps.getView()
Sets the value ofMetricWidgetProps.getWidth()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
left
Sets the value ofGraphWidgetProps.getLeft()
- Parameters:
left
- Metrics to display on left Y axis.- Returns:
this
-
leftAnnotations
@Stability(Stable) public GraphWidgetProps.Builder leftAnnotations(List<? extends HorizontalAnnotation> leftAnnotations) Sets the value ofGraphWidgetProps.getLeftAnnotations()
- Parameters:
leftAnnotations
- Annotations for the left Y axis.- Returns:
this
-
leftYAxis
Sets the value ofGraphWidgetProps.getLeftYAxis()
- Parameters:
leftYAxis
- Left Y axis.- Returns:
this
-
legendPosition
Sets the value ofGraphWidgetProps.getLegendPosition()
- Parameters:
legendPosition
- Position of the legend.- Returns:
this
-
liveData
Sets the value ofGraphWidgetProps.getLiveData()
- Parameters:
liveData
- Whether the graph should show live data.- Returns:
this
-
period
Sets the value ofGraphWidgetProps.getPeriod()
- Parameters:
period
- The default period for all metrics in this widget. The period is the length of time represented by one data point on the graph. This default can be overridden within each metric definition.- Returns:
this
-
right
Sets the value ofGraphWidgetProps.getRight()
- Parameters:
right
- Metrics to display on right Y axis.- Returns:
this
-
rightAnnotations
@Stability(Stable) public GraphWidgetProps.Builder rightAnnotations(List<? extends HorizontalAnnotation> rightAnnotations) Sets the value ofGraphWidgetProps.getRightAnnotations()
- Parameters:
rightAnnotations
- Annotations for the right Y axis.- Returns:
this
-
rightYAxis
Sets the value ofGraphWidgetProps.getRightYAxis()
- Parameters:
rightYAxis
- Right Y axis.- Returns:
this
-
setPeriodToTimeRange
@Stability(Stable) public GraphWidgetProps.Builder setPeriodToTimeRange(Boolean setPeriodToTimeRange) Sets the value ofGraphWidgetProps.getSetPeriodToTimeRange()
- Parameters:
setPeriodToTimeRange
- Whether to show the value from the entire time range. Only applicable for Bar and Pie charts. If false, values will be from the most recent period of your chosen time range; if true, shows the value from the entire time range.- Returns:
this
-
stacked
Sets the value ofGraphWidgetProps.getStacked()
- Parameters:
stacked
- Whether the graph should be shown as stacked lines.- Returns:
this
-
statistic
Sets the value ofGraphWidgetProps.getStatistic()
- Parameters:
statistic
- The default statistic to be displayed for each metric. This default can be overridden within the definition of each individual metric- Returns:
this
-
view
Sets the value ofGraphWidgetProps.getView()
- Parameters:
view
- Display this metric.- Returns:
this
-
height
Sets the value ofMetricWidgetProps.getHeight()
- Parameters:
height
- Height of the widget.- Returns:
this
-
region
Sets the value ofMetricWidgetProps.getRegion()
- Parameters:
region
- The region the metrics of this graph should be taken from.- Returns:
this
-
title
Sets the value ofMetricWidgetProps.getTitle()
- Parameters:
title
- Title for the graph.- Returns:
this
-
width
Sets the value ofMetricWidgetProps.getWidth()
- Parameters:
width
- Width of the widget, in a grid of 24 units wide.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GraphWidgetProps>
- Returns:
- a new instance of
GraphWidgetProps
- Throws:
NullPointerException
- if any required attribute was not provided
-