amazonka-gamelift-1.6.1: Amazon GameLift SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.GameLift.StartGameSessionPlacement

Contents

Description

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 following:

  • The queue name and a set of game session properties and settings
  • A unique ID (such as a UUID) for the placement. You use this ID to track the status of the placement request
  • (Optional) A set of IDs and player data for each player you want to join to the new game session
  • Latency data for all players (if you want to optimize game play for the 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 can resubmit the request or retry it with a different queue.

Game-session-related operations include:

  • CreateGameSession
  • DescribeGameSessions
  • DescribeGameSessionDetails
  • SearchGameSessions
  • UpdateGameSession
  • GetGameSessionLogUrl
  • Game session placements
  • StartGameSessionPlacement
  • DescribeGameSessionPlacement
  • StopGameSessionPlacement
Synopsis

Creating a Request

startGameSessionPlacement Source #

Creates a value of StartGameSessionPlacement with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • sgspGameProperties - Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session ).
  • sgspGameSessionName - Descriptive label that is associated with a game session. Session names do not need to be unique.
  • sgspPlayerLatencies - Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences 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.
  • sgspGameSessionData - Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session ).
  • sgspDesiredPlayerSessions - Set of information on each player to create a player session for.
  • sgspPlacementId - 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.
  • sgspGameSessionQueueName - Name of the queue to use to place the new game session.
  • sgspMaximumPlayerSessionCount - Maximum number of players that can be connected simultaneously to the game session.

data StartGameSessionPlacement Source #

Represents the input for a request action.

See: startGameSessionPlacement smart constructor.

Instances
Eq StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Data StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StartGameSessionPlacement -> c StartGameSessionPlacement #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StartGameSessionPlacement #

toConstr :: StartGameSessionPlacement -> Constr #

dataTypeOf :: StartGameSessionPlacement -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StartGameSessionPlacement) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StartGameSessionPlacement) #

gmapT :: (forall b. Data b => b -> b) -> StartGameSessionPlacement -> StartGameSessionPlacement #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StartGameSessionPlacement -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StartGameSessionPlacement -> r #

gmapQ :: (forall d. Data d => d -> u) -> StartGameSessionPlacement -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StartGameSessionPlacement -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StartGameSessionPlacement -> m StartGameSessionPlacement #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StartGameSessionPlacement -> m StartGameSessionPlacement #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StartGameSessionPlacement -> m StartGameSessionPlacement #

Read StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Show StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Generic StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Associated Types

type Rep StartGameSessionPlacement :: Type -> Type #

Hashable StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

ToJSON StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

AWSRequest StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Associated Types

type Rs StartGameSessionPlacement :: Type #

ToHeaders StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

ToPath StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

ToQuery StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

NFData StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

type Rep StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

type Rep StartGameSessionPlacement = D1 (MetaData "StartGameSessionPlacement" "Network.AWS.GameLift.StartGameSessionPlacement" "amazonka-gamelift-1.6.1-GajLKSxsevT2faX837q2Xl" False) (C1 (MetaCons "StartGameSessionPlacement'" PrefixI True) (((S1 (MetaSel (Just "_sgspGameProperties") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [GameProperty])) :*: S1 (MetaSel (Just "_sgspGameSessionName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_sgspPlayerLatencies") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [PlayerLatency])) :*: S1 (MetaSel (Just "_sgspGameSessionData") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 (MetaSel (Just "_sgspDesiredPlayerSessions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [DesiredPlayerSession])) :*: S1 (MetaSel (Just "_sgspPlacementId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) :*: (S1 (MetaSel (Just "_sgspGameSessionQueueName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_sgspMaximumPlayerSessionCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Nat)))))
type Rs StartGameSessionPlacement Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Request Lenses

sgspGameProperties :: Lens' StartGameSessionPlacement [GameProperty] Source #

Set of custom properties for a game session, formatted as key:value pairs. These properties are passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session ).

sgspGameSessionName :: Lens' StartGameSessionPlacement (Maybe Text) Source #

Descriptive label that is associated with a game session. Session names do not need to be unique.

sgspPlayerLatencies :: Lens' StartGameSessionPlacement [PlayerLatency] Source #

Set of values, expressed in milliseconds, indicating the amount of latency that a player experiences 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.

sgspGameSessionData :: Lens' StartGameSessionPlacement (Maybe Text) Source #

Set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session ).

sgspDesiredPlayerSessions :: Lens' StartGameSessionPlacement [DesiredPlayerSession] Source #

Set of information on each player to create a player session for.

sgspPlacementId :: Lens' StartGameSessionPlacement Text Source #

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.

sgspGameSessionQueueName :: Lens' StartGameSessionPlacement Text Source #

Name of the queue to use to place the new game session.

sgspMaximumPlayerSessionCount :: Lens' StartGameSessionPlacement Natural Source #

Maximum number of players that can be connected simultaneously to the game session.

Destructuring the Response

startGameSessionPlacementResponse Source #

Creates a value of StartGameSessionPlacementResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • sgsprsGameSessionPlacement - 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.
  • sgsprsResponseStatus - -- | The response status code.

data StartGameSessionPlacementResponse Source #

Represents the returned data in response to a request action.

See: startGameSessionPlacementResponse smart constructor.

Instances
Eq StartGameSessionPlacementResponse Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Data StartGameSessionPlacementResponse Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StartGameSessionPlacementResponse -> c StartGameSessionPlacementResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StartGameSessionPlacementResponse #

toConstr :: StartGameSessionPlacementResponse -> Constr #

dataTypeOf :: StartGameSessionPlacementResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StartGameSessionPlacementResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StartGameSessionPlacementResponse) #

gmapT :: (forall b. Data b => b -> b) -> StartGameSessionPlacementResponse -> StartGameSessionPlacementResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StartGameSessionPlacementResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StartGameSessionPlacementResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> StartGameSessionPlacementResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StartGameSessionPlacementResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StartGameSessionPlacementResponse -> m StartGameSessionPlacementResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StartGameSessionPlacementResponse -> m StartGameSessionPlacementResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StartGameSessionPlacementResponse -> m StartGameSessionPlacementResponse #

Read StartGameSessionPlacementResponse Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Show StartGameSessionPlacementResponse Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Generic StartGameSessionPlacementResponse Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

Associated Types

type Rep StartGameSessionPlacementResponse :: Type -> Type #

NFData StartGameSessionPlacementResponse Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

type Rep StartGameSessionPlacementResponse Source # 
Instance details

Defined in Network.AWS.GameLift.StartGameSessionPlacement

type Rep StartGameSessionPlacementResponse = D1 (MetaData "StartGameSessionPlacementResponse" "Network.AWS.GameLift.StartGameSessionPlacement" "amazonka-gamelift-1.6.1-GajLKSxsevT2faX837q2Xl" False) (C1 (MetaCons "StartGameSessionPlacementResponse'" PrefixI True) (S1 (MetaSel (Just "_sgsprsGameSessionPlacement") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe GameSessionPlacement)) :*: S1 (MetaSel (Just "_sgsprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

Response Lenses

sgsprsGameSessionPlacement :: Lens' StartGameSessionPlacementResponse (Maybe GameSessionPlacement) Source #

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.