java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.gamelift.alpha.FleetBase
All Implemented Interfaces:
IResource, IFleet, IGameSessionQueueDestination, IGrantable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable
Direct Known Subclasses:
BuildFleet

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:46.422Z") @Stability(Experimental) public abstract class FleetBase extends Resource implements IFleet
(experimental) Base class for new and imported GameLift fleet.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.gamelift.alpha.*;
 import software.amazon.awscdk.services.iam.*;
 Role role;
 IFleet fleetBase = FleetBase.fromFleetAttributes(this, "MyFleetBase", FleetAttributes.builder()
         .fleetArn("fleetArn")
         .fleetId("fleetId")
         .role(role)
         .build());
 
  • Constructor Details

    • FleetBase

      protected FleetBase(software.amazon.jsii.JsiiObjectRef objRef)
    • FleetBase

      protected FleetBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • FleetBase

      @Stability(Stable) protected FleetBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • FleetBase

      @Stability(Stable) protected FleetBase(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • fromFleetAttributes

      @Stability(Experimental) @NotNull public static IFleet fromFleetAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FleetAttributes attrs)
      (experimental) Import an existing fleet from its attributes.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • addAlias

      @Stability(Experimental) @NotNull public Alias addAlias(@NotNull String aliasName, @Nullable AliasOptions options)
      (experimental) Defines an alias for this fleet.

       FleetBase fleet;
       fleet.addAlias("Live");
       // Is equivalent to
       // Is equivalent to
       Alias.Builder.create(this, "AliasLive")
               .aliasName("Live")
               .fleet(fleet)
               .build();
       

      Parameters:
      aliasName - The name of the alias. This parameter is required.
      options - Alias options.
    • addAlias

      @Stability(Experimental) @NotNull public Alias addAlias(@NotNull String aliasName)
      (experimental) Defines an alias for this fleet.

       FleetBase fleet;
       fleet.addAlias("Live");
       // Is equivalent to
       // Is equivalent to
       Alias.Builder.create(this, "AliasLive")
               .aliasName("Live")
               .fleet(fleet)
               .build();
       

      Parameters:
      aliasName - The name of the alias. This parameter is required.
    • addInternalLocation

      @Stability(Experimental) public void addInternalLocation(@NotNull Location location)
      (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.

      Parameters:
      location - The location to add. This parameter is required.
    • addLocation

      @Stability(Experimental) public void addLocation(@NotNull String region, @Nullable Number desiredCapacity, @Nullable Number minSize, @Nullable Number maxSize)
      (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.

      Parameters:
      region - The AWS region to add. This parameter is required.
      desiredCapacity -
      minSize -
      maxSize -
    • addLocation

      @Stability(Experimental) public void addLocation(@NotNull String region, @Nullable Number desiredCapacity, @Nullable Number minSize)
      (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.

      Parameters:
      region - The AWS region to add. This parameter is required.
      desiredCapacity -
      minSize -
    • addLocation

      @Stability(Experimental) public void addLocation(@NotNull String region, @Nullable Number desiredCapacity)
      (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.

      Parameters:
      region - The AWS region to add. This parameter is required.
      desiredCapacity -
    • addLocation

      @Stability(Experimental) public void addLocation(@NotNull String region)
      (experimental) Adds a remote locations to deploy additional instances to and manage as part of the fleet.

      Parameters:
      region - The AWS region to add. This parameter is required.
    • grant

      @Stability(Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... actions)
      (experimental) Grant the grantee identity permissions to perform actions.

      Specified by:
      grant in interface IFleet
      Parameters:
      grantee - This parameter is required.
      actions - This parameter is required.
    • metric

      @Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
      (experimental) Return the given named metric for this fleet.

      Specified by:
      metric in interface IFleet
      Parameters:
      metricName - This parameter is required.
      props -
    • metric

      @Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName)
      (experimental) Return the given named metric for this fleet.

      Specified by:
      metric in interface IFleet
      Parameters:
      metricName - This parameter is required.
    • metricActiveInstances

      @Stability(Experimental) @NotNull public Metric metricActiveInstances(@Nullable MetricOptions props)
      (experimental) Instances with ACTIVE status, which means they are running active server processes.

      The count includes idle instances and those that are hosting one or more game sessions. This metric measures current total instance capacity.

      This metric can be used with automatic scaling.

      Specified by:
      metricActiveInstances in interface IFleet
      Parameters:
      props -
    • metricActiveInstances

      @Stability(Experimental) @NotNull public Metric metricActiveInstances()
      (experimental) Instances with ACTIVE status, which means they are running active server processes.

      The count includes idle instances and those that are hosting one or more game sessions. This metric measures current total instance capacity.

      This metric can be used with automatic scaling.

      Specified by:
      metricActiveInstances in interface IFleet
    • metricDesiredInstances

      @Stability(Experimental) @NotNull public Metric metricDesiredInstances(@Nullable MetricOptions props)
      (experimental) Target number of active instances that GameLift is working to maintain in the fleet.

      With automatic scaling, this value is determined based on the scaling policies currently in force. Without automatic scaling, this value is set manually. This metric is not available when viewing data for fleet metric groups.

      Specified by:
      metricDesiredInstances in interface IFleet
      Parameters:
      props -
    • metricDesiredInstances

      @Stability(Experimental) @NotNull public Metric metricDesiredInstances()
      (experimental) Target number of active instances that GameLift is working to maintain in the fleet.

      With automatic scaling, this value is determined based on the scaling policies currently in force. Without automatic scaling, this value is set manually. This metric is not available when viewing data for fleet metric groups.

      Specified by:
      metricDesiredInstances in interface IFleet
    • metricIdleInstances

      @Stability(Experimental) @NotNull public Metric metricIdleInstances(@Nullable MetricOptions props)
      (experimental) Active instances that are currently hosting zero (0) game sessions.

      This metric measures capacity that is available but unused. This metric can be used with automatic scaling.

      Specified by:
      metricIdleInstances in interface IFleet
      Parameters:
      props -
    • metricIdleInstances

      @Stability(Experimental) @NotNull public Metric metricIdleInstances()
      (experimental) Active instances that are currently hosting zero (0) game sessions.

      This metric measures capacity that is available but unused. This metric can be used with automatic scaling.

      Specified by:
      metricIdleInstances in interface IFleet
    • metricInstanceInterruptions

      @Stability(Experimental) @NotNull public Metric metricInstanceInterruptions(@Nullable MetricOptions props)
      (experimental) Number of spot instances that have been interrupted.

      Specified by:
      metricInstanceInterruptions in interface IFleet
      Parameters:
      props -
    • metricInstanceInterruptions

      @Stability(Experimental) @NotNull public Metric metricInstanceInterruptions()
      (experimental) Number of spot instances that have been interrupted.
      Specified by:
      metricInstanceInterruptions in interface IFleet
    • metricMaxInstances

      @Stability(Experimental) @NotNull public Metric metricMaxInstances(@Nullable MetricOptions props)
      (experimental) Maximum number of instances that are allowed for the fleet.

      A fleet's instance maximum determines the capacity ceiling during manual or automatic scaling up. This metric is not available when viewing data for fleet metric groups.

      Specified by:
      metricMaxInstances in interface IFleet
      Parameters:
      props -
    • metricMaxInstances

      @Stability(Experimental) @NotNull public Metric metricMaxInstances()
      (experimental) Maximum number of instances that are allowed for the fleet.

      A fleet's instance maximum determines the capacity ceiling during manual or automatic scaling up. This metric is not available when viewing data for fleet metric groups.

      Specified by:
      metricMaxInstances in interface IFleet
    • metricMinInstances

      @Stability(Experimental) @NotNull public Metric metricMinInstances(@Nullable MetricOptions props)
      (experimental) Minimum number of instances allowed for the fleet.

      A fleet's instance minimum determines the capacity floor during manual or automatic scaling down. This metric is not available when viewing data for fleet metric groups.

      Specified by:
      metricMinInstances in interface IFleet
      Parameters:
      props -
    • metricMinInstances

      @Stability(Experimental) @NotNull public Metric metricMinInstances()
      (experimental) Minimum number of instances allowed for the fleet.

      A fleet's instance minimum determines the capacity floor during manual or automatic scaling down. This metric is not available when viewing data for fleet metric groups.

      Specified by:
      metricMinInstances in interface IFleet
    • metricPercentIdleInstances

      @Stability(Experimental) @NotNull public Metric metricPercentIdleInstances(@Nullable MetricOptions props)
      (experimental) Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances).

      This metric can be used for automatic scaling.

      Specified by:
      metricPercentIdleInstances in interface IFleet
      Parameters:
      props -
    • metricPercentIdleInstances

      @Stability(Experimental) @NotNull public Metric metricPercentIdleInstances()
      (experimental) Percentage of all active instances that are idle (calculated as IdleInstances / ActiveInstances).

      This metric can be used for automatic scaling.

      Specified by:
      metricPercentIdleInstances in interface IFleet
    • parseLocationCapacity

      @Stability(Experimental) @Nullable protected CfnFleet.LocationCapacityProperty parseLocationCapacity(@Nullable LocationCapacity capacity)
      Parameters:
      capacity -
    • parseLocationCapacity

      @Stability(Experimental) @Nullable protected CfnFleet.LocationCapacityProperty parseLocationCapacity()
    • parseLocations

      @Stability(Experimental) @Nullable protected List<CfnFleet.LocationConfigurationProperty> parseLocations()
    • parseResourceCreationLimitPolicy

      @Stability(Experimental) @Nullable protected CfnFleet.ResourceCreationLimitPolicyProperty parseResourceCreationLimitPolicy(@NotNull FleetProps props)
      Parameters:
      props - This parameter is required.
    • parseRuntimeConfiguration

      @Stability(Experimental) @Nullable protected CfnFleet.RuntimeConfigurationProperty parseRuntimeConfiguration(@NotNull FleetProps props)
      Parameters:
      props - This parameter is required.
    • warnVpcPeeringAuthorizations

      @Stability(Experimental) protected void warnVpcPeeringAuthorizations(@NotNull software.constructs.Construct scope)
      Parameters:
      scope - This parameter is required.
    • getFleetArn

      @Stability(Experimental) @NotNull public abstract String getFleetArn()
      (experimental) The ARN of the fleet.
      Specified by:
      getFleetArn in interface IFleet
    • getFleetId

      @Stability(Experimental) @NotNull public abstract String getFleetId()
      (experimental) The Identifier of the fleet.
      Specified by:
      getFleetId in interface IFleet
    • getGrantPrincipal

      @Stability(Experimental) @NotNull public abstract IPrincipal getGrantPrincipal()
      (experimental) The principal this GameLift fleet is using.
      Specified by:
      getGrantPrincipal in interface IGrantable
    • getResourceArnForDestination

      @Stability(Experimental) @NotNull public String getResourceArnForDestination()
      (experimental) The ARN to put into the destination field of a game session queue.
      Specified by:
      getResourceArnForDestination in interface IGameSessionQueueDestination