Class Alias
- All Implemented Interfaces:
IResource,IAlias,IGameSessionQueueDestination,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.gamelift.alpha.IAlias
IAlias.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAlias(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedAlias(software.amazon.jsii.JsiiObjectRef objRef) Alias(software.constructs.Construct scope, String id, AliasProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IAliasfromAliasArn(software.constructs.Construct scope, String id, String aliasArn) (experimental) Import an existing alias from its ARN.static IAliasfromAliasAttributes(software.constructs.Construct scope, String id, AliasAttributes attrs) (experimental) Import an existing alias from its attributes.static IAliasfromAliasId(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.getFleet()(experimental) A fleet that the alias points to.Methods inherited from class software.amazon.awscdk.services.gamelift.alpha.AliasBase
getResourceArnForDestinationMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
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
(experimental) The ARN of the alias.- Specified by:
getAliasArnin interfaceIAlias- Specified by:
getAliasArnin classAliasBase
-
getAliasId
(experimental) The Identifier of the alias.- Specified by:
getAliasIdin interfaceIAlias- Specified by:
getAliasIdin classAliasBase
-
getFleet
(experimental) A fleet that the alias points to.
-