Package org.cdk8s.plus25
Class ScalingRules.Builder
- java.lang.Object
-
- org.cdk8s.plus25.ScalingRules.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ScalingRules>
- Enclosing interface:
- ScalingRules
@Stability(Stable) public static final class ScalingRules.Builder extends Object implements software.amazon.jsii.Builder<ScalingRules>
A builder forScalingRules
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScalingRulesbuild()Builds the configured instance.ScalingRules.Builderpolicies(List<? extends ScalingPolicy> policies)Sets the value ofScalingRules.getPolicies()ScalingRules.BuilderstabilizationWindow(org.cdk8s.Duration stabilizationWindow)Sets the value ofScalingRules.getStabilizationWindow()ScalingRules.Builderstrategy(ScalingStrategy strategy)Sets the value ofScalingRules.getStrategy()
-
-
-
Method Detail
-
policies
@Stability(Stable) public ScalingRules.Builder policies(List<? extends ScalingPolicy> policies)
Sets the value ofScalingRules.getPolicies()- Parameters:
policies- The scaling policies.- Returns:
this
-
stabilizationWindow
@Stability(Stable) public ScalingRules.Builder stabilizationWindow(org.cdk8s.Duration stabilizationWindow)
Sets the value ofScalingRules.getStabilizationWindow()- Parameters:
stabilizationWindow- Defines the window of past metrics that the autoscaler should consider when calculating wether or not autoscaling should occur. Minimum duration is 1 second, max is 1 hour.- Returns:
this
-
strategy
@Stability(Stable) public ScalingRules.Builder strategy(ScalingStrategy strategy)
Sets the value ofScalingRules.getStrategy()- Parameters:
strategy- The strategy to use when scaling.- Returns:
this
-
build
@Stability(Stable) public ScalingRules build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ScalingRules>- Returns:
- a new instance of
ScalingRules - Throws:
NullPointerException- if any required attribute was not provided
-
-