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.CreateGameSession

Contents

Description

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.

Synopsis

Creating a Request

createGameSession Source

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:

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:

Response Lenses

cgsrsGameSession :: Lens' CreateGameSessionResponse (Maybe GameSession) Source

Object containing the newly created game session record.