AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the SearchGameSessions operation. 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
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 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.
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.
Returned values for
change quickly as players join sessions and others drop out. Results should be considered
a snapshot in time. Be sure to refresh search results often, and handle sessions that
fill up before a player 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:
public class SearchGameSessionsRequest : AmazonGameLiftRequest IAmazonWebServiceRequest
The SearchGameSessionsRequest type exposes the following members
Gets and sets the property AliasId.
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.
Gets and sets the property FilterExpression.
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
A filter expression can contain one or multiple conditions. Each condition consists of the following:
To chain multiple conditions in a single expression, use the logical keywords
x AND y AND NOT z,
Session search evaluates conditions from left to right using the following precedence rules:
For example, this filter expression retrieves game sessions hosting at least ten players
that have an open player slot:
Gets and sets the property FleetId.
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.
Gets and sets the property Limit.
Maximum number of results to return. Use this parameter with
Gets and sets the property NextToken.
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.
Gets and sets the property SortExpression.
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:
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.
Supported in: 1.3
Supported in: 4.5, 4.0, 3.5
Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms