AutoScalingPolicy
- class aws_cdk.aws_gamelift_alpha.AutoScalingPolicy(*, target_tracking_configuration, estimated_instance_warmup=None)
Bases:
object
(experimental) Configuration settings for intelligent automatic scaling that uses target tracking.
After the Auto Scaling group is created, all updates to Auto Scaling policies, including changing this policy and adding or removing other policies, is done directly on the Auto Scaling group.
- Parameters:
target_tracking_configuration (
Union
[int
,float
]) – (experimental) Settings for a target-based scaling policy applied to Auto Scaling group. 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.estimated_instance_warmup (
Optional
[Duration
]) – (experimental) 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. Default: no instance warmup duration settled
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# launch_template: ec2.ILaunchTemplate # vpc: ec2.IVpc gamelift.GameServerGroup(self, "Game server group", game_server_group_name="sample-gameservergroup-name", instance_definitions=[gamelift.InstanceDefinition( instance_type=ec2.InstanceType.of(ec2.InstanceClass.C5, ec2.InstanceSize.LARGE) ), gamelift.InstanceDefinition( instance_type=ec2.InstanceType.of(ec2.InstanceClass.C4, ec2.InstanceSize.LARGE) )], launch_template=launch_template, vpc=vpc, auto_scaling_policy=gamelift.AutoScalingPolicy( estimated_instance_warmup=Duration.minutes(5), target_tracking_configuration=5 ) )
Attributes
- estimated_instance_warmup
(experimental) 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.
- Default:
no instance warmup duration settled
- Stability:
experimental
- target_tracking_configuration
(experimental) Settings for a target-based scaling policy applied to Auto Scaling group.
These settings are used to create a target-based policy that tracks the GameLift FleetIQ metric
PercentUtilizedGameServers
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.
- Stability:
experimental