Establishes a new queue for processing requests to place new game sessions. A queue identifies where new game sessions can be hosted – by specifying a list of destinations (fleets or aliases) – and how long requests can wait in the queue before timing out. You can set up a queue to try to place game sessions on fleets in multiple Regions. To add placement requests to a queue, call StartGameSessionPlacement and reference the queue name.
Destination order. When processing a request for a game session, Amazon GameLift tries each destination in order until it finds one with available resources to host the new game session. A queue’s default order is determined by how destinations are listed. The default order is overridden when a game session placement request provides player latency information. Player latency information enables Amazon GameLift to prioritize destinations where players report the lowest average latency, as a result placing the new game session where the majority of players will have the best possible gameplay experience.
Player latency policies. For placement requests containing player latency information, use player latency policies to protect individual players from very high latencies. With a latency cap, even when a destination can deliver a low latency for most players, the game is not placed where any individual player is reporting latency higher than a policy’s maximum. A queue can have multiple latency policies, which are enforced consecutively starting with the policy with the lowest latency cap. Use multiple policies to gradually relax latency controls; for example, you might set a policy with a low latency cap for the first 60 seconds, a second policy with a higher cap for the next 60 seconds, etc.
To create a new queue, provide a name, timeout value, a list of destinations and, if desired, a set of latency policies. If successful, a new queue object is returned.
CreateGameSessionQueue
DescribeGameSessionQueues
UpdateGameSessionQueue
DeleteGameSessionQueue
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
create-game-session-queue
--name <value>
[--timeout-in-seconds <value>]
[--player-latency-policies <value>]
[--destinations <value>]
[--tags <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--name
(string)
A descriptive label that is associated with game session queue. Queue names must be unique within each Region.
--timeout-in-seconds
(integer)
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.
--player-latency-policies
(list)
A collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, the policy is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement. A player latency policy must set a value for
MaximumIndividualPlayerLatencyMilliseconds
. If none is set, this API request fails.(structure)
Queue setting that determines the highest latency allowed for individual players when placing a game session. When a latency policy is in force, a game session cannot be placed with any fleet in a Region where a player reports latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.
CreateGameSessionQueue
DescribeGameSessionQueues
UpdateGameSessionQueue
DeleteGameSessionQueue
MaximumIndividualPlayerLatencyMilliseconds -> (integer)
The maximum latency value that is allowed for any player, in milliseconds. All policies must have a value set for this property.
PolicyDurationSeconds -> (integer)
The length of time, in seconds, that the policy is enforced while placing a new game session. A null value for this property means that the policy is enforced until the queue times out.
Shorthand Syntax:
MaximumIndividualPlayerLatencyMilliseconds=integer,PolicyDurationSeconds=integer ...
JSON Syntax:
[
{
"MaximumIndividualPlayerLatencyMilliseconds": integer,
"PolicyDurationSeconds": integer
}
...
]
--destinations
(list)
A list of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.
(structure)
Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination that is configured for a queue.
CreateGameSessionQueue
DescribeGameSessionQueues
UpdateGameSessionQueue
DeleteGameSessionQueue
DestinationArn -> (string)
The Amazon Resource Name (ARN) that is assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a Region name, provide a unique identifier across all Regions.
Shorthand Syntax:
DestinationArn=string ...
JSON Syntax:
[
{
"DestinationArn": "string"
}
...
]
--tags
(list)
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.
(structure)
A label that can be assigned to a GameLift resource.
TagResource
UntagResource
ListTagsForResource
Key -> (string)
The key for a developer-defined key:value pair for tagging an AWS resource.
Value -> (string)
The value for a developer-defined key:value pair for tagging an AWS resource.
Shorthand Syntax:
Key=string,Value=string ...
JSON Syntax:
[
{
"Key": "string",
"Value": "string"
}
...
]
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
Example1: To set up an ordered game session queue
The following create-game-session-queue
example creates a new game session queue with destinations in two regions. It also configures the queue so that game session requests time out after waiting 10 minutes for placement. Since no latency policies are defined, GameLift attempts to place all game sessions with the first destination listed.
aws gamelift create-game-session-queue \
--name MegaFrogRaceServer-NA \
--destinations file://destinations.json \
--timeout-in-seconds 600
Contents of destinations.json
:
{
"Destinations": [
{"DestinationArn": "arn:aws:gamelift:us-west-2::fleet/fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" },
{"DestinationArn": "arn:aws:gamelift:us-west-1::fleet/fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222" }
]
}
Output:
{
"GameSessionQueues": [
{
"Name": "MegaFrogRaceServer-NA",
"GameSessionQueueArn": "arn:aws:gamelift:us-west-2:123456789012:gamesessionqueue/MegaFrogRaceServer-NA",
"TimeoutInSeconds": 600,
"Destinations": [
{"DestinationArn": "arn:aws:gamelift:us-west-2::fleet/fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"},
{"DestinationArn": "arn:aws:gamelift:us-west-1::fleet/fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222"}
]
}
]
}
Example2: To set up a game session queue with player latency policies
The following create-game-session-queue
example creates a new game session queue with two player latency policies. The first policy sets a 100ms latency cap that is enforced during the first minute of a game session placement attempt. The second policy raises the latency cap to 200ms until the placement request times out at 3 minutes.
aws gamelift create-game-session-queue \
--name MegaFrogRaceServer-NA \
--destinations file://destinations.json \
--player-latency-policies file://latency-policies.json \
--timeout-in-seconds 180
Contents of destinations.json
:
{
"Destinations": [
{ "DestinationArn": "arn:aws:gamelift:us-west-2::fleet/fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" },
{ "DestinationArn": "arn:aws:gamelift:us-east-1::fleet/fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222" }
]
}
Contents of latency-policies.json
:
{
"PlayerLatencyPolicies": [
{"MaximumIndividualPlayerLatencyMilliseconds": 200},
{"MaximumIndividualPlayerLatencyMilliseconds": 100, "PolicyDurationSeconds": 60}
]
}
Output:
{
"GameSessionQueue": {
"Name": "MegaFrogRaceServer-NA",
"GameSessionQueueArn": "arn:aws:gamelift:us-west-2:111122223333:gamesessionqueue/MegaFrogRaceServer-NA",
"TimeoutInSeconds": 600,
"PlayerLatencyPolicies": [
{
"MaximumIndividualPlayerLatencyMilliseconds": 100,
"PolicyDurationSeconds": 60
},
{
"MaximumIndividualPlayerLatencyMilliseconds": 200
}
]
"Destinations": [
{"DestinationArn": "arn:aws:gamelift:us-west-2::fleet/fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"},
{"DestinationArn": "arn:aws:gamelift:us-east-1::fleet/fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222"}
],
}
}
For more information, see Create a Queue in the Amazon GameLift Developer Guide.
GameSessionQueue -> (structure)
An object that describes the newly created game session queue.
Name -> (string)
A descriptive label that is associated with game session queue. Queue names must be unique within each Region.
GameSessionQueueArn -> (string)
Amazon Resource Name (ARN ) that is assigned to a GameLift game session queue resource and uniquely identifies it. ARNs are unique across all Regions. In a GameLift game session queue ARN, the resource ID matches the Name value.
TimeoutInSeconds -> (integer)
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.PlayerLatencyPolicies -> (list)
A collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, the policy is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement.
(structure)
Queue setting that determines the highest latency allowed for individual players when placing a game session. When a latency policy is in force, a game session cannot be placed with any fleet in a Region where a player reports latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.
CreateGameSessionQueue
DescribeGameSessionQueues
UpdateGameSessionQueue
DeleteGameSessionQueue
MaximumIndividualPlayerLatencyMilliseconds -> (integer)
The maximum latency value that is allowed for any player, in milliseconds. All policies must have a value set for this property.
PolicyDurationSeconds -> (integer)
The length of time, in seconds, that the policy is enforced while placing a new game session. A null value for this property means that the policy is enforced until the queue times out.
Destinations -> (list)
A list of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.
(structure)
Fleet designated in a game session queue. Requests for new game sessions in the queue are fulfilled by starting a new game session on any destination that is configured for a queue.
CreateGameSessionQueue
DescribeGameSessionQueues
UpdateGameSessionQueue
DeleteGameSessionQueue
DestinationArn -> (string)
The Amazon Resource Name (ARN) that is assigned to fleet or fleet alias. ARNs, which include a fleet ID or alias ID and a Region name, provide a unique identifier across all Regions.