amazonka-gamelift-1.6.1: 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.SearchGameSessions

Contents

Description

Retrieves all active game sessions that match a set of search criteria and sorts them in a specified order. You can search or sort by the following game session attributes:

  • gameSessionId -- Unique identifier for the game session. You can use either a GameSessionId or GameSessionArn value.
  • gameSessionName -- Name assigned to a game session. This value is set when requesting a new game session with CreateGameSession or updating with UpdateGameSession . Game session names do not need to be unique to a game session.
  • gameSessionProperties -- Custom data defined in a game session's GameProperty parameter. GameProperty values are stored as key:value pairs; the filter expression must indicate the key and a string to search the data values for. For example, to search for game sessions with custom data containing the key:value pair "gameMode:brawl", specify the following: gameSessionProperties.gameMode = "brawl" . All custom data values are searched as strings.
  • maximumSessions -- Maximum number of player sessions allowed for a game session. This value is set when requesting a new game session with CreateGameSession or updating with UpdateGameSession .
  • creationTimeMillis -- Value indicating when a game session was created. It is expressed in Unix time as milliseconds.
  • playerSessionCount -- Number of players currently connected to a game session. This value changes rapidly as players join the session or drop out.
  • hasAvailablePlayerSessions -- Boolean value indicating whether a game session has reached its maximum number of players. It is highly recommended that all search requests include this filter attribute to optimize search performance and return only sessions that players can join.

To search or sort, specify either a fleet ID or an alias ID, and provide a search filter expression, a sort expression, or both. If successful, a collection of GameSession objects matching the request is returned. Use the pagination parameters to retrieve results as a set of sequential pages.

You can search for game sessions one fleet at a time only. To find game sessions across multiple fleets, you must search each fleet separately and combine the results. This search feature finds only game sessions that are in ACTIVE status. To locate games in statuses other than active, use DescribeGameSessionDetails .

Game-session-related operations include:

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

Creating a Request

searchGameSessions :: SearchGameSessions Source #

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

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

  • sgsFilterExpression - String containing the search criteria for the session search. If no filter expression is included, the request returns results for all game sessions in the fleet that are in ACTIVE status. A filter expression can contain one or multiple conditions. Each condition consists of the following: * Operand -- Name of a game session attribute. Valid values are gameSessionName , gameSessionId , gameSessionProperties , maximumSessions , creationTimeMillis , playerSessionCount , hasAvailablePlayerSessions . * Comparator -- Valid comparators are: = , <> , < , > , <= , >= . * Value -- Value to be searched for. Values may be numbers, boolean values (true/false) or strings depending on the operand. String values are case sensitive and must be enclosed in single quotes. Special characters must be escaped. Boolean and string values can only be used with the comparators = and <> . For example, the following filter expression searches on gameSessionName : "FilterExpression": "gameSessionName = 'Matt\\'s Awesome Game 1'" . To chain multiple conditions in a single expression, use the logical keywords AND , OR , and NOT and parentheses as needed. For example: x AND y AND NOT z , NOT (x OR y) . Session search evaluates conditions from left to right using the following precedence rules: * = , <> , < , > , <= , >= * Parentheses * NOT * AND * OR For example, this filter expression retrieves game sessions hosting at least ten players that have an open player slot: "maximumSessions>=10 AND hasAvailablePlayerSessions=true" .
  • sgsSortExpression - Instructions on how to sort the search results. If no sort expression is included, the request returns results in random order. A sort expression consists of the following elements: * Operand -- Name of a game session attribute. Valid values are gameSessionName , gameSessionId , gameSessionProperties , maximumSessions , creationTimeMillis , playerSessionCount , hasAvailablePlayerSessions . * Order -- Valid sort orders are ASC (ascending) and DESC (descending). For example, this sort expression returns the oldest active sessions first: SortExpression: "creationTimeMillis ASC" . Results with a null value for the sort operand are returned at the end of the list.
  • sgsAliasId - Unique identifier for an alias associated with the fleet to search for active game sessions. Each request must reference either a fleet ID or alias ID, but not both.
  • sgsNextToken - Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.
  • sgsLimit - Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. The maximum number of results returned is 20, even if this value is not set or is set higher than 20.
  • sgsFleetId - Unique identifier for a fleet to search for active game sessions. Each request must reference either a fleet ID or alias ID, but not both.

data SearchGameSessions Source #

Represents the input for a request action.

See: searchGameSessions smart constructor.

Instances
Eq SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Data SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Methods

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

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

toConstr :: SearchGameSessions -> Constr #

dataTypeOf :: SearchGameSessions -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Show SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Generic SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Associated Types

type Rep SearchGameSessions :: Type -> Type #

Hashable SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

ToJSON SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

AWSRequest SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Associated Types

type Rs SearchGameSessions :: Type #

ToHeaders SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

ToPath SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

ToQuery SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

NFData SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Methods

rnf :: SearchGameSessions -> () #

type Rep SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

