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 group of players to a game session. This action is useful with a team matching feature. Before players 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 single player to a game session, use CreatePlayerSession
.
To create player sessions, specify a game session ID, a list of player IDs, and optionally a set of player data strings. If successful, the players are added to the game session and a set of new PlayerSession
objects 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
- createPlayerSessions :: Text -> NonEmpty Text -> CreatePlayerSessions
- data CreatePlayerSessions
- cpsPlayerDataMap :: Lens' CreatePlayerSessions (HashMap Text Text)
- cpsGameSessionId :: Lens' CreatePlayerSessions Text
- cpsPlayerIds :: Lens' CreatePlayerSessions (NonEmpty Text)
- createPlayerSessionsResponse :: Int -> CreatePlayerSessionsResponse
- data CreatePlayerSessionsResponse
- crsPlayerSessions :: Lens' CreatePlayerSessionsResponse [PlayerSession]
- crsResponseStatus :: Lens' CreatePlayerSessionsResponse Int
Creating a Request
Creates a value of CreatePlayerSessions
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cpsPlayerDataMap
- 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. Player data strings for player IDs not included in thePlayerIds
parameter are ignored.cpsGameSessionId
- Unique identifier for the game session to add players to.cpsPlayerIds
- List of unique identifiers for the players to be added.
data CreatePlayerSessions Source #
Represents the input for a request action.
See: createPlayerSessions
smart constructor.
Instances
Request Lenses
cpsPlayerDataMap :: Lens' CreatePlayerSessions (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. Player data strings for player IDs not included in the PlayerIds
parameter are ignored.
cpsGameSessionId :: Lens' CreatePlayerSessions Text Source #
Unique identifier for the game session to add players to.
cpsPlayerIds :: Lens' CreatePlayerSessions (NonEmpty Text) Source #
List of unique identifiers for the players to be added.
Destructuring the Response
createPlayerSessionsResponse Source #
Creates a value of CreatePlayerSessionsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
crsPlayerSessions
- Collection of player session objects created for the added players.crsResponseStatus
- -- | The response status code.
data CreatePlayerSessionsResponse Source #
Represents the returned data in response to a request action.
See: createPlayerSessionsResponse
smart constructor.
Instances
Response Lenses
crsPlayerSessions :: Lens' CreatePlayerSessionsResponse [PlayerSession] Source #
Collection of player session objects created for the added players.
crsResponseStatus :: Lens' CreatePlayerSessionsResponse Int Source #
- - | The response status code.