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

Description

Reserves an open player slot in a game session for a player. 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. You can add a group of players to a game session with CreatePlayerSessions.

To create a player session, specify a game session ID, player ID, and optionally a set of player data.

If successful, a slot is reserved in the game session for the player and a new PlayerSession object is returned with a player session ID. The player references the 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 CreatePlayerSession Source #

Represents the input for a request operation.

See: newCreatePlayerSession smart constructor.

Constructors

CreatePlayerSession' 

Fields

  • playerData :: Maybe Text

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

  • gameSessionId :: Text

    A unique identifier for the game session to add a player to.

  • playerId :: Text

    A unique identifier for a player. Player IDs are developer-defined.

Instances

Instances details
Eq CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Read CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Show CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Generic CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Associated Types

type Rep CreatePlayerSession :: Type -> Type #

NFData CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Methods

rnf :: CreatePlayerSession -> () #

Hashable CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

ToJSON CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

AWSRequest CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Associated Types

type AWSResponse CreatePlayerSession #

ToHeaders CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

ToPath CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

ToQuery CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

type Rep CreatePlayerSession Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

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

Defined in Amazonka.GameLift.CreatePlayerSession

newCreatePlayerSession Source #

Create a value of CreatePlayerSession 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:playerData:CreatePlayerSession', createPlayerSession_playerData - Developer-defined information related to a player. GameLift does not use this data, so it can be formatted as needed for use in the game.

$sel:gameSessionId:CreatePlayerSession', createPlayerSession_gameSessionId - A unique identifier for the game session to add a player to.

$sel:playerId:CreatePlayerSession', createPlayerSession_playerId - A unique identifier for a player. Player IDs are developer-defined.

Request Lenses

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

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

createPlayerSession_gameSessionId :: Lens' CreatePlayerSession Text Source #

A unique identifier for the game session to add a player to.

createPlayerSession_playerId :: Lens' CreatePlayerSession Text Source #

A unique identifier for a player. Player IDs are developer-defined.

Destructuring the Response

data CreatePlayerSessionResponse Source #

Represents the returned data in response to a request operation.

See: newCreatePlayerSessionResponse smart constructor.

Constructors

CreatePlayerSessionResponse' 

Fields

Instances

Instances details
Eq CreatePlayerSessionResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Read CreatePlayerSessionResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Show CreatePlayerSessionResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Generic CreatePlayerSessionResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

Associated Types

type Rep CreatePlayerSessionResponse :: Type -> Type #

NFData CreatePlayerSessionResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

type Rep CreatePlayerSessionResponse Source # 
Instance details

Defined in Amazonka.GameLift.CreatePlayerSession

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

newCreatePlayerSessionResponse Source #

Create a value of CreatePlayerSessionResponse 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:playerSession:CreatePlayerSessionResponse', createPlayerSessionResponse_playerSession - Object that describes the newly created player session record.

$sel:httpStatus:CreatePlayerSessionResponse', createPlayerSessionResponse_httpStatus - The response's http status code.

Response Lenses

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

Object that describes the newly created player session record.