amazonka-gamelift-1.4.5: 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 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.

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:

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

Instances

Eq CreateGameSession Source # 
Data CreateGameSession Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateGameSession -> c CreateGameSession #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateGameSession #

toConstr :: CreateGameSession -> Constr #

dataTypeOf :: CreateGameSession -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateGameSession) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateGameSession) #

gmapT :: (forall b. Data b => b -> b) -> CreateGameSession -> CreateGameSession #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateGameSession -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateGameSession -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateGameSession -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateGameSession -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateGameSession -> m CreateGameSession #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGameSession -> m CreateGameSession #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGameSession -> m CreateGameSession #

Read CreateGameSession Source # 
Show CreateGameSession Source # 
Generic CreateGameSession Source # 
Hashable CreateGameSession Source # 
ToJSON CreateGameSession Source # 
NFData CreateGameSession Source # 

Methods

rnf :: CreateGameSession -> () #

AWSRequest CreateGameSession Source # 
ToPath CreateGameSession Source # 
ToHeaders CreateGameSession Source # 
ToQuery CreateGameSession Source # 
type Rep CreateGameSession Source # 
type Rep CreateGameSession = D1 (MetaData "CreateGameSession" "Network.AWS.GameLift.CreateGameSession" "amazonka-gamelift-1.4.5-2krZbzEaIqtLV8ATX8AZ52" False) (C1 (MetaCons "CreateGameSession'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_cgsGameProperties") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [GameProperty]))) ((:*:) (S1 (MetaSel (Just Symbol "_cgsGameSessionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_cgsAliasId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_cgsName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_cgsFleetId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_cgsCreatorId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_cgsMaximumPlayerSessionCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Nat))))))
type Rs CreateGameSession Source # 

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:

data CreateGameSessionResponse Source #

Represents the returned data in response to a request action.

See: createGameSessionResponse smart constructor.

Instances

Eq CreateGameSessionResponse Source # 
Data CreateGameSessionResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateGameSessionResponse -> c CreateGameSessionResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateGameSessionResponse #

toConstr :: CreateGameSessionResponse -> Constr #

dataTypeOf :: CreateGameSessionResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateGameSessionResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateGameSessionResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateGameSessionResponse -> CreateGameSessionResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateGameSessionResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateGameSessionResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateGameSessionResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateGameSessionResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateGameSessionResponse -> m CreateGameSessionResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGameSessionResponse -> m CreateGameSessionResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateGameSessionResponse -> m CreateGameSessionResponse #

Read CreateGameSessionResponse Source # 
Show CreateGameSessionResponse Source # 
Generic CreateGameSessionResponse Source # 
NFData CreateGameSessionResponse Source # 
type Rep CreateGameSessionResponse Source # 
type Rep CreateGameSessionResponse = D1 (MetaData "CreateGameSessionResponse" "Network.AWS.GameLift.CreateGameSession" "amazonka-gamelift-1.4.5-2krZbzEaIqtLV8ATX8AZ52" False) (C1 (MetaCons "CreateGameSessionResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cgsrsGameSession") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe GameSession))) (S1 (MetaSel (Just Symbol "_cgsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

cgsrsGameSession :: Lens' CreateGameSessionResponse (Maybe GameSession) Source #

Object containing the newly created game session record.