Class AutoScalingPolicy.Builder
java.lang.Object
software.amazon.awscdk.services.gamelift.alpha.AutoScalingPolicy.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AutoScalingPolicy>
- Enclosing interface:
AutoScalingPolicy
@Stability(Experimental)
public static final class AutoScalingPolicy.Builder
extends Object
implements software.amazon.jsii.Builder<AutoScalingPolicy>
A builder for
AutoScalingPolicy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.estimatedInstanceWarmup
(Duration estimatedInstanceWarmup) Sets the value ofAutoScalingPolicy.getEstimatedInstanceWarmup()
targetTrackingConfiguration
(Number targetTrackingConfiguration) Sets the value ofAutoScalingPolicy.getTargetTrackingConfiguration()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
targetTrackingConfiguration
@Stability(Experimental) public AutoScalingPolicy.Builder targetTrackingConfiguration(Number targetTrackingConfiguration) Sets the value ofAutoScalingPolicy.getTargetTrackingConfiguration()
- Parameters:
targetTrackingConfiguration
- Settings for a target-based scaling policy applied to Auto Scaling group. This parameter is required. These settings are used to create a target-based policy that tracks the GameLift FleetIQ metricPercentUtilizedGameServers
and specifies a target value for the metric.As player usage changes, the policy triggers to adjust the game server group capacity so that the metric returns to the target value.
- Returns:
this
-
estimatedInstanceWarmup
@Stability(Experimental) public AutoScalingPolicy.Builder estimatedInstanceWarmup(Duration estimatedInstanceWarmup) Sets the value ofAutoScalingPolicy.getEstimatedInstanceWarmup()
- Parameters:
estimatedInstanceWarmup
- Length of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ. Specifying a warm-up time can be useful, particularly with game servers that take a long time to start up, because it avoids prematurely starting new instances.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AutoScalingPolicy>
- Returns:
- a new instance of
AutoScalingPolicy
- Throws:
NullPointerException
- if any required attribute was not provided
-