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 an available server process in the specified fleet to host the game session. A fleet must be in an ACTIVE
status before a game session can be created in it.
To create a game session, specify either fleet ID or alias ID, and indicate a maximum number of players to allow in the game session. You can also provide a name and game-specific properties for this game session. If successful, a GameSession
object is returned containing session properties, including an IP address. By default, newly created game sessions allow new players to join. Use UpdateGameSession
to change the game sessions player session creation policy.
When creating a game session on a fleet with a resource limit creation policy, the request should include a creator ID. If none is provided, GameLift does not evaluate the fleet's resource limit creation policy.
- createGameSession :: Natural -> CreateGameSession
- data CreateGameSession
- cgsGameProperties :: Lens' CreateGameSession [GameProperty]
- cgsGameSessionId :: Lens' CreateGameSession (Maybe Text)
- cgsAliasId :: Lens' CreateGameSession (Maybe Text)
- cgsName :: Lens' CreateGameSession (Maybe Text)
- cgsFleetId :: Lens' CreateGameSession (Maybe Text)
- cgsCreatorId :: 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:
cgsGameProperties
- Set of properties used to administer a game session. These properties are passed to the server process hosting it.cgsGameSessionId
- Custom string to include in the game session ID, with a maximum length of 48 characters. If this parameter is set, GameLift creates a game session ID in the following format: "arn:aws:gamelift:region::gamesessionfleet-IDID string". For example, this full game session ID: "arn:aws:gamelift:us-west-2::gamesessionfleet-2ec2aae5-c2c7-43ca-b19d-8249fe5fddf2my-game-session" includes the custom ID string "my-game-session". If this parameter is not set, GameLift creates a game session ID in the same format with an autogenerated ID string.cgsAliasId
- Unique identifier for a fleet alias. Each request must reference either a fleet ID or alias ID, but not both.cgsName
- Descriptive label associated with a game session. Session names do not need to be unique.cgsFleetId
- Unique identifier for a fleet. Each request must reference either a fleet ID or alias ID, but not both.cgsCreatorId
- Player ID identifying the person or entity creating the game session. This ID is used to enforce a resource protection policy (if one exists) that limits the number of concurrent active game sessions one player can have.cgsMaximumPlayerSessionCount
- Maximum number of players that can be connected simultaneously to the game session.
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 the server process hosting it.
cgsGameSessionId :: Lens' CreateGameSession (Maybe Text) Source #
Custom string to include in the game session ID, with a maximum length of 48 characters. If this parameter is set, GameLift creates a game session ID in the following format: "arn:aws:gamelift:region::gamesessionfleet-IDID string". For example, this full game session ID: "arn:aws:gamelift:us-west-2::gamesessionfleet-2ec2aae5-c2c7-43ca-b19d-8249fe5fddf2my-game-session" includes the custom ID string "my-game-session". If this parameter is not set, GameLift creates a game session ID in the same format with an autogenerated ID string.
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 a 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.
cgsCreatorId :: Lens' CreateGameSession (Maybe Text) Source #
Player ID identifying the person or entity creating the game session. This ID is used to enforce a resource protection policy (if one exists) that limits the number of concurrent active game sessions one player can have.
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:
cgsrsGameSession
- Object containing the newly created game session record.cgsrsResponseStatus
- -- | The response status code.
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.