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.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 have 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 the game session properties and other settings you specified.

Idempotency tokens. You can add a token that uniquely identifies game session requests. This is useful for ensuring that game session requests are idempotent. Multiple requests with the same idempotency token are processed only once; subsequent requests return the original result. All response values are the same with the exception of game session status, which may change.

Resource creation limits. If you are creating a game session on a fleet with a resource creation limit policy in force, then you must specify a creator ID. Without this ID, Amazon GameLift has no way to evaluate the policy for this new game session request.

Player acceptance policy. By default, newly created game sessions are open to new players. You can restrict new player access by using UpdateGameSession to change the game session's player session creation policy.

Game session logs. Logs are retained for all active game sessions for 14 days. To access the logs, call GetGameSessionLogUrl to download the log files.

Available in Amazon GameLift Local.

Game-session-related operations include:

  • CreateGameSession
  • DescribeGameSessions
  • DescribeGameSessionDetails
  • SearchGameSessions
  • UpdateGameSession
  • GetGameSessionLogUrl
  • Game session placements
  • StartGameSessionPlacement
  • DescribeGameSessionPlacement
  • StopGameSessionPlacement

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:

  • cgsIdempotencyToken - Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID. (A game session ARN has the following format: arn:aws:gamelift:region::gamesessionIDID string or idempotency token .) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are retained for this time period and then deleted.
  • cgsGameProperties - Set of developer-defined properties for a game session, formatted as a set of type:value pairs. These properties are included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session ).
  • cgsGameSessionId - This parameter is no longer preferred. Please use IdempotencyToken instead. Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID. (A game session ARN has the following format: arn:aws:gamelift:region::gamesessionIDID string or idempotency token .)
  • cgsAliasId - Unique identifier for an alias associated with the fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.
  • cgsName - Descriptive label that is associated with a game session. Session names do not need to be unique.
  • cgsGameSessionData - Set of developer-defined game session properties, formatted as a single string value. This data is included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session ).
  • cgsFleetId - Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.
  • cgsCreatorId - Unique identifier for a player 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 # 
ToQuery CreateGameSession Source # 
ToPath CreateGameSession Source # 
ToHeaders CreateGameSession Source # 
type Rep CreateGameSession Source # 
type Rep CreateGameSession = D1 (MetaData "CreateGameSession" "Network.AWS.GameLift.CreateGameSession" "amazonka-gamelift-1.5.0-LWFsf2alHztGD91U7ab8u0" False) (C1 (MetaCons "CreateGameSession'" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_cgsIdempotencyToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (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 "_cgsGameSessionData") 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

cgsIdempotencyToken :: Lens' CreateGameSession (Maybe Text) Source #

Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID. (A game session ARN has the following format: arn:aws:gamelift:region::gamesessionIDID string or idempotency token .) Idempotency tokens remain in use for 30 days after a game session has ended; game session objects are retained for this time period and then deleted.

cgsGameProperties :: Lens' CreateGameSession [GameProperty] Source #

Set of developer-defined properties for a game session, formatted as a set of type:value pairs. These properties are included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session ).

cgsGameSessionId :: Lens' CreateGameSession (Maybe Text) Source #

This parameter is no longer preferred. Please use IdempotencyToken instead. Custom string that uniquely identifies a request for a new game session. Maximum token length is 48 characters. If provided, this string is included in the new game session's ID. (A game session ARN has the following format: arn:aws:gamelift:region::gamesessionIDID string or idempotency token .)

cgsAliasId :: Lens' CreateGameSession (Maybe Text) Source #

Unique identifier for an alias associated with the fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.

cgsName :: Lens' CreateGameSession (Maybe Text) Source #

Descriptive label that is associated with a game session. Session names do not need to be unique.

cgsGameSessionData :: Lens' CreateGameSession (Maybe Text) Source #

Set of developer-defined game session properties, formatted as a single string value. This data is included in the GameSession object, which is passed to the game server with a request to start a new game session (see Start a Game Session ).

cgsFleetId :: Lens' CreateGameSession (Maybe Text) Source #

Unique identifier for a fleet to create a game session in. Each request must reference either a fleet ID or alias ID, but not both.

cgsCreatorId :: Lens' CreateGameSession (Maybe Text) Source #

Unique identifier for a player 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.5.0-LWFsf2alHztGD91U7ab8u0" False) (C1 (MetaCons "CreateGameSessionResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cgsrsGameSession") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe GameSession))) (S1 (MetaSel (Just Symbol "_cgsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

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

Object that describes the newly created game session record.