Interface LocationCapacity
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
LocationCapacity.Jsii$Proxy
@Generated(value="jsii-pacmak/1.125.0 (build fdbe357)",
date="2026-01-19T12:04:05.724Z")
@Stability(Experimental)
public interface LocationCapacity
extends software.amazon.jsii.JsiiSerializable
(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.
Example:
Build build;
// Locations can be added directly through constructor
BuildFleet fleet = BuildFleet.Builder.create(this, "Game server fleet")
.fleetName("test-fleet")
.content(build)
.instanceType(InstanceType.of(InstanceClass.C4, InstanceSize.LARGE))
.runtimeConfiguration(RuntimeConfiguration.builder()
.serverProcesses(List.of(ServerProcess.builder()
.launchPath("/local/game/GameLiftExampleServer.x86_64")
.build()))
.build())
.locations(List.of(Location.builder()
.region("eu-west-1")
.capacity(LocationCapacity.builder()
.desiredCapacity(5)
.minSize(2)
.maxSize(10)
.build())
.build(), Location.builder()
.region("us-east-1")
.capacity(LocationCapacity.builder()
.desiredCapacity(5)
.minSize(2)
.maxSize(10)
.build())
.build()))
.build();
// Or through dedicated methods
fleet.addLocation("ap-southeast-1", 5, 2, 10);
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forLocationCapacitystatic final classAn implementation forLocationCapacity -
Method Summary
Modifier and TypeMethodDescriptionstatic LocationCapacity.Builderbuilder()default Number(experimental) The number of Amazon EC2 instances you want to maintain in the specified fleet location.default Number(experimental) The maximum number of instances that are allowed in the specified fleet location.default Number(experimental) The minimum number of instances that are allowed in the specified fleet location.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDesiredCapacity
(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: 0
-
getMaxSize
(experimental) The maximum number of instances that are allowed in the specified fleet location.Default: 1
-
getMinSize
(experimental) The minimum number of instances that are allowed in the specified fleet location.Default: 0
-
builder
- Returns:
- a
LocationCapacity.BuilderofLocationCapacity
-