Class CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.applicationautoscaling.CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty>
- Enclosing interface:
CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty
@Stability(Stable)
public static final class CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadjustmentType(String adjustmentType) build()Builds the configured instance.metricAggregationType(String metricAggregationType) minAdjustmentMagnitude(Number minAdjustmentMagnitude) stepAdjustments(List<? extends Object> stepAdjustments) stepAdjustments(IResolvable stepAdjustments)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
adjustmentType
@Stability(Stable) public CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.Builder adjustmentType(String adjustmentType) Sets the value ofCfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.getAdjustmentType()- Parameters:
adjustmentType- Specifies whether theScalingAdjustmentvalue in theStepAdjustmentproperty is an absolute number or a percentage of the current capacity.- Returns:
this
-
cooldown
@Stability(Stable) public CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.Builder cooldown(Number cooldown) - Parameters:
cooldown- The amount of time, in seconds, to wait for a previous scaling activity to take effect. If not specified, the default value is 300. For more information, see Cooldown period in the Application Auto Scaling User Guide .- Returns:
this
-
metricAggregationType
@Stability(Stable) public CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.Builder metricAggregationType(String metricAggregationType) Sets the value ofCfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.getMetricAggregationType()- Parameters:
metricAggregationType- The aggregation type for the CloudWatch metrics. Valid values areMinimum,Maximum, andAverage. If the aggregation type is null, the value is treated asAverage.- Returns:
this
-
minAdjustmentMagnitude
@Stability(Stable) public CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.Builder minAdjustmentMagnitude(Number minAdjustmentMagnitude) Sets the value ofCfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.getMinAdjustmentMagnitude()- Parameters:
minAdjustmentMagnitude- The minimum value to scale by when the adjustment type isPercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Amazon ECS service by 25 percent and you specify aMinAdjustmentMagnitudeof 2. If the service has 4 tasks and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified aMinAdjustmentMagnitudeof 2, Application Auto Scaling scales out the service by 2 tasks.- Returns:
this
-
stepAdjustments
@Stability(Stable) public CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.Builder stepAdjustments(IResolvable stepAdjustments) Sets the value ofCfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.getStepAdjustments()- Parameters:
stepAdjustments- A set of adjustments that enable you to scale based on the size of the alarm breach. At least one step adjustment is required if you are adding a new step scaling policy configuration.- Returns:
this
-
stepAdjustments
@Stability(Stable) public CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.Builder stepAdjustments(List<? extends Object> stepAdjustments) Sets the value ofCfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty.getStepAdjustments()- Parameters:
stepAdjustments- A set of adjustments that enable you to scale based on the size of the alarm breach. At least one step adjustment is required if you are adding a new step scaling policy configuration.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty>- Returns:
- a new instance of
CfnScalingPolicyPropsMixin.StepScalingPolicyConfigurationProperty - Throws:
NullPointerException- if any required attribute was not provided
-