@aws-cdk_aws-gamelift-alpha.GameSessionQueue

class GameSessionQueue (construct) ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.GameLift.Alpha.GameSessionQueue
Gogithub.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#GameSessionQueue
Javasoftware.amazon.awscdk.services.gamelift.alpha.GameSessionQueue
Pythonaws_cdk.aws_gamelift_alpha.GameSessionQueue
TypeScript (source)@aws-cdk/aws-gamelift-alpha ยป GameSessionQueue

Implements IConstruct, IDependable, IResource, IGameSessionQueue

The 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 gameSessionQueuees), 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.

Example

declare const fleet: gamelift.BuildFleet;
declare const alias: gamelift.Alias;

const queue = new gamelift.GameSessionQueue(this, 'GameSessionQueue', {
  gameSessionQueueName: 'my-queue-name',
  destinations: [fleet]
});
queue.addDestination(alias);

Initializer

new GameSessionQueue(scope: Construct, id: string, props: GameSessionQueueProps)

Parameters

  • scope Construct
  • id string
  • props GameSessionQueueProps

Construct Props

NameTypeDescription
destinations๐Ÿ”นIGameSessionQueueDestination[]A list of fleets and/or fleet alias that can be used to fulfill game session placement requests in the queue.
gameSessionQueueName๐Ÿ”นstringName of this gameSessionQueue.
allowedLocations?๐Ÿ”นstring[]A list of locations where a queue is allowed to place new game sessions.
customEventData?๐Ÿ”นstringInformation to be added to all events that are related to this game session queue.
notificationTarget?๐Ÿ”นITopicAn SNS topic is set up to receive game session placement notifications.
playerLatencyPolicies?๐Ÿ”นPlayerLatencyPolicy[]A set of policies that act as a sliding cap on player latency.
priorityConfiguration?๐Ÿ”นPriorityConfigurationCustom settings to use when prioritizing destinations and locations for game session placements.
timeout?๐Ÿ”นDurationThe maximum time, that a new game session placement request remains in the queue.

destinations๐Ÿ”น

Type: IGameSessionQueueDestination[]

A list of fleets and/or fleet alias that can be used to fulfill game session placement requests in the queue.

Destinations are listed in order of placement preference.


gameSessionQueueName๐Ÿ”น

Type: string

Name of this gameSessionQueue.


allowedLocations?๐Ÿ”น

Type: string[] (optional, default: game sessions can be placed in any queue location)

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.

For queues that have multi-location fleets, you can use a filter configuration allow placement with some, but not all of these locations.


customEventData?๐Ÿ”น

Type: string (optional, default: no customer event data)

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


notificationTarget?๐Ÿ”น

Type: ITopic (optional, default: no notification)

An SNS topic is set up to receive game session placement notifications.

See also: https://docs.aws.amazon.com/gamelift/latest/developerguide/queue-notification.html


playerLatencyPolicies?๐Ÿ”น

Type: PlayerLatencyPolicy[] (optional, default: no player latency policy)

A set of policies that act as a sliding cap on player latency.

FleetIQ works to deliver low latency for most players in a game session. These policies ensure that no individual player can be placed into a game with unreasonably high latency. Use multiple policies to gradually relax latency requirements a step at a time. Multiple policies are applied based on their maximum allowed latency, starting with the lowest value.


priorityConfiguration?๐Ÿ”น

Type: PriorityConfiguration (optional, default: no priority configuration)

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.


timeout?๐Ÿ”น

Type: Duration (optional, default: 50 seconds)

The maximum time, 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.

Properties

NameTypeDescription
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
gameSessionQueueArn๐Ÿ”นstringThe ARN of the gameSessionQueue.
gameSessionQueueName๐Ÿ”นstringThe Identifier of the gameSessionQueue.
node๐Ÿ”นNodeThe tree node.
stack๐Ÿ”นStackThe stack in which this resource is defined.

env๐Ÿ”น

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


gameSessionQueueArn๐Ÿ”น

Type: string

The ARN of the gameSessionQueue.


gameSessionQueueName๐Ÿ”น

Type: string

The Identifier of the gameSessionQueue.


node๐Ÿ”น

Type: Node

The tree node.


