amazonka-gamelift-1.6.0: Amazon GameLift SDK.

Copyright(c) 2013-2018 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.CreatePlayerSessions

Contents

Description

Adds a group of players to a game session. This action is useful with a team matching feature. Before players 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 single player to a game session, use CreatePlayerSession .

To create player sessions, specify a game session ID, a list of player IDs, and optionally a set of player data strings. If successful, the players are added to the game session and a set of new PlayerSession objects 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

createPlayerSessions #

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

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

  • cpsPlayerDataMap - Map of string pairs, each specifying a player ID and a set of developer-defined information related to the player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game. Player data strings for player IDs not included in the PlayerIds parameter are ignored.
  • cpsGameSessionId - Unique identifier for the game session to add players to.
  • cpsPlayerIds - List of unique identifiers for the players to be added.

data CreatePlayerSessions #

Represents the input for a request action.

See: createPlayerSessions smart constructor.

Instances

Eq CreatePlayerSessions # 
Data CreatePlayerSessions # 

Methods

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

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

toConstr :: CreatePlayerSessions -> Constr #

dataTypeOf :: CreatePlayerSessions -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreatePlayerSessions # 
Show CreatePlayerSessions # 
Generic CreatePlayerSessions # 
Hashable CreatePlayerSessions # 
ToJSON CreatePlayerSessions # 
NFData CreatePlayerSessions # 

Methods

rnf :: CreatePlayerSessions -> () #

AWSRequest CreatePlayerSessions # 
ToHeaders CreatePlayerSessions # 
ToPath CreatePlayerSessions # 
ToQuery CreatePlayerSessions # 
type Rep CreatePlayerSessions # 
type Rep CreatePlayerSessions = D1 * (MetaData "CreatePlayerSessions" "Network.AWS.GameLift.CreatePlayerSessions" "amazonka-gamelift-1.6.0-AFaGsb9wXmY9FImAlEHdkb" False) (C1 * (MetaCons "CreatePlayerSessions'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cpsPlayerDataMap") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe (Map Text Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cpsGameSessionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_cpsPlayerIds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (List1 Text))))))
type Rs CreatePlayerSessions # 

Request Lenses

cpsPlayerDataMap :: Lens' CreatePlayerSessions (HashMap Text Text) #

Map of string pairs, each specifying a player ID and a set of developer-defined information related to the player. Amazon GameLift does not use this data, so it can be formatted as needed for use in the game. Player data strings for player IDs not included in the PlayerIds parameter are ignored.

cpsGameSessionId :: Lens' CreatePlayerSessions Text #

Unique identifier for the game session to add players to.

cpsPlayerIds :: Lens' CreatePlayerSessions (NonEmpty Text) #

List of unique identifiers for the players to be added.

Destructuring the Response

createPlayerSessionsResponse #

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

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

data CreatePlayerSessionsResponse #

Represents the returned data in response to a request action.

See: createPlayerSessionsResponse smart constructor.

Instances

Eq CreatePlayerSessionsResponse # 
Data CreatePlayerSessionsResponse # 

Methods

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

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

toConstr :: CreatePlayerSessionsResponse -> Constr #

dataTypeOf :: CreatePlayerSessionsResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreatePlayerSessionsResponse # 
Show CreatePlayerSessionsResponse # 
Generic CreatePlayerSessionsResponse # 
NFData CreatePlayerSessionsResponse # 
type Rep CreatePlayerSessionsResponse # 
type Rep CreatePlayerSessionsResponse = D1 * (MetaData "CreatePlayerSessionsResponse" "Network.AWS.GameLift.CreatePlayerSessions" "amazonka-gamelift-1.6.0-AFaGsb9wXmY9FImAlEHdkb" False) (C1 * (MetaCons "CreatePlayerSessionsResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_crsPlayerSessions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [PlayerSession]))) (S1 * (MetaSel (Just Symbol "_crsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))

Response Lenses

crsPlayerSessions :: Lens' CreatePlayerSessionsResponse [PlayerSession] #

Collection of player session objects created for the added players.

crsResponseStatus :: Lens' CreatePlayerSessionsResponse Int #

  • - | The response status code.