Class Alias
(experimental) A Amazon GameLift alias is used to abstract a fleet designation.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.GameLift.Alpha
Assembly: Amazon.CDK.AWS.GameLift.Alpha.dll
Syntax (csharp)
public class Alias : AliasBase, IAlias, IResource, IGameSessionQueueDestination
Syntax (vb)
Public Class Alias
Inherits AliasBase
Implements IAlias, IResource, IGameSessionQueueDestination
Remarks
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.
Stability: Experimental
See: https://docs.aws.amazon.com/gamelift/latest/developerguide/aliases-creating.html
Resource: AWS::GameLift::Alias
ExampleMetadata: infused
Examples
BuildFleet fleet;
// Add an alias to an existing fleet using a dedicated fleet method
var liveAlias = fleet.AddAlias("live");
// You can also create a standalone alias
// You can also create a standalone alias
new Alias(this, "TerminalAlias", new AliasProps {
AliasName = "terminal-alias",
TerminalMessage = "A terminal message"
});
Synopsis
Constructors
Alias(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Alias(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Alias(Construct, String, IAliasProps) |
Properties
AliasArn | (experimental) The ARN of the alias. |
AliasId | (experimental) The Identifier of the alias. |
Fleet | (experimental) A fleet that the alias points to. |
Methods
FromAliasArn(Construct, String, String) | (experimental) Import an existing alias from its ARN. |
FromAliasAttributes(Construct, String, IAliasAttributes) | (experimental) Import an existing alias from its attributes. |
FromAliasId(Construct, String, String) | (experimental) Import an existing alias from its identifier. |
Constructors
Alias(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Alias(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Alias(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Alias(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Alias(Construct, String, IAliasProps)
public Alias(Construct scope, string id, IAliasProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IAliasProps
Remarks
Stability: Experimental
Properties
AliasArn
(experimental) The ARN of the alias.
public override string AliasArn { get; }
Property Value
System.String
Overrides
Remarks
Stability: Experimental
AliasId
(experimental) The Identifier of the alias.
public override string AliasId { get; }
Property Value
System.String
Overrides
Remarks
Stability: Experimental
Fleet
(experimental) A fleet that the alias points to.
public virtual IFleet Fleet { get; }
Property Value
Remarks
Stability: Experimental
Methods
FromAliasArn(Construct, String, String)
(experimental) Import an existing alias from its ARN.
public static IAlias FromAliasArn(Construct scope, string id, string aliasArn)
Parameters
- scope Constructs.Construct
- id System.String
- aliasArn System.String
Returns
Remarks
Stability: Experimental
FromAliasAttributes(Construct, String, IAliasAttributes)
(experimental) Import an existing alias from its attributes.
public static IAlias FromAliasAttributes(Construct scope, string id, IAliasAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IAliasAttributes
Returns
Remarks
Stability: Experimental
FromAliasId(Construct, String, String)
(experimental) Import an existing alias from its identifier.
public static IAlias FromAliasId(Construct scope, string id, string aliasId)
Parameters
- scope Constructs.Construct
- id System.String
- aliasId System.String
Returns
Remarks
Stability: Experimental