LocationCapacity
- class aws_cdk.aws_gamelift_alpha.LocationCapacity(*, desired_capacity=None, max_size=None, min_size=None)
Bases:
object
(experimental) Current resource capacity settings in a specified fleet or location.
The location value might refer to a fleet’s remote location or its home Region.
- Parameters:
desired_capacity (
Union
[int
,float
,None
]) – (experimental) The number of Amazon EC2 instances you want to maintain in the specified fleet location. This value must fall between the minimum and maximum size limits. Default: the default value is 0max_size (
Union
[int
,float
,None
]) – (experimental) The maximum number of instances that are allowed in the specified fleet location. Default: the default value is 1min_size (
Union
[int
,float
,None
]) – (experimental) The minimum number of instances that are allowed in the specified fleet location. Default: the default value is 0
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# build: gamelift.Build # Locations can be added directly through constructor fleet = gamelift.BuildFleet(self, "Game server fleet", fleet_name="test-fleet", content=build, instance_type=ec2.InstanceType.of(ec2.InstanceClass.C4, ec2.InstanceSize.LARGE), runtime_configuration=gamelift.RuntimeConfiguration( server_processes=[gamelift.ServerProcess( launch_path="/local/game/GameLiftExampleServer.x86_64" )] ), locations=[gamelift.Location( region="eu-west-1", capacity=gamelift.LocationCapacity( desired_capacity=5, min_size=2, max_size=10 ) ), gamelift.Location( region="us-east-1", capacity=gamelift.LocationCapacity( desired_capacity=5, min_size=2, max_size=10 ) )] ) # Or through dedicated methods fleet.add_location("ap-southeast-1", 5, 2, 10)
Attributes
- desired_capacity
(experimental) The number of Amazon EC2 instances you want to maintain in the specified fleet location.
This value must fall between the minimum and maximum size limits.
- Default:
the default value is 0
- Stability:
experimental
- max_size
(experimental) The maximum number of instances that are allowed in the specified fleet location.
- Default:
the default value is 1
- Stability:
experimental
- min_size
(experimental) The minimum number of instances that are allowed in the specified fleet location.
- Default:
the default value is 0
- Stability:
experimental