java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IResource, IAlias, IGameSessionQueueDestination, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:39.186Z") @Stability(Experimental) public class Alias extends AliasBase
(experimental) A Amazon GameLift alias is used to abstract a fleet designation.

Fleet designations tell GameLift where to search for available resources when creating new game sessions for players. Use aliases instead of specific fleet IDs to seamlessly switch player traffic from one fleet to another by changing the alias's target location.

Aliases are useful in games that don't use queues. Switching fleets in a queue is a simple matter of creating a new fleet, adding it to the queue, and removing the old fleet, none of which is visible to players. In contrast, game clients that don't use queues must specify which fleet to use when communicating with the GameLift service. Without aliases, a fleet switch requires updates to your game code and possibly distribution of an updated game clients to players.

When updating the fleet-id an alias points to, there is a transition period of up to 2 minutes where game sessions on the alias may end up on the old fleet.

Example:

 BuildFleet fleet;
 // Add an alias to an existing fleet using a dedicated fleet method
 Alias liveAlias = fleet.addAlias("live");
 // You can also create a standalone alias
 // You can also create a standalone alias
 Alias.Builder.create(this, "TerminalAlias")
         .aliasName("terminal-alias")
         .terminalMessage("A terminal message")
         .build();
 

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    (experimental) A fluent builder for Alias.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.gamelift.alpha.IAlias

    IAlias.Jsii$Default

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default

    Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource

    IResource.Jsii$Default
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Alias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Alias(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    Alias(software.constructs.Construct scope, String id, AliasProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static IAlias
    fromAliasArn(software.constructs.Construct scope, String id, String aliasArn)
    (experimental) Import an existing alias from its ARN.
    static IAlias
    fromAliasAttributes(software.constructs.Construct scope, String id, AliasAttributes attrs)
    (experimental) Import an existing alias from its attributes.
    static IAlias
    fromAliasId(software.constructs.Construct scope, String id, String aliasId)
    (experimental) Import an existing alias from its identifier.
    (experimental) The ARN of the alias.
    (experimental) The Identifier of the alias.
    (experimental) A fleet that the alias points to.

    Methods inherited from class software.amazon.awscdk.services.gamelift.alpha.AliasBase

    getResourceArnForDestination

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.constructs.IConstruct

    getNode

    Methods inherited from interface software.amazon.awscdk.IResource

    applyRemovalPolicy, getEnv, getStack

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Alias

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

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

      @Stability(Experimental) public Alias(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AliasProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromAliasArn

      @Stability(Experimental) @NotNull public static IAlias fromAliasArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String aliasArn)
      (experimental) Import an existing alias from its ARN.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      aliasArn - This parameter is required.
    • fromAliasAttributes

      @Stability(Experimental) @NotNull public static IAlias fromAliasAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AliasAttributes attrs)
      (experimental) Import an existing alias from its attributes.

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

      @Stability(Experimental) @NotNull public static IAlias fromAliasId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String aliasId)
      (experimental) Import an existing alias from its identifier.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      aliasId - This parameter is required.
    • getAliasArn

      @Stability(Experimental) @NotNull public String getAliasArn()
      (experimental) The ARN of the alias.
      Specified by:
      getAliasArn in interface IAlias
      Specified by:
      getAliasArn in class AliasBase
    • getAliasId

      @Stability(Experimental) @NotNull public String getAliasId()
      (experimental) The Identifier of the alias.
      Specified by:
      getAliasId in interface IAlias
      Specified by:
      getAliasId in class AliasBase
    • getFleet

      @Stability(Experimental) @Nullable public IFleet getFleet()
      (experimental) A fleet that the alias points to.