amazonka-gamelift-1.5.0: Amazon GameLift SDK.

Copyright(c) 2013-2017 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.GameLift.CreatePlayerSession

Contents

Description

Adds a player to a game session and creates a player session record. Before a player 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 group of players to a game session, use CreatePlayerSessions .

To create a player session, specify a game session ID, player ID, and optionally a string of player data. If successful, the player is added to the game session and a new PlayerSession object 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

Creating a Request

createPlayerSession Source #

Creates a value of CreatePlayerSession with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • cPlayerData - Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.
  • cGameSessionId - Unique identifier for the game session to add a player to.
  • cPlayerId - Unique identifier for a player. Player IDs are developer-defined.

data CreatePlayerSession Source #

Represents the input for a request action.

See: createPlayerSession smart constructor.

Instances

Eq CreatePlayerSession Source # 
Data CreatePlayerSession Source # 

Methods

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

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

toConstr :: CreatePlayerSession -> Constr #

dataTypeOf :: CreatePlayerSession -> DataType #

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

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

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

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

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

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

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

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

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

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

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

Methods

rnf :: CreatePlayerSession -> () #

AWSRequest CreatePlayerSession Source # 
ToQuery CreatePlayerSession Source # 
ToPath CreatePlayerSession Source # 
ToHeaders CreatePlayerSession Source # 
type Rep CreatePlayerSession Source # 
type Rep CreatePlayerSession = D1 (MetaData "CreatePlayerSession" "Network.AWS.GameLift.CreatePlayerSession" "amazonka-gamelift-1.5.0-LWFsf2alHztGD91U7ab8u0" False) (C1 (MetaCons "CreatePlayerSession'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cPlayerData") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_cGameSessionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_cPlayerId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs CreatePlayerSession Source # 

Request Lenses

cPlayerData :: Lens' CreatePlayerSession (Maybe Text) Source #

Developer-defined information related to a player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game.

cGameSessionId :: Lens' CreatePlayerSession Text Source #

Unique identifier for the game session to add a player to.

cPlayerId :: Lens' CreatePlayerSession Text Source #

Unique identifier for a player. Player IDs are developer-defined.

Destructuring the Response

createPlayerSessionResponse Source #

Creates a value of CreatePlayerSessionResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreatePlayerSessionResponse Source #

Represents the returned data in response to a request action.

See: createPlayerSessionResponse smart constructor.

Instances

Eq CreatePlayerSessionResponse Source # 
Data CreatePlayerSessionResponse Source # 

Methods

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

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

toConstr :: CreatePlayerSessionResponse -> Constr #

dataTypeOf :: CreatePlayerSessionResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreatePlayerSessionResponse Source # 
Show CreatePlayerSessionResponse Source # 
Generic CreatePlayerSessionResponse Source # 
NFData CreatePlayerSessionResponse Source # 
type Rep CreatePlayerSessionResponse Source # 
type Rep CreatePlayerSessionResponse = D1 (MetaData "CreatePlayerSessionResponse" "Network.AWS.GameLift.CreatePlayerSession" "amazonka-gamelift-1.5.0-LWFsf2alHztGD91U7ab8u0" False) (C1 (MetaCons "CreatePlayerSessionResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cpsrsPlayerSession") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe PlayerSession))) (S1 (MetaSel (Just Symbol "_cpsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

cpsrsPlayerSession :: Lens' CreatePlayerSessionResponse (Maybe PlayerSession) Source #

Object that describes the newly created player session record.