AWS::GameLift::GameSessionQueue - AWS CloudFormation

AWS::GameLift::GameSessionQueue

The AWS::GameLift::GameSessionQueue resource creates a placement queue that processes requests for new game sessions. A queue uses FleetIQ algorithms to determine the best placement locations and find an available game server, then prompts the game server to start a new game session. Queues can have destinations (GameLift fleets or aliases), which determine where the queue can place new game sessions. A queue can have destinations with varied fleet type (Spot and On-Demand), instance type, and AWS Region.

Syntax

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

JSON

{ "Type" : "AWS::GameLift::GameSessionQueue", "Properties" : { "CustomEventData" : String, "Destinations" : [ GameSessionQueueDestination, ... ], "FilterConfiguration" : FilterConfiguration, "Name" : String, "NotificationTarget" : String, "PlayerLatencyPolicies" : [ PlayerLatencyPolicy, ... ], "PriorityConfiguration" : PriorityConfiguration, "Tags" : [ Tag, ... ], "TimeoutInSeconds" : Integer } }

Properties

CustomEventData

Information to be added to all events that are related to this game session queue.

Required: No

Type: String

Pattern: [\s\S]*

Minimum: 1

Maximum: 256

Update requires: No interruption

Destinations

A list of fleets and/or fleet aliases that can be used to fulfill game session placement requests in the queue. Destinations are identified by either a fleet ARN or a fleet alias ARN, and are listed in order of placement preference.

Required: No

Type: Array of GameSessionQueueDestination

Update requires: No interruption

FilterConfiguration

A list of locations where a queue is allowed to place new game sessions. Locations are specified in the form of AWS Region codes, such as us-west-2. If this parameter is not set, game sessions can be placed in any queue location.

Required: No

Type: FilterConfiguration

Update requires: No interruption

Name

A descriptive label that is associated with game session queue. Queue names must be unique within each Region.

Required: Yes

Type: String

Pattern: [a-zA-Z0-9-]+

Minimum: 1

Maximum: 128

Update requires: Replacement

NotificationTarget

An SNS topic ARN that is set up to receive game session placement notifications. See Setting up notifications for game session placement.

Required: No

Type: String

Pattern: [a-zA-Z0-9:_-]*(\.fifo)?

Minimum: 1

Maximum: 300

Update requires: No interruption

PlayerLatencyPolicies

A set of policies that enforce a sliding cap on player latency when processing game sessions placement requests. Use multiple policies to gradually relax the cap over time if Amazon GameLift can't make a placement. Policies are evaluated in order starting with the lowest maximum latency value.

Required: No

Type: Array of PlayerLatencyPolicy

Update requires: No interruption

PriorityConfiguration

Custom settings to use when prioritizing destinations and locations for game session placements. This configuration replaces the FleetIQ default prioritization process. Priority types that are not explicitly named will be automatically applied at the end of the prioritization process.

Required: No

Type: PriorityConfiguration

Update requires: No interruption

Tags

A list of labels to assign to the new game session queue resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

Required: No

Type: Array of Tag

Maximum: 200

Update requires: No interruption

TimeoutInSeconds

The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

Required: No

Type: Integer

Minimum: 0

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the name of the game session queue, which is unique within each Region.

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

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

The unique Amazon Resource Name (ARN) for the GameSessionQueue.

Name

A descriptive label that is associated with a game session queue. Names are unique within each Region.

Examples

Create a Game Session Queue

The following example creates a GameLift game session queue named MyGameSessionQueue. The queue is configured with two destinations, one using a fleet ID and one using an alias ID. The queue has a latency policy.

JSON

{ "Resources": { "Queue": { "Type": "AWS::GameLift::GameSessionQueue", "Properties": { "Name": "MyGameSessionQueue", "TimeoutInSeconds": 60, "NotificationTarget": "arn:aws:sns:us-west-2:111122223333:My_Placement_SNS_Topic", "Destinations": [ { "DestinationArn": "arn:aws:gamelift:us-west-2:012345678912:fleet/fleet-id" }, { "DestinationArn": "arn:aws:gamelift:us-west-2:012345678912:alias/alias-id" } ], "PlayerLatencyPolicies": [ { "MaximumIndividualPlayerLatencyMilliseconds": 1000, "PolicyDurationSeconds": 60 } ], "PriorityConfiguration": { "LocationOrder": [ "us-west-2", "us-east-1" ], "PriorityOrder": [ "COST", "LATENCY", "LOCATION", "DESTINATION" ] }, "FilterConfiguration": { "AllowedLocations": [ "us-east-1", "us-west-2" ] } } } } }

YAML

Resources: Queue: Type: "AWS::GameLift::GameSessionQueue" Properties: Name: "MyGameSessionQueue" TimeoutInSeconds: 60 NotificationTarget: "arn:aws:sns:us-west-2:111122223333:My_Placement_SNS_Topic" Destinations: # DestinationArn can be either an Alias arn or Fleet arn that you own - DestinationArn: "arn:aws:gamelift:us-west-2:012345678912:fleet/fleet-id" - DestinationArn: "arn:aws:gamelift:us-west-2:012345678912:alias/alias-id" PlayerLatencyPolicies: - MaximumIndividualPlayerLatencyMilliseconds: 1000 PolicyDurationSeconds: 60 PriorityConfiguration: LocationOrder: - 'us-west-2' - 'us-east-1' PriorityOrder: - 'COST' - 'LATENCY' - 'LOCATION' - 'DESTINATION' FilterConfiguration: AllowedLocations: - 'us-east-1' - 'us-west-2'

See also