Class CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.autoscaling.CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty>
- Enclosing interface:
CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty
@Stability(Stable)
public static final class CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.getMetric()metric(IResolvable metric) Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.getMetric()Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.getPeriod()Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.getStat()Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.getUnit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metric
@Stability(Stable) public CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.Builder metric(IResolvable metric) Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.getMetric()- Parameters:
metric- The metric to use.- Returns:
this
-
metric
@Stability(Stable) public CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.Builder metric(CfnScalingPolicyPropsMixin.MetricProperty metric) Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.getMetric()- Parameters:
metric- The metric to use.- Returns:
this
-
period
@Stability(Stable) public CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.Builder period(Number period) Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.getPeriod()- Parameters:
period- The period of the metric in seconds. The default value is 60. Accepted values are 10, 30, and 60. For high resolution metric, set the value to less than 60. For more information, see Create a target tracking policy using high-resolution metrics for faster response .- Returns:
this
-
stat
@Stability(Stable) public CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.Builder stat(String stat) Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.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 metric for scaling is
Average.- Returns:
this
-
unit
@Stability(Stable) public CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.Builder unit(String unit) Sets the value ofCfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty.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.TargetTrackingMetricStatProperty>- Returns:
- a new instance of
CfnScalingPolicyPropsMixin.TargetTrackingMetricStatProperty - Throws:
NullPointerException- if any required attribute was not provided
-