Experimental
@aws-cdk/aws-gamelift-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
LocationCapacity Struct
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
ts
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
desiredCapacityoptionalnumberdesired_capacityoptionalint | floatdesiredCapacityoptionalNumberDesiredCapacityoptionaldoubleDesiredCapacityoptional*float64= 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.
maxSizeoptionalnumbermax_sizeoptionalint | floatmaxSizeoptionalNumberMaxSizeoptionaldoubleMaxSizeoptional*float64= 1#The maximum number of instances that are allowed in the specified fleet location.
minSizeoptionalnumbermin_sizeoptionalint | floatminSizeoptionalNumberMinSizeoptionaldoubleMinSizeoptional*float64= 0#The minimum number of instances that are allowed in the specified fleet location.