2017/04/11 - Amazon GameLift - 7 updated api methods
Changes Update gamelift client to latest version
{'IdempotencyToken': 'string'}
Creates a multiplayer game session for players. This action creates a game session record and assigns an available server process in the specified fleet to host the game session. A fleet must have an ACTIVE status before a game session can be created in it.
To create a game session, specify either fleet ID or alias ID and indicate a maximum number of players to allow in the game session. You can also provide a name and game-specific properties for this game session. If successful, a GameSession object is returned containing game session properties, including a game session ID with the custom string you provided.
Idempotency tokens. You can add a token that uniquely identifies game session requests. This is useful for ensuring that game session requests are idempotent. Multiple requests with the same idempotency token are processed only once; subsequent requests return the original result. All response values are the same with the exception of game session status, which may change.
Resource creation limits. If you are creating a game session on a fleet with a resource creation limit policy in force, then you must specify a creator ID. Without this ID, Amazon GameLift has no way to evaluate the policy for this new game session request.
By default, newly created game sessions allow new players to join. Use UpdateGameSession to change the game session's player session creation policy.
Available in Amazon GameLift Local.
See also: AWS API Documentation
Request Syntax
client.create_game_session( FleetId='string', AliasId='string', MaximumPlayerSessionCount=123, Name='string', GameProperties=[ { 'Key': 'string', 'Value': 'string' }, ], CreatorId='string', GameSessionId='string', IdempotencyToken='string' )
string
Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.
string
Unique identifier for an alias associated with the fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.
integer
[REQUIRED]
Maximum number of players that can be connected simultaneously to the game session.
string
Descriptive label that is associated with a game session. Session names do not need to be unique.
list
Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.
(dict) --
Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.
Key (string) -- [REQUIRED]
TBD
Value (string) -- [REQUIRED]
TBD
string
Unique identifier for a player or entity creating the game session. This ID is used to enforce a resource protection policy (if one exists) that limits the number of concurrent active game sessions one player can have.
string
This parameter is no longer preferred. Please use IdempotencyToken instead. Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID. (A game session ID has the following format: arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>.)
string
Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID. (A game session ID has the following format: arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>.)
dict
Response Syntax
{ 'GameSession': { 'GameSessionId': 'string', 'Name': 'string', 'FleetId': 'string', 'CreationTime': datetime(2015, 1, 1), 'TerminationTime': datetime(2015, 1, 1), 'CurrentPlayerSessionCount': 123, 'MaximumPlayerSessionCount': 123, 'Status': 'ACTIVE'|'ACTIVATING'|'TERMINATED'|'TERMINATING'|'ERROR', 'GameProperties': [ { 'Key': 'string', 'Value': 'string' }, ], 'IpAddress': 'string', 'Port': 123, 'PlayerSessionCreationPolicy': 'ACCEPT_ALL'|'DENY_ALL', 'CreatorId': 'string' } }
Response Structure
(dict) --
Represents the returned data in response to a request action.
GameSession (dict) --
Object that describes the newly created game session record.
GameSessionId (string) --
Unique identifier for the game session. A game session ID has the following format: arn:aws:gamelift:<region>::gamesession/<fleet ID>/<custom ID string or idempotency token>.
Name (string) --
Descriptive label that is associated with a game session. Session names do not need to be unique.
FleetId (string) --
Unique identifier for a fleet the game session is running on.
CreationTime (datetime) --
Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
TerminationTime (datetime) --
Time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
CurrentPlayerSessionCount (integer) --
Number of players currently in the game session.
MaximumPlayerSessionCount (integer) --
Maximum number of players that can be connected simultaneously to the game session.
Status (string) --
Current status of the game session. A game session must have an ACTIVE status to have player sessions.
GameProperties (list) --
Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.
(dict) --
Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.
Key (string) --
TBD
Value (string) --
TBD
IpAddress (string) --
IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
Port (integer) --
Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number.
PlayerSessionCreationPolicy (string) --
Indicates whether or not the game session is accepting new players.
CreatorId (string) --
Unique identifier for a player. This ID is used to enforce a resource protection policy (if one exists), that limits the number of game sessions a player can create.
{'PlayerLatencyPolicies': [{'MaximumIndividualPlayerLatencyMilliseconds': 'integer', 'PolicyDurationSeconds': 'integer'}]}Response
{'GameSessionQueue': {'GameSessionQueueArn': 'string', 'PlayerLatencyPolicies': [{'MaximumIndividualPlayerLatencyMilliseconds': 'integer', 'PolicyDurationSeconds': 'integer'}]}}
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.
See also: AWS API Documentation
Request Syntax
client.create_game_session_queue( Name='string', TimeoutInSeconds=123, PlayerLatencyPolicies=[ { 'MaximumIndividualPlayerLatencyMilliseconds': 123, 'PolicyDurationSeconds': 123 }, ], Destinations=[ { 'DestinationArn': 'string' }, ] )
string
[REQUIRED]
Descriptive label that is associated with queue. Queue names must be unique within each region.
integer
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.
list
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, it 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 requests will fail.
(dict) --
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 at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.
Latency policy-related operations include:
CreateGameSessionQueue
UpdateGameSessionQueue
StartGameSessionPlacement
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.
list
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.
(dict) --
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 configured for a queue.
DestinationArn (string) --
Amazon Resource Name (ARN) 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.
dict
Response Syntax
{ 'GameSessionQueue': { 'Name': 'string', 'GameSessionQueueArn': 'string', 'TimeoutInSeconds': 123, 'PlayerLatencyPolicies': [ { 'MaximumIndividualPlayerLatencyMilliseconds': 123, 'PolicyDurationSeconds': 123 }, ], 'Destinations': [ { 'DestinationArn': 'string' }, ] } }
Response Structure
(dict) --
Represents the returned data in response to a request action.
GameSessionQueue (dict) --
Object that describes the newly created game session queue.
Name (string) --
Descriptive label that is associated with queue. Queue names must be unique within each region.
GameSessionQueueArn (string) --
Amazon Resource Name ( ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.
TimeoutInSeconds (integer) --
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) --
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, it 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.
(dict) --
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 at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.
Latency policy-related operations include:
CreateGameSessionQueue
UpdateGameSessionQueue
StartGameSessionPlacement
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) --
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.
(dict) --
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 configured for a queue.
DestinationArn (string) --
Amazon Resource Name (ARN) 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.
{'GameSessionPlacement': {'GameSessionId': 'string', 'IpAddress': 'string', 'PlacedPlayerSessions': [{'PlayerId': 'string', 'PlayerSessionId': 'string'}], 'Port': 'integer'}}
Retrieves properties and current status of a game session placement request. To get game session placement details, specify the placement ID. If successful, a GameSessionPlacement object is returned.
See also: AWS API Documentation
Request Syntax
client.describe_game_session_placement( PlacementId='string' )
string
[REQUIRED]
Unique identifier for a game session placement to retrieve.
dict
Response Syntax
{ 'GameSessionPlacement': { 'PlacementId': 'string', 'GameSessionQueueName': 'string', 'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT', 'GameProperties': [ { 'Key': 'string', 'Value': 'string' }, ], 'MaximumPlayerSessionCount': 123, 'GameSessionName': 'string', 'GameSessionId': 'string', 'GameSessionArn': 'string', 'GameSessionRegion': 'string', 'PlayerLatencies': [ { 'PlayerId': 'string', 'RegionIdentifier': 'string', 'LatencyInMilliseconds': ... }, ], 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'IpAddress': 'string', 'Port': 123, 'PlacedPlayerSessions': [ { 'PlayerId': 'string', 'PlayerSessionId': 'string' }, ] } }
Response Structure
(dict) --
Represents the returned data in response to a request action.
GameSessionPlacement (dict) --
Object that describes the requested game session placement.
PlacementId (string) --
Unique identifier for a game session placement.
GameSessionQueueName (string) --
Descriptive label that is associated with queue. Queue names must be unique within each region.
Status (string) --
Current status of the game session placement request.
PENDING – The placement request is currently in the queue waiting to be processed.
FULFILLED – A new game session and player sessions (if requested) have been successfully created. Values for GameSessionArn and GameSessionRegion are available.
CANCELLED – The placement request was canceled with a call to StopGameSessionPlacement.
TIMED_OUT – A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
GameProperties (list) --
Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.
(dict) --
Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.
Key (string) --
TBD
Value (string) --
TBD
MaximumPlayerSessionCount (integer) --
Maximum number of players that can be connected simultaneously to the game session.
GameSessionName (string) --
Descriptive label that is associated with a game session. Session names do not need to be unique.
GameSessionId (string) --
Unique identifier for the game session. This value is set once the new game session is placed (placement status is Fulfilled).
GameSessionArn (string) --
Identifier for the game session created by this placement request. This value is set once the new game session is placed (placement status is Fulfilled). This identifier is unique across all regions. You can use this value as a GameSessionId value as needed.
GameSessionRegion (string) --
Name of the region where the game session created by this placement request is running. This value is set once the new game session is placed (placement status is Fulfilled).
PlayerLatencies (list) --
Set of values, expressed in milliseconds, indicating the amount of latency that players are experiencing when connected to AWS regions.
(dict) --
Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified region. The relative difference between a player's latency values for multiple regions are used to determine which fleets are best suited to place a new game session for the player.
PlayerId (string) --
Unique identifier for a player associated with the latency data.
RegionIdentifier (string) --
Name of the region that is associated with the latency value.
LatencyInMilliseconds (float) --
Amount of time that represents the time lag experienced by the player when connected to the specified region.
StartTime (datetime) --
Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
EndTime (datetime) --
Time stamp indicating when this request was completed, canceled, or timed out.
IpAddress (string) --
IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).
Port (integer) --
Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).
PlacedPlayerSessions (list) --
Collection of information on player sessions created in response to the game session placement request. These player sessions are created only once a new game session is successfully placed (placement status is Fulfilled). This information includes the player ID (as provided in the placement request) and the corresponding player session ID. Retrieve full player sessions by calling DescribePlayerSessions with the player session ID.
(dict) --
Information about a player session that was created as part of a StartGameSessionPlacement request. This object contains only the player ID and player session ID. To retrieve full details on a player session, call DescribePlayerSessions with the player session ID.
PlayerId (string) --
Unique identifier for a player that is associated with this player session.
PlayerSessionId (string) --
Unique identifier for a player session.
{'GameSessionQueues': {'GameSessionQueueArn': 'string', 'PlayerLatencyPolicies': [{'MaximumIndividualPlayerLatencyMilliseconds': 'integer', 'PolicyDurationSeconds': 'integer'}]}}
Retrieves the properties for one or more game session queues. When requesting multiple queues, use the pagination parameters to retrieve results as a set of sequential pages. If successful, a GameSessionQueue object is returned for each requested queue. When specifying a list of queues, objects are returned only for queues that currently exist in the region.
See also: AWS API Documentation
Request Syntax
client.describe_game_session_queues( Names=[ 'string', ], Limit=123, NextToken='string' )
list
List of queue names to retrieve information for. To request settings for all queues, leave this parameter empty.
(string) --
integer
Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.
string
Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To specify the start of the result set, do not specify a value.
dict
Response Syntax
{ 'GameSessionQueues': [ { 'Name': 'string', 'GameSessionQueueArn': 'string', 'TimeoutInSeconds': 123, 'PlayerLatencyPolicies': [ { 'MaximumIndividualPlayerLatencyMilliseconds': 123, 'PolicyDurationSeconds': 123 }, ], 'Destinations': [ { 'DestinationArn': 'string' }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Represents the returned data in response to a request action.
GameSessionQueues (list) --
Collection of objects that describes the requested game session queues.
(dict) --
Configuration of a queue that is used to process game session placement requests. The queue configuration identifies several game features:
The destinations where a new game session can potentially be hosted. Amazon GameLift tries these destinations in an order based on either the queue's default order or player latency information, if provided in a placement request. With latency information, Amazon GameLift can place game sessions where the majority of players are reporting the lowest possible latency.
The length of time that placement requests can wait in the queue before timing out.
A set of optional latency policies that protect individual players from high latencies, preventing game sessions from being placed where any individual player is reporting latency higher than a policy's maximum.
Queue-related operations include the following:
CreateGameSessionQueue
DescribeGameSessionQueues
UpdateGameSessionQueue
DeleteGameSessionQueue
Name (string) --
Descriptive label that is associated with queue. Queue names must be unique within each region.
GameSessionQueueArn (string) --
Amazon Resource Name ( ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.
TimeoutInSeconds (integer) --
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) --
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, it 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.
(dict) --
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 at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.
Latency policy-related operations include:
CreateGameSessionQueue
UpdateGameSessionQueue
StartGameSessionPlacement
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) --
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.
(dict) --
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 configured for a queue.
DestinationArn (string) --
Amazon Resource Name (ARN) 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.
NextToken (string) --
Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.
{'GameSessionPlacement': {'GameSessionId': 'string', 'IpAddress': 'string', 'PlacedPlayerSessions': [{'PlayerId': 'string', 'PlayerSessionId': 'string'}], 'Port': 'integer'}}
Places a request for a new game session in a queue (see CreateGameSessionQueue). When processing a placement request, Amazon GameLift searches for available resources on the queue's destinations, scanning each until it finds resources or the placement request times out. A game session placement request can also request player sessions. When a new game session is successfully created, Amazon GameLift creates a player session for each player included in the request.
When placing a game session, by default Amazon GameLift tries each fleet in the order they are listed in the queue configuration. Ideally, a queue's destinations are listed in preference order. Alternatively, when requesting a game session with players, you can also provide latency data for each player in relevant regions. Latency data indicates the performance lag a player experiences when connected to a fleet in the region. Amazon GameLift uses latency data to reorder the list of destinations to place the game session in a region with minimal lag. If latency data is provided for multiple players, Amazon GameLift calculates each region's average lag for all players and reorders to get the best game play across all players.
To place a new game session request, specify the queue name and a set of game session properties and settings. Also provide a unique ID (such as a UUID) for the placement. You'll use this ID to track the status of the placement request. Optionally, provide a set of IDs and player data for each player you want to join to the new game session. To optimize game play for the players, also provide latency data for all players. If successful, a new game session placement is created. To track the status of a placement request, call DescribeGameSessionPlacement and check the request's status. If the status is Fulfilled, a new game session has been created and a game session ARN and region are referenced. If the placement request times out, you have the option of resubmitting the request or retrying it with a different queue.
See also: AWS API Documentation
Request Syntax
client.start_game_session_placement( PlacementId='string', GameSessionQueueName='string', GameProperties=[ { 'Key': 'string', 'Value': 'string' }, ], MaximumPlayerSessionCount=123, GameSessionName='string', PlayerLatencies=[ { 'PlayerId': 'string', 'RegionIdentifier': 'string', 'LatencyInMilliseconds': ... }, ], DesiredPlayerSessions=[ { 'PlayerId': 'string', 'PlayerData': 'string' }, ] )
string
[REQUIRED]
Unique identifier to assign to the new game session placement. This value is developer-defined. The value must be unique across all regions and cannot be reused unless you are resubmitting a canceled or timed-out placement request.
string
[REQUIRED]
Name of the queue to use to place the new game session.
list
Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.
(dict) --
Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.
Key (string) -- [REQUIRED]
TBD
Value (string) -- [REQUIRED]
TBD
integer
[REQUIRED]
Maximum number of players that can be connected simultaneously to the game session.
string
Descriptive label that is associated with a game session. Session names do not need to be unique.
list
Set of values, expressed in milliseconds, indicating the amount of latency that players are experiencing when connected to AWS regions. This information is used to try to place the new game session where it can offer the best possible gameplay experience for the players.
(dict) --
Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified region. The relative difference between a player's latency values for multiple regions are used to determine which fleets are best suited to place a new game session for the player.
PlayerId (string) --
Unique identifier for a player associated with the latency data.
RegionIdentifier (string) --
Name of the region that is associated with the latency value.
LatencyInMilliseconds (float) --
Amount of time that represents the time lag experienced by the player when connected to the specified region.
list
Set of information on each player to create a player session for.
(dict) --
Player information for use when creating player sessions using a game session placement request with StartGameSessionPlacement.
PlayerId (string) --
Unique identifier for a player to associate with the player session.
PlayerData (string) --
Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.
dict
Response Syntax
{ 'GameSessionPlacement': { 'PlacementId': 'string', 'GameSessionQueueName': 'string', 'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT', 'GameProperties': [ { 'Key': 'string', 'Value': 'string' }, ], 'MaximumPlayerSessionCount': 123, 'GameSessionName': 'string', 'GameSessionId': 'string', 'GameSessionArn': 'string', 'GameSessionRegion': 'string', 'PlayerLatencies': [ { 'PlayerId': 'string', 'RegionIdentifier': 'string', 'LatencyInMilliseconds': ... }, ], 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'IpAddress': 'string', 'Port': 123, 'PlacedPlayerSessions': [ { 'PlayerId': 'string', 'PlayerSessionId': 'string' }, ] } }
Response Structure
(dict) --
Represents the returned data in response to a request action.
GameSessionPlacement (dict) --
Object that describes the newly created game session placement. This object includes all the information provided in the request, as well as start/end time stamps and placement status.
PlacementId (string) --
Unique identifier for a game session placement.
GameSessionQueueName (string) --
Descriptive label that is associated with queue. Queue names must be unique within each region.
Status (string) --
Current status of the game session placement request.
PENDING – The placement request is currently in the queue waiting to be processed.
FULFILLED – A new game session and player sessions (if requested) have been successfully created. Values for GameSessionArn and GameSessionRegion are available.
CANCELLED – The placement request was canceled with a call to StopGameSessionPlacement.
TIMED_OUT – A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
GameProperties (list) --
Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.
(dict) --
Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.
Key (string) --
TBD
Value (string) --
TBD
MaximumPlayerSessionCount (integer) --
Maximum number of players that can be connected simultaneously to the game session.
GameSessionName (string) --
Descriptive label that is associated with a game session. Session names do not need to be unique.
GameSessionId (string) --
Unique identifier for the game session. This value is set once the new game session is placed (placement status is Fulfilled).
GameSessionArn (string) --
Identifier for the game session created by this placement request. This value is set once the new game session is placed (placement status is Fulfilled). This identifier is unique across all regions. You can use this value as a GameSessionId value as needed.
GameSessionRegion (string) --
Name of the region where the game session created by this placement request is running. This value is set once the new game session is placed (placement status is Fulfilled).
PlayerLatencies (list) --
Set of values, expressed in milliseconds, indicating the amount of latency that players are experiencing when connected to AWS regions.
(dict) --
Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified region. The relative difference between a player's latency values for multiple regions are used to determine which fleets are best suited to place a new game session for the player.
PlayerId (string) --
Unique identifier for a player associated with the latency data.
RegionIdentifier (string) --
Name of the region that is associated with the latency value.
LatencyInMilliseconds (float) --
Amount of time that represents the time lag experienced by the player when connected to the specified region.
StartTime (datetime) --
Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
EndTime (datetime) --
Time stamp indicating when this request was completed, canceled, or timed out.
IpAddress (string) --
IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).
Port (integer) --
Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).
PlacedPlayerSessions (list) --
Collection of information on player sessions created in response to the game session placement request. These player sessions are created only once a new game session is successfully placed (placement status is Fulfilled). This information includes the player ID (as provided in the placement request) and the corresponding player session ID. Retrieve full player sessions by calling DescribePlayerSessions with the player session ID.
(dict) --
Information about a player session that was created as part of a StartGameSessionPlacement request. This object contains only the player ID and player session ID. To retrieve full details on a player session, call DescribePlayerSessions with the player session ID.
PlayerId (string) --
Unique identifier for a player that is associated with this player session.
PlayerSessionId (string) --
Unique identifier for a player session.
{'GameSessionPlacement': {'GameSessionId': 'string', 'IpAddress': 'string', 'PlacedPlayerSessions': [{'PlayerId': 'string', 'PlayerSessionId': 'string'}], 'Port': 'integer'}}
Cancels a game session placement that is in Pending status. To stop a placement, provide the placement ID values. If successful, the placement is moved to Cancelled status.
See also: AWS API Documentation
Request Syntax
client.stop_game_session_placement( PlacementId='string' )
string
[REQUIRED]
Unique identifier for a game session placement to cancel.
dict
Response Syntax
{ 'GameSessionPlacement': { 'PlacementId': 'string', 'GameSessionQueueName': 'string', 'Status': 'PENDING'|'FULFILLED'|'CANCELLED'|'TIMED_OUT', 'GameProperties': [ { 'Key': 'string', 'Value': 'string' }, ], 'MaximumPlayerSessionCount': 123, 'GameSessionName': 'string', 'GameSessionId': 'string', 'GameSessionArn': 'string', 'GameSessionRegion': 'string', 'PlayerLatencies': [ { 'PlayerId': 'string', 'RegionIdentifier': 'string', 'LatencyInMilliseconds': ... }, ], 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'IpAddress': 'string', 'Port': 123, 'PlacedPlayerSessions': [ { 'PlayerId': 'string', 'PlayerSessionId': 'string' }, ] } }
Response Structure
(dict) --
Represents the returned data in response to a request action.
GameSessionPlacement (dict) --
Object that describes the canceled game session placement, with Cancelled status and an end time stamp.
PlacementId (string) --
Unique identifier for a game session placement.
GameSessionQueueName (string) --
Descriptive label that is associated with queue. Queue names must be unique within each region.
Status (string) --
Current status of the game session placement request.
PENDING – The placement request is currently in the queue waiting to be processed.
FULFILLED – A new game session and player sessions (if requested) have been successfully created. Values for GameSessionArn and GameSessionRegion are available.
CANCELLED – The placement request was canceled with a call to StopGameSessionPlacement.
TIMED_OUT – A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.
GameProperties (list) --
Set of developer-defined properties for a game session. These properties are passed to the server process hosting the game session.
(dict) --
Set of key-value pairs containing information a server process requires to set up a game session. This object allows you to pass in any set of data needed for your game. For more information, see the Amazon GameLift Developer Guide.
Key (string) --
TBD
Value (string) --
TBD
MaximumPlayerSessionCount (integer) --
Maximum number of players that can be connected simultaneously to the game session.
GameSessionName (string) --
Descriptive label that is associated with a game session. Session names do not need to be unique.
GameSessionId (string) --
Unique identifier for the game session. This value is set once the new game session is placed (placement status is Fulfilled).
GameSessionArn (string) --
Identifier for the game session created by this placement request. This value is set once the new game session is placed (placement status is Fulfilled). This identifier is unique across all regions. You can use this value as a GameSessionId value as needed.
GameSessionRegion (string) --
Name of the region where the game session created by this placement request is running. This value is set once the new game session is placed (placement status is Fulfilled).
PlayerLatencies (list) --
Set of values, expressed in milliseconds, indicating the amount of latency that players are experiencing when connected to AWS regions.
(dict) --
Regional latency information for a player, used when requesting a new game session with StartGameSessionPlacement. This value indicates the amount of time lag that exists when the player is connected to a fleet in the specified region. The relative difference between a player's latency values for multiple regions are used to determine which fleets are best suited to place a new game session for the player.
PlayerId (string) --
Unique identifier for a player associated with the latency data.
RegionIdentifier (string) --
Name of the region that is associated with the latency value.
LatencyInMilliseconds (float) --
Amount of time that represents the time lag experienced by the player when connected to the specified region.
StartTime (datetime) --
Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
EndTime (datetime) --
Time stamp indicating when this request was completed, canceled, or timed out.
IpAddress (string) --
IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).
Port (integer) --
Port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value is set once the new game session is placed (placement status is Fulfilled).
PlacedPlayerSessions (list) --
Collection of information on player sessions created in response to the game session placement request. These player sessions are created only once a new game session is successfully placed (placement status is Fulfilled). This information includes the player ID (as provided in the placement request) and the corresponding player session ID. Retrieve full player sessions by calling DescribePlayerSessions with the player session ID.
(dict) --
Information about a player session that was created as part of a StartGameSessionPlacement request. This object contains only the player ID and player session ID. To retrieve full details on a player session, call DescribePlayerSessions with the player session ID.
PlayerId (string) --
Unique identifier for a player that is associated with this player session.
PlayerSessionId (string) --
Unique identifier for a player session.
{'PlayerLatencyPolicies': [{'MaximumIndividualPlayerLatencyMilliseconds': 'integer', 'PolicyDurationSeconds': 'integer'}]}Response
{'GameSessionQueue': {'GameSessionQueueArn': 'string', 'PlayerLatencyPolicies': [{'MaximumIndividualPlayerLatencyMilliseconds': 'integer', 'PolicyDurationSeconds': 'integer'}]}}
Updates settings for a game session queue, which determines how new game session requests in the queue are processed. To update settings, specify the queue name to be updated and provide the new settings. When updating destinations, provide a complete list of destinations.
See also: AWS API Documentation
Request Syntax
client.update_game_session_queue( Name='string', TimeoutInSeconds=123, PlayerLatencyPolicies=[ { 'MaximumIndividualPlayerLatencyMilliseconds': 123, 'PolicyDurationSeconds': 123 }, ], Destinations=[ { 'DestinationArn': 'string' }, ] )
string
[REQUIRED]
Descriptive label that is associated with queue. Queue names must be unique within each region.
integer
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.
list
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, it 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. When updating policies, provide a complete collection of policies.
(dict) --
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 at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.
Latency policy-related operations include:
CreateGameSessionQueue
UpdateGameSessionQueue
StartGameSessionPlacement
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.
list
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. When updating this list, provide a complete list of destinations.
(dict) --
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 configured for a queue.
DestinationArn (string) --
Amazon Resource Name (ARN) 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.
dict
Response Syntax
{ 'GameSessionQueue': { 'Name': 'string', 'GameSessionQueueArn': 'string', 'TimeoutInSeconds': 123, 'PlayerLatencyPolicies': [ { 'MaximumIndividualPlayerLatencyMilliseconds': 123, 'PolicyDurationSeconds': 123 }, ], 'Destinations': [ { 'DestinationArn': 'string' }, ] } }
Response Structure
(dict) --
Represents the returned data in response to a request action.
GameSessionQueue (dict) --
Object that describes the newly updated game session queue.
Name (string) --
Descriptive label that is associated with queue. Queue names must be unique within each region.
GameSessionQueueArn (string) --
Amazon Resource Name ( ARN) that is assigned to a game session queue and uniquely identifies it. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.
TimeoutInSeconds (integer) --
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) --
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, it 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.
(dict) --
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 at any destination in a region where a player is reporting latency higher than the cap. Latency policies are only enforced when the placement request contains player latency information.
Latency policy-related operations include:
CreateGameSessionQueue
UpdateGameSessionQueue
StartGameSessionPlacement
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) --
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.
(dict) --
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 configured for a queue.
DestinationArn (string) --
Amazon Resource Name (ARN) 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.