stack๐Ÿ”น

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
addDestination(destination)๐Ÿ”นAdds a destination to fulfill requests for new game sessions.
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.
metric(metricName, props?)๐Ÿ”นReturn the given named metric for this fleet.
metricAverageWaitTime(props?)๐Ÿ”นAverage amount of time that game session placement requests in the queue with status PENDING have been waiting to be fulfilled.
metricPlacementsCanceled(props?)๐Ÿ”นGame session placement requests that were canceled before timing out since the last report.
metricPlacementsFailed(props?)๐Ÿ”นGame session placement requests that failed for any reason since the last report.
metricPlacementsStarted(props?)๐Ÿ”นNew game session placement requests that were added to the queue since the last report.
metricPlacementsSucceeded(props?)๐Ÿ”นGame session placement requests that resulted in a new game session since the last report.
metricPlacementsTimedOut(props?)๐Ÿ”นGame session placement requests that reached the queue's timeout limit without being fulfilled since the last report.
toString()๐Ÿ”นReturns a string representation of this construct.
protected parseFilterConfiguration(props)๐Ÿ”น
protected parsePlayerLatencyPolicies(props)๐Ÿ”น
protected parsePriorityConfiguration(props)๐Ÿ”น
static fromGameSessionQueueArn(scope, id, gameSessionQueueArn)๐Ÿ”นImport an existing gameSessionQueue from its ARN.
static fromGameSessionQueueAttributes(scope, id, attrs)๐Ÿ”นImport an existing gameSessionQueue from its attributes.
static fromGameSessionQueueName(scope, id, gameSessionQueueName)๐Ÿ”นImport an existing gameSessionQueue from its name.

addDestination(destination)๐Ÿ”น

public addDestination(destination: IGameSessionQueueDestination): void

Parameters

  • destination IGameSessionQueueDestination โ€” A destination to add.

Adds a destination to fulfill requests for new game sessions.


applyRemovalPolicy(policy)๐Ÿ”น

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).


metric(metricName, props?)๐Ÿ”น

public metric(metricName: string, props?: MetricOptions): Metric

Parameters

  • metricName string
  • props MetricOptions

Returns

  • Metric

Return the given named metric for this fleet.


metricAverageWaitTime(props?)๐Ÿ”น

public metricAverageWaitTime(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

Average amount of time that game session placement requests in the queue with status PENDING have been waiting to be fulfilled.


metricPlacementsCanceled(props?)๐Ÿ”น

public metricPlacementsCanceled(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

Game session placement requests that were canceled before timing out since the last report.


metricPlacementsFailed(props?)๐Ÿ”น

public metricPlacementsFailed(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

Game session placement requests that failed for any reason since the last report.


metricPlacementsStarted(props?)๐Ÿ”น

public metricPlacementsStarted(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

New game session placement requests that were added to the queue since the last report.


metricPlacementsSucceeded(props?)๐Ÿ”น

public metricPlacementsSucceeded(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

Game session placement requests that resulted in a new game session since the last report.


metricPlacementsTimedOut(props?)๐Ÿ”น

public metricPlacementsTimedOut(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

Game session placement requests that reached the queue's timeout limit without being fulfilled since the last report.


toString()๐Ÿ”น

public toString(): string

Returns

  • string

Returns a string representation of this construct.


protected parseFilterConfiguration(props)๐Ÿ”น

protected parseFilterConfiguration(props: GameSessionQueueProps): FilterConfigurationProperty

Parameters

  • props GameSessionQueueProps

Returns

  • FilterConfigurationProperty

protected parsePlayerLatencyPolicies(props)๐Ÿ”น

protected parsePlayerLatencyPolicies(props: GameSessionQueueProps): PlayerLatencyPolicyProperty[]

Parameters

  • props GameSessionQueueProps

Returns

  • PlayerLatencyPolicyProperty[]

protected parsePriorityConfiguration(props)๐Ÿ”น

protected parsePriorityConfiguration(props: GameSessionQueueProps): PriorityConfigurationProperty

Parameters

  • props GameSessionQueueProps

Returns

  • PriorityConfigurationProperty

static fromGameSessionQueueArn(scope, id, gameSessionQueueArn)๐Ÿ”น

public static fromGameSessionQueueArn(scope: Construct, id: string, gameSessionQueueArn: string): IGameSessionQueue

Parameters

  • scope Construct
  • id string
  • gameSessionQueueArn string

Returns

  • IGameSessionQueue

Import an existing gameSessionQueue from its ARN.


static fromGameSessionQueueAttributes(scope, id, attrs)๐Ÿ”น

public static fromGameSessionQueueAttributes(scope: Construct, id: string, attrs: GameSessionQueueAttributes): IGameSessionQueue

Parameters

  • scope Construct
  • id string
  • attrs GameSessionQueueAttributes

Returns

  • IGameSessionQueue

Import an existing gameSessionQueue from its attributes.


static fromGameSessionQueueName(scope, id, gameSessionQueueName)๐Ÿ”น

public static fromGameSessionQueueName(scope: Construct, id: string, gameSessionQueueName: string): IGameSessionQueue

Parameters

  • scope Construct
  • id string
  • gameSessionQueueName string

Returns

  • IGameSessionQueue

Import an existing gameSessionQueue from its name.