Package org.cdk8s.plus24.k8s
Class HpaScalingRulesV2.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.HpaScalingRulesV2.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<HpaScalingRulesV2>
- Enclosing interface:
- HpaScalingRulesV2
@Stability(Stable) public static final class HpaScalingRulesV2.Builder extends Object implements software.amazon.jsii.Builder<HpaScalingRulesV2>
A builder forHpaScalingRulesV2
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HpaScalingRulesV2
build()
Builds the configured instance.HpaScalingRulesV2.Builder
policies(List<? extends HpaScalingPolicyV2> policies)
Sets the value ofHpaScalingRulesV2.getPolicies()
HpaScalingRulesV2.Builder
selectPolicy(String selectPolicy)
Sets the value ofHpaScalingRulesV2.getSelectPolicy()
HpaScalingRulesV2.Builder
stabilizationWindowSeconds(Number stabilizationWindowSeconds)
Sets the value ofHpaScalingRulesV2.getStabilizationWindowSeconds()
-
-
-
Method Detail
-
policies
@Stability(Stable) public HpaScalingRulesV2.Builder policies(List<? extends HpaScalingPolicyV2> policies)
Sets the value ofHpaScalingRulesV2.getPolicies()
- Parameters:
policies
- policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid- Returns:
this
-
selectPolicy
@Stability(Stable) public HpaScalingRulesV2.Builder selectPolicy(String selectPolicy)
Sets the value ofHpaScalingRulesV2.getSelectPolicy()
- Parameters:
selectPolicy
- selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.- Returns:
this
-
stabilizationWindowSeconds
@Stability(Stable) public HpaScalingRulesV2.Builder stabilizationWindowSeconds(Number stabilizationWindowSeconds)
Sets the value ofHpaScalingRulesV2.getStabilizationWindowSeconds()
- Parameters:
stabilizationWindowSeconds
- StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).- Returns:
this
-
build
@Stability(Stable) public HpaScalingRulesV2 build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<HpaScalingRulesV2>
- Returns:
- a new instance of
HpaScalingRulesV2
- Throws:
NullPointerException
- if any required attribute was not provided
-
-