type Rep SearchGameSessions = D1 (MetaData "SearchGameSessions" "Network.AWS.GameLift.SearchGameSessions" "amazonka-gamelift-1.6.1-GajLKSxsevT2faX837q2Xl" False) (C1 (MetaCons "SearchGameSessions'" PrefixI True) ((S1 (MetaSel (Just "_sgsFilterExpression") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_sgsSortExpression") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_sgsAliasId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 (MetaSel (Just "_sgsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_sgsLimit") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat)) :*: S1 (MetaSel (Just "_sgsFleetId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))
type Rs SearchGameSessions Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Request Lenses

sgsFilterExpression :: Lens' SearchGameSessions (Maybe Text) Source #

String containing the search criteria for the session search. If no filter expression is included, the request returns results for all game sessions in the fleet that are in ACTIVE status. A filter expression can contain one or multiple conditions. Each condition consists of the following: * Operand -- Name of a game session attribute. Valid values are gameSessionName , gameSessionId , gameSessionProperties , maximumSessions , creationTimeMillis , playerSessionCount , hasAvailablePlayerSessions . * Comparator -- Valid comparators are: = , <> , < , > , <= , >= . * Value -- Value to be searched for. Values may be numbers, boolean values (true/false) or strings depending on the operand. String values are case sensitive and must be enclosed in single quotes. Special characters must be escaped. Boolean and string values can only be used with the comparators = and <> . For example, the following filter expression searches on gameSessionName : "FilterExpression": "gameSessionName = 'Matt\\'s Awesome Game 1'" . To chain multiple conditions in a single expression, use the logical keywords AND , OR , and NOT and parentheses as needed. For example: x AND y AND NOT z , NOT (x OR y) . Session search evaluates conditions from left to right using the following precedence rules: * = , <> , < , > , <= , >= * Parentheses * NOT * AND * OR For example, this filter expression retrieves game sessions hosting at least ten players that have an open player slot: "maximumSessions>=10 AND hasAvailablePlayerSessions=true" .

sgsSortExpression :: Lens' SearchGameSessions (Maybe Text) Source #

Instructions on how to sort the search results. If no sort expression is included, the request returns results in random order. A sort expression consists of the following elements: * Operand -- Name of a game session attribute. Valid values are gameSessionName , gameSessionId , gameSessionProperties , maximumSessions , creationTimeMillis , playerSessionCount , hasAvailablePlayerSessions . * Order -- Valid sort orders are ASC (ascending) and DESC (descending). For example, this sort expression returns the oldest active sessions first: SortExpression: "creationTimeMillis ASC" . Results with a null value for the sort operand are returned at the end of the list.

sgsAliasId :: Lens' SearchGameSessions (Maybe Text) Source #

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

sgsNextToken :: Lens' SearchGameSessions (Maybe Text) Source #

Token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this action. To start at the beginning of the result set, do not specify a value.

sgsLimit :: Lens' SearchGameSessions (Maybe Natural) Source #

Maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages. The maximum number of results returned is 20, even if this value is not set or is set higher than 20.

sgsFleetId :: Lens' SearchGameSessions (Maybe Text) Source #

Unique identifier for a fleet to search for active game sessions. Each request must reference either a fleet ID or alias ID, but not both.

Destructuring the Response

searchGameSessionsResponse Source #

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

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

  • sgsrsGameSessions - Collection of objects containing game session properties for each session matching the request.
  • sgsrsNextToken - Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.
  • sgsrsResponseStatus - -- | The response status code.

data SearchGameSessionsResponse Source #

Represents the returned data in response to a request action.

See: searchGameSessionsResponse smart constructor.

Instances
Eq SearchGameSessionsResponse Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Data SearchGameSessionsResponse Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Methods

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

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

toConstr :: SearchGameSessionsResponse -> Constr #

dataTypeOf :: SearchGameSessionsResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SearchGameSessionsResponse Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Show SearchGameSessionsResponse Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Generic SearchGameSessionsResponse Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

Associated Types

type Rep SearchGameSessionsResponse :: Type -> Type #

NFData SearchGameSessionsResponse Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

type Rep SearchGameSessionsResponse Source # 
Instance details

Defined in Network.AWS.GameLift.SearchGameSessions

type Rep SearchGameSessionsResponse = D1 (MetaData "SearchGameSessionsResponse" "Network.AWS.GameLift.SearchGameSessions" "amazonka-gamelift-1.6.1-GajLKSxsevT2faX837q2Xl" False) (C1 (MetaCons "SearchGameSessionsResponse'" PrefixI True) (S1 (MetaSel (Just "_sgsrsGameSessions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [GameSession])) :*: (S1 (MetaSel (Just "_sgsrsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_sgsrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

sgsrsGameSessions :: Lens' SearchGameSessionsResponse [GameSession] Source #

Collection of objects containing game session properties for each session matching the request.

sgsrsNextToken :: Lens' SearchGameSessionsResponse (Maybe Text) Source #

Token that indicates where to resume retrieving results on the next call to this action. If no token is returned, these results represent the end of the list.