Interface LocationCapacity

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
LocationCapacity.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:15.710Z") @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 Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for LocationCapacity
    static final class 
    An implementation for LocationCapacity
  • Method Summary

    Modifier and Type
    Method
    Description
     
    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

      @Stability(Experimental) @Nullable default Number 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: the default value is 0

    • getMaxSize

      @Stability(Experimental) @Nullable default Number getMaxSize()
      (experimental) The maximum number of instances that are allowed in the specified fleet location.

      Default: the default value is 1

    • getMinSize

      @Stability(Experimental) @Nullable default Number getMinSize()
      (experimental) The minimum number of instances that are allowed in the specified fleet location.

      Default: the default value is 0

    • builder

      @Stability(Experimental) static LocationCapacity.Builder builder()
      Returns:
      a LocationCapacity.Builder of LocationCapacity