Package org.cdk8s.plus25
Class ScalingPolicy.Builder
- java.lang.Object
-
- org.cdk8s.plus25.ScalingPolicy.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ScalingPolicy>
- Enclosing interface:
- ScalingPolicy
@Stability(Stable) public static final class ScalingPolicy.Builder extends Object implements software.amazon.jsii.Builder<ScalingPolicy>
A builder forScalingPolicy
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScalingPolicybuild()Builds the configured instance.ScalingPolicy.Builderduration(org.cdk8s.Duration duration)Sets the value ofScalingPolicy.getDuration()ScalingPolicy.Builderreplicas(Replicas replicas)Sets the value ofScalingPolicy.getReplicas()
-
-
-
Method Detail
-
replicas
@Stability(Stable) public ScalingPolicy.Builder replicas(Replicas replicas)
Sets the value ofScalingPolicy.getReplicas()- Parameters:
replicas- The type and quantity of replicas to change. This parameter is required.- Returns:
this
-
duration
@Stability(Stable) public ScalingPolicy.Builder duration(org.cdk8s.Duration duration)
Sets the value ofScalingPolicy.getDuration()- Parameters:
duration- The amount of time the scaling policy has to continue scaling before the target metric must be revalidated. Must be greater than 0 seconds and no longer than 30 minutes.- Returns:
this
-
build
@Stability(Stable) public ScalingPolicy build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ScalingPolicy>- Returns:
- a new instance of
ScalingPolicy - Throws:
NullPointerException- if any required attribute was not provided
-
-