amazonka-gamelift-1.4.0: Amazon GameLift SDK.

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

Network.AWS.GameLift.CreatePlayerSession

Contents

Description

Adds a player to a game session and creates a player session record. A game session must be in an ACTIVE state, have a creation policy of ALLOW_ALL, and have an open player slot before players can be added to the session.

To create a player session, specify a game session ID and player ID. If successful, the player is added to the game session and a new PlayerSession object is returned.

Synopsis

Creating a Request

createPlayerSession Source

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

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

Request Lenses

cGameSessionId :: Lens' CreatePlayerSession Text Source

Unique identifier for a game session. Specify the game session you want to add a player to.

cPlayerId :: Lens' CreatePlayerSession Text Source

Unique identifier for the player to be added.

Destructuring the Response

createPlayerSessionResponse Source

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

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

Response Lenses

cpsrsPlayerSession :: Lens' CreatePlayerSessionResponse (Maybe PlayerSession) Source

Object containing the newly created player session record.