interface LocationCapacity
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.GameLift.Alpha.LocationCapacity |
![]() | github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#LocationCapacity |
![]() | software.amazon.awscdk.services.gamelift.alpha.LocationCapacity |
![]() | aws_cdk.aws_gamelift_alpha.LocationCapacity |
![]() | @aws-cdk/aws-gamelift-alpha ยป LocationCapacity |
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.
Example
declare const build: gamelift.Build;
// Locations can be added directly through constructor
const fleet = new gamelift.BuildFleet(this, 'Game server fleet', {
fleetName: 'test-fleet',
content: build,
instanceType: ec2.InstanceType.of(ec2.InstanceClass.C4, ec2.InstanceSize.LARGE),
runtimeConfiguration: {
serverProcesses: [{
launchPath: '/local/game/GameLiftExampleServer.x86_64',
}]
},
locations: [ {
region: 'eu-west-1',
capacity: {
desiredCapacity: 5,
minSize: 2,
maxSize: 10
}
}, {
region: 'us-east-1',
capacity: {
desiredCapacity: 5,
minSize: 2,
maxSize: 10
}
}]
});
// Or through dedicated methods
fleet.addLocation('ap-southeast-1', 5, 2, 10);
Properties
Name | Type | Description |
---|---|---|
desired | number | The number of Amazon EC2 instances you want to maintain in the specified fleet location. |
max | number | The maximum number of instances that are allowed in the specified fleet location. |
min | number | The minimum number of instances that are allowed in the specified fleet location. |
desiredCapacity?
Type:
number
(optional, default: the default value is 0)
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.
maxSize?
Type:
number
(optional, default: the default value is 1)
The maximum number of instances that are allowed in the specified fleet location.
minSize?
Type:
number
(optional, default: the default value is 0)
The minimum number of instances that are allowed in the specified fleet location.