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

Contents

Description

Retrieves a set of game sessions that match a set of search criteria and sorts them in a specified order. A game session search is limited to a single fleet. Search results include only game sessions that are in ACTIVE status. If you need to retrieve game sessions with a status other than active, use DescribeGameSessions . If you need to retrieve the protection policy for each game session, use DescribeGameSessionDetails .

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.
  • 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.
  • 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 .
  • hasAvailablePlayerSessions -- Boolean value indicating whether a game session has reached its maximum number of players. When searching with this attribute, the search value must be true or false . 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. Use the pagination parameters to retrieve results as a set of sequential pages. If successful, a collection of GameSession objects matching the request is returned.

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 , creationTimeMillis , playerSessionCount , maximumSessions , hasAvailablePlayerSessions . * Comparator -- Valid comparators are: = , <> , < , > , <= , >= . * Value -- Value to be searched for. Values can be numbers, boolean values (true/false) or strings. String values are case sensitive, 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 , creationTimeMillis , playerSessionCount , maximumSessions , 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 # 
Data SearchGameSessions Source # 

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 # 
Show SearchGameSessions Source # 
Generic SearchGameSessions Source # 
Hashable SearchGameSessions Source # 
ToJSON SearchGameSessions Source # 
NFData SearchGameSessions Source # 

Methods

rnf :: SearchGameSessions -> () #

AWSRequest SearchGameSessions Source # 
ToQuery SearchGameSessions Source # 
ToPath SearchGameSessions Source # 
ToHeaders SearchGameSessions Source # 
type Rep SearchGameSessions Source # 
type Rep SearchGameSessions = D1 (MetaData "SearchGameSessions" "Network.AWS.GameLift.SearchGameSessions" "amazonka-gamelift-1.5.0-LWFsf2alHztGD91U7ab8u0" False) (C1 (MetaCons "SearchGameSessions'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_sgsFilterExpression") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_sgsSortExpression") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_sgsAliasId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) ((:*:) (S1 (MetaSel (Just Symbol "_sgsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_sgsLimit") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat))) (S1 (MetaSel (Just Symbol "_sgsFleetId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))))
type Rs SearchGameSessions Source # 

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 , creationTimeMillis , playerSessionCount , maximumSessions , hasAvailablePlayerSessions . * Comparator -- Valid comparators are: = , <> , < , > , <= , >= . * Value -- Value to be searched for. Values can be numbers, boolean values (true/false) or strings. String values are case sensitive, 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 , creationTimeMillis , playerSessionCount , maximumSessions , 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 # 
Data SearchGameSessionsResponse Source # 

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 # 
Show SearchGameSessionsResponse Source # 
Generic SearchGameSessionsResponse Source # 
NFData SearchGameSessionsResponse Source # 
type Rep SearchGameSessionsResponse Source # 
type Rep SearchGameSessionsResponse = D1 (MetaData "SearchGameSessionsResponse" "Network.AWS.GameLift.SearchGameSessions" "amazonka-gamelift-1.5.0-LWFsf2alHztGD91U7ab8u0" False) (C1 (MetaCons "SearchGameSessionsResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_sgsrsGameSessions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [GameSession]))) ((:*:) (S1 (MetaSel (Just Symbol "_sgsrsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_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.