AWS CloudFormation
User Guide (Version )

AWS::GameLift::Alias

The AWS::GameLift::Alias resource creates an alias for an Amazon GameLift (GameLift) fleet, which you can use to anonymize your fleet. You can reference the alias instead of a specific fleet when you create game sessions. For more information, see the CreateAlias action in the Amazon GameLift API Reference.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::GameLift::Alias", "Properties" : { "Description" : String, "Name" : String, "RoutingStrategy" : RoutingStrategy } }

YAML

Type: AWS::GameLift::Alias Properties: Description: String Name: String RoutingStrategy: RoutingStrategy

Properties

Description

Human-readable description of an alias.

Required: No

Type: String

Minimum: 1

Maximum: 1024

Update requires: No interruption

Name

Descriptive label that is associated with an alias. Alias names do not need to be unique.

Required: Yes

Type: String

Minimum: 1

Maximum: 1024

Pattern: .*\S.*

Update requires: No interruption

RoutingStrategy

A routing configuration that specifies where traffic is directed for this alias, such as to a fleet or to a message.

Required: Yes

Type: RoutingStrategy

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the alias ID, such as myalias-a01234b56-7890-1de2-f345-g67h8i901j2k.

For more information about using the Ref function, see Ref.

Examples

Create terminal alias

The following example creates a terminal alias named TerminalAlias with a generic terminal message.

JSON

"AliasResource": { "Type": "AWS::GameLift::Alias", "Properties": { "Name": "TerminalAlias", "Description": "A terminal alias", "RoutingStrategy": { "Type": "TERMINAL", "Message": "Terminal routing strategy message" } } }

YAML

AliasResource: Type: AWS::GameLift::Alias Properties: Name: "TerminalAlias" Description: "A terminal alias" RoutingStrategy: Type: "TERMINAL" Message: "Terminal routing strategy message"

See Also