Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Adds a player to a game session and creates a player session record. Before a player can be added, a game session must have an ACTIVE
status, have a creation policy of ALLOW_ALL
, and have an open player slot. To add a group of players to a game session, use CreatePlayerSessions
.
To create a player session, specify a game session ID, player ID, and optionally a string of player data. If successful, the player is added to the game session and a new PlayerSession
object is returned. Player sessions cannot be updated.
Available in Amazon GameLift Local.
Player-session-related operations include:
CreatePlayerSession
CreatePlayerSessions
DescribePlayerSessions
- Game session placements
StartGameSessionPlacement
DescribeGameSessionPlacement
StopGameSessionPlacement
Synopsis
- createPlayerSession :: Text -> Text -> CreatePlayerSession
- data CreatePlayerSession
- cPlayerData :: Lens' CreatePlayerSession (Maybe Text)
- cGameSessionId :: Lens' CreatePlayerSession Text
- cPlayerId :: Lens' CreatePlayerSession Text
- createPlayerSessionResponse :: Int -> CreatePlayerSessionResponse
- data CreatePlayerSessionResponse
- cpsrsPlayerSession :: Lens' CreatePlayerSessionResponse (Maybe PlayerSession)
- cpsrsResponseStatus :: Lens' CreatePlayerSessionResponse Int
Creating a Request
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:
cPlayerData
- 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.cGameSessionId
- Unique identifier for the game session to add a player to.cPlayerId
- Unique identifier for a player. Player IDs are developer-defined.
data CreatePlayerSession Source #
Represents the input for a request action.
See: createPlayerSession
smart constructor.
Instances
Request Lenses
cPlayerData :: Lens' CreatePlayerSession (Maybe Text) Source #
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.
cGameSessionId :: Lens' CreatePlayerSession Text Source #
Unique identifier for the game session to add a player to.
cPlayerId :: Lens' CreatePlayerSession Text Source #
Unique identifier for a player. Player IDs are developer-defined.
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:
cpsrsPlayerSession
- Object that describes the newly created player session record.cpsrsResponseStatus
- -- | The response status code.
data CreatePlayerSessionResponse Source #
Represents the returned data in response to a request action.
See: createPlayerSessionResponse
smart constructor.
Instances
Response Lenses
cpsrsPlayerSession :: Lens' CreatePlayerSessionResponse (Maybe PlayerSession) Source #
Object that describes the newly created player session record.
cpsrsResponseStatus :: Lens' CreatePlayerSessionResponse Int Source #
- - | The response status code.