Class CfnScalingPolicyPropsMixin.MetricStatProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.autoscaling.CfnScalingPolicyPropsMixin.MetricStatProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScalingPolicyPropsMixin.MetricStatProperty>
- Enclosing interface:
CfnScalingPolicyPropsMixin.MetricStatProperty
@Stability(Stable)
public static final class CfnScalingPolicyPropsMixin.MetricStatProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnScalingPolicyPropsMixin.MetricStatProperty>
A builder for
CfnScalingPolicyPropsMixin.MetricStatProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnScalingPolicyPropsMixin.MetricStatProperty.getMetric()metric(IResolvable metric) Sets the value ofCfnScalingPolicyPropsMixin.MetricStatProperty.getMetric()Sets the value ofCfnScalingPolicyPropsMixin.MetricStatProperty.getStat()Sets the value ofCfnScalingPolicyPropsMixin.MetricStatProperty.getUnit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metric
@Stability(Stable) public CfnScalingPolicyPropsMixin.MetricStatProperty.Builder metric(IResolvable metric) Sets the value ofCfnScalingPolicyPropsMixin.MetricStatProperty.getMetric()- Parameters:
metric- The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics .- Returns:
this
-
metric
@Stability(Stable) public CfnScalingPolicyPropsMixin.MetricStatProperty.Builder metric(CfnScalingPolicyPropsMixin.MetricProperty metric) Sets the value ofCfnScalingPolicyPropsMixin.MetricStatProperty.getMetric()- Parameters:
metric- The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics .- Returns:
this
-
stat
Sets the value ofCfnScalingPolicyPropsMixin.MetricStatProperty.getStat()- Parameters:
stat- The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide .The most commonly used metrics for predictive scaling are
AverageandSum.- Returns:
this
-
unit
Sets the value ofCfnScalingPolicyPropsMixin.MetricStatProperty.getUnit()- Parameters:
unit- The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnScalingPolicyPropsMixin.MetricStatProperty>- Returns:
- a new instance of
CfnScalingPolicyPropsMixin.MetricStatProperty - Throws:
NullPointerException- if any required attribute was not provided
-