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

Amazonka.GameLift.CreatePlayerSessions

Description

Reserves open slots in a game session for a group of players. New player sessions can be created in any game session with an open slot that is in ACTIVE status and has a player creation policy of ACCEPT_ALL. To add a single player to a game session, use CreatePlayerSession.

To create player sessions, specify a game session ID and a list of player IDs. Optionally, provide a set of player data for each player ID.

If successful, a slot is reserved in the game session for each player, and new PlayerSession objects are returned with player session IDs. Each player references their player session ID when sending a connection request to the game session, and the game server can use it to validate the player reservation with the GameLift service. Player sessions cannot be updated.

Available in Amazon GameLift Local.

Related actions

CreatePlayerSession | CreatePlayerSessions | DescribePlayerSessions | StartGameSessionPlacement | DescribeGameSessionPlacement | All APIs by task

Synopsis

Creating a Request

data CreatePlayerSessions Source #

Represents the input for a request operation.

See: newCreatePlayerSessions smart constructor.

Constructors

CreatePlayerSessions' 

Fields

  • playerDataMap :: Maybe (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. Any player data strings for player IDs that are not included in the PlayerIds parameter are ignored.

  • gameSessionId :: Text

    A unique identifier for the game session to add players to.

  • playerIds :: NonEmpty Text

    List of unique identifiers for the players to be added.

Instances

Instances details
Eq CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Read CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Show CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Generic CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Associated Types

type Rep CreatePlayerSessions :: Type -> Type #

NFData CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Methods

rnf :: CreatePlayerSessions -> () #

Hashable CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

ToJSON CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

AWSRequest CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Associated Types

type AWSResponse CreatePlayerSessions #

ToHeaders CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

ToPath CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

ToQuery CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

type Rep CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

type Rep CreatePlayerSessions = D1 ('MetaData "CreatePlayerSessions" "Amazonka.GameLift.CreatePlayerSessions" "libZSservicesZSamazonka-gameliftZSamazonka-gamelift" 'False) (C1 ('MetaCons "CreatePlayerSessions'" 'PrefixI 'True) (S1 ('MetaSel ('Just "playerDataMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: (S1 ('MetaSel ('Just "gameSessionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "playerIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text)))))
type AWSResponse CreatePlayerSessions Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

newCreatePlayerSessions Source #

Create a value of CreatePlayerSessions with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:playerDataMap:CreatePlayerSessions', createPlayerSessions_playerDataMap - 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. Any player data strings for player IDs that are not included in the PlayerIds parameter are ignored.

$sel:gameSessionId:CreatePlayerSessions', createPlayerSessions_gameSessionId - A unique identifier for the game session to add players to.

$sel:playerIds:CreatePlayerSessions', createPlayerSessions_playerIds - List of unique identifiers for the players to be added.

Request Lenses

createPlayerSessions_playerDataMap :: Lens' CreatePlayerSessions (Maybe (HashMap Text Text)) Source #

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. Any player data strings for player IDs that are not included in the PlayerIds parameter are ignored.

createPlayerSessions_gameSessionId :: Lens' CreatePlayerSessions Text Source #

A unique identifier for the game session to add players to.

createPlayerSessions_playerIds :: Lens' CreatePlayerSessions (NonEmpty Text) Source #

List of unique identifiers for the players to be added.

Destructuring the Response

data CreatePlayerSessionsResponse Source #

Represents the returned data in response to a request operation.

See: newCreatePlayerSessionsResponse smart constructor.

Constructors

CreatePlayerSessionsResponse' 

Fields

Instances

Instances details
Eq CreatePlayerSessionsResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Read CreatePlayerSessionsResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Show CreatePlayerSessionsResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Generic CreatePlayerSessionsResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

Associated Types

type Rep CreatePlayerSessionsResponse :: Type -> Type #

NFData CreatePlayerSessionsResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

type Rep CreatePlayerSessionsResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSessions

type Rep CreatePlayerSessionsResponse = D1 ('MetaData "CreatePlayerSessionsResponse" "Amazonka.GameLift.CreatePlayerSessions" "libZSservicesZSamazonka-gameliftZSamazonka-gamelift" 'False) (C1 ('MetaCons "CreatePlayerSessionsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "playerSessions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [PlayerSession])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreatePlayerSessionsResponse Source #

Create a value of CreatePlayerSessionsResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:playerSessions:CreatePlayerSessionsResponse', createPlayerSessionsResponse_playerSessions - A collection of player session objects created for the added players.

$sel:httpStatus:CreatePlayerSessionsResponse', createPlayerSessionsResponse_httpStatus - The response's http status code.

Response Lenses

createPlayerSessionsResponse_playerSessions :: Lens' CreatePlayerSessionsResponse (Maybe [PlayerSession]) Source #

A collection of player session objects created for the added players.