Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a multiplayer game session for players. This action creates a game session record and assigns the new session to an instance in the specified fleet, which activates the server initialization process in your game server. A fleet must be in an ACTIVE state before a game session can be created for it.
To create a game session, specify either a fleet ID or an alias ID and indicate the maximum number of players the game session allows. You can also provide a name and a set of properties for your game (optional). If successful, a GameSession object is returned containing session properties, including an IP address. By default, newly created game sessions are set to accept adding any new players to the game session. Use UpdateGameSession to change the creation policy.
- createGameSession :: Natural -> CreateGameSession
- data CreateGameSession
- cgsGameProperties :: Lens' CreateGameSession [GameProperty]
- cgsAliasId :: Lens' CreateGameSession (Maybe Text)
- cgsName :: Lens' CreateGameSession (Maybe Text)
- cgsFleetId :: Lens' CreateGameSession (Maybe Text)
- cgsMaximumPlayerSessionCount :: Lens' CreateGameSession Natural
- createGameSessionResponse :: Int -> CreateGameSessionResponse
- data CreateGameSessionResponse
- cgsrsGameSession :: Lens' CreateGameSessionResponse (Maybe GameSession)
- cgsrsResponseStatus :: Lens' CreateGameSessionResponse Int
Creating a Request
Creates a value of CreateGameSession
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CreateGameSession Source #
Represents the input for a request action.
See: createGameSession
smart constructor.
Request Lenses
cgsGameProperties :: Lens' CreateGameSession [GameProperty] Source #
Set of properties used to administer a game session. These properties are passed to your game server.
cgsAliasId :: Lens' CreateGameSession (Maybe Text) Source #
Unique identifier for a fleet alias. Each request must reference either a fleet ID or alias ID, but not both.
cgsName :: Lens' CreateGameSession (Maybe Text) Source #
Descriptive label associated with this game session. Session names do not need to be unique.
cgsFleetId :: Lens' CreateGameSession (Maybe Text) Source #
Unique identifier for a fleet. Each request must reference either a fleet ID or alias ID, but not both.
cgsMaximumPlayerSessionCount :: Lens' CreateGameSession Natural Source #
Maximum number of players that can be connected simultaneously to the game session.
Destructuring the Response
createGameSessionResponse Source #
Creates a value of CreateGameSessionResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CreateGameSessionResponse Source #
Represents the returned data in response to a request action.
See: createGameSessionResponse
smart constructor.
Response Lenses
cgsrsGameSession :: Lens' CreateGameSessionResponse (Maybe GameSession) Source #
Object containing the newly created game session record.
cgsrsResponseStatus :: Lens' CreateGameSessionResponse Int Source #
The response status code.