Class MetricConfig.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.MetricConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<MetricConfig>
- Enclosing interface:
MetricConfig
@Stability(Stable)
public static final class MetricConfig.Builder
extends Object
implements software.amazon.jsii.Builder<MetricConfig>
A builder for
MetricConfig-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.mathExpression(MetricExpressionConfig mathExpression) Sets the value ofMetricConfig.getMathExpression()metricStat(MetricStatConfig metricStat) Sets the value ofMetricConfig.getMetricStat()renderingProperties(Map<String, ? extends Object> renderingProperties) Sets the value ofMetricConfig.getRenderingProperties()searchExpression(MetricExpressionConfig searchExpression) Sets the value ofMetricConfig.getSearchExpression()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
mathExpression
@Stability(Stable) public MetricConfig.Builder mathExpression(MetricExpressionConfig mathExpression) Sets the value ofMetricConfig.getMathExpression()- Parameters:
mathExpression- In case the metric is a math expression, the details of the math expression.- Returns:
this
-
metricStat
Sets the value ofMetricConfig.getMetricStat()- Parameters:
metricStat- In case the metric represents a query, the details of the query.- Returns:
this
-
renderingProperties
@Stability(Stable) public MetricConfig.Builder renderingProperties(Map<String, ? extends Object> renderingProperties) Sets the value ofMetricConfig.getRenderingProperties()- Parameters:
renderingProperties- Additional properties which will be rendered if the metric is used in a dashboard. Examples are 'label' and 'color', but any key in here will be added to dashboard graphs.- Returns:
this
-
searchExpression
@Stability(Stable) public MetricConfig.Builder searchExpression(MetricExpressionConfig searchExpression) Sets the value ofMetricConfig.getSearchExpression()- Parameters:
searchExpression- In case the metric is a search expression, the details of the search expression.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MetricConfig>- Returns:
- a new instance of
MetricConfig - Throws:
NullPointerException- if any required attribute was not provided
-