Class MetricExpressionConfig.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.MetricExpressionConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<MetricExpressionConfig>
- Enclosing interface:
- MetricExpressionConfig
@Stability(Stable)
public static final class MetricExpressionConfig.Builder
extends Object
implements software.amazon.jsii.Builder<MetricExpressionConfig>
A builder for
MetricExpressionConfig-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.expression(String expression) Sets the value ofMetricExpressionConfig.getExpression()Sets the value ofMetricExpressionConfig.getPeriod()searchAccount(String searchAccount) Sets the value ofMetricExpressionConfig.getSearchAccount()searchRegion(String searchRegion) Sets the value ofMetricExpressionConfig.getSearchRegion()usingMetrics(Map<String, ? extends IMetric> usingMetrics) Sets the value ofMetricExpressionConfig.getUsingMetrics()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
expression
Sets the value ofMetricExpressionConfig.getExpression()- Parameters:
expression- Math expression for the metric. This parameter is required.- Returns:
this
-
period
Sets the value ofMetricExpressionConfig.getPeriod()- Parameters:
period- How many seconds to aggregate over. This parameter is required.- Returns:
this
-
usingMetrics
@Stability(Stable) public MetricExpressionConfig.Builder usingMetrics(Map<String, ? extends IMetric> usingMetrics) Sets the value ofMetricExpressionConfig.getUsingMetrics()- Parameters:
usingMetrics- Metrics used in the math expression. This parameter is required.- Returns:
this
-
searchAccount
Sets the value ofMetricExpressionConfig.getSearchAccount()- Parameters:
searchAccount- Account to evaluate search expressions within.- Returns:
this
-
searchRegion
Sets the value ofMetricExpressionConfig.getSearchRegion()- Parameters:
searchRegion- Region to evaluate search expressions within.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MetricExpressionConfig>- Returns:
- a new instance of
MetricExpressionConfig - Throws:
NullPointerException- if any required attribute was not provided
-