Copyright | (c) 2013-2021 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 |
Reserves open slots in a game session for a group of players. New player
sessions can be created in any game session with an open slot that is in
ACTIVE
status and has a player creation policy of ACCEPT_ALL
. To add
a single player to a game session, use CreatePlayerSession.
To create player sessions, specify a game session ID and a list of player IDs. Optionally, provide a set of player data for each player ID.
If successful, a slot is reserved in the game session for each player, and new PlayerSession objects are returned with player session IDs. Each player references their player session ID when sending a connection request to the game session, and the game server can use it to validate the player reservation with the GameLift service. Player sessions cannot be updated.
Available in Amazon GameLift Local.
Related actions
CreatePlayerSession | CreatePlayerSessions | DescribePlayerSessions | StartGameSessionPlacement | DescribeGameSessionPlacement | All APIs by task
Synopsis
- data CreatePlayerSessions = CreatePlayerSessions' {
- playerDataMap :: Maybe (HashMap Text Text)
- gameSessionId :: Text
- playerIds :: NonEmpty Text
- newCreatePlayerSessions :: Text -> NonEmpty Text -> CreatePlayerSessions
- createPlayerSessions_playerDataMap :: Lens' CreatePlayerSessions (Maybe (HashMap Text Text))
- createPlayerSessions_gameSessionId :: Lens' CreatePlayerSessions Text
- createPlayerSessions_playerIds :: Lens' CreatePlayerSessions (NonEmpty Text)
- data CreatePlayerSessionsResponse = CreatePlayerSessionsResponse' {}
- newCreatePlayerSessionsResponse :: Int -> CreatePlayerSessionsResponse
- createPlayerSessionsResponse_playerSessions :: Lens' CreatePlayerSessionsResponse (Maybe [PlayerSession])
- createPlayerSessionsResponse_httpStatus :: Lens' CreatePlayerSessionsResponse Int
Creating a Request
data CreatePlayerSessions Source #
Represents the input for a request operation.
See: newCreatePlayerSessions
smart constructor.
CreatePlayerSessions' | |
|
Instances
newCreatePlayerSessions Source #
:: Text | |
-> NonEmpty Text | |
-> CreatePlayerSessions |
Create a value of CreatePlayerSessions
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:playerDataMap:CreatePlayerSessions'
, createPlayerSessions_playerDataMap
- Map of string pairs, each specifying a player ID and a set of
developer-defined information related to the player. Amazon GameLift
does not use this data, so it can be formatted as needed for use in the
game. Any player data strings for player IDs that are not included in
the PlayerIds
parameter are ignored.
$sel:gameSessionId:CreatePlayerSessions'
, createPlayerSessions_gameSessionId
- A unique identifier for the game session to add players to.
$sel:playerIds:CreatePlayerSessions'
, createPlayerSessions_playerIds
- List of unique identifiers for the players to be added.
Request Lenses
createPlayerSessions_playerDataMap :: Lens' CreatePlayerSessions (Maybe (HashMap Text Text)) Source #
Map of string pairs, each specifying a player ID and a set of
developer-defined information related to the player. Amazon GameLift
does not use this data, so it can be formatted as needed for use in the
game. Any player data strings for player IDs that are not included in
the PlayerIds
parameter are ignored.
createPlayerSessions_gameSessionId :: Lens' CreatePlayerSessions Text Source #
A unique identifier for the game session to add players to.
createPlayerSessions_playerIds :: Lens' CreatePlayerSessions (NonEmpty Text) Source #
List of unique identifiers for the players to be added.
Destructuring the Response
data CreatePlayerSessionsResponse Source #
Represents the returned data in response to a request operation.
See: newCreatePlayerSessionsResponse
smart constructor.
CreatePlayerSessionsResponse' | |
|
Instances
newCreatePlayerSessionsResponse Source #
Create a value of CreatePlayerSessionsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:playerSessions:CreatePlayerSessionsResponse'
, createPlayerSessionsResponse_playerSessions
- A collection of player session objects created for the added players.
$sel:httpStatus:CreatePlayerSessionsResponse'
, createPlayerSessionsResponse_httpStatus
- The response's http status code.
Response Lenses
createPlayerSessionsResponse_playerSessions :: Lens' CreatePlayerSessionsResponse (Maybe [PlayerSession]) Source #
A collection of player session objects created for the added players.
createPlayerSessionsResponse_httpStatus :: Lens' CreatePlayerSessionsResponse Int Source #
The response's http status code.