You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::GameLift::Types::SearchGameSessionsInput

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-gamelift/lib/aws-sdk-gamelift/types.rb

Overview

Note:

When making an API call, you may pass SearchGameSessionsInput data as a hash:

{
  fleet_id: "FleetId",
  alias_id: "AliasId",
  filter_expression: "NonZeroAndMaxString",
  sort_expression: "NonZeroAndMaxString",
  limit: 1,
  next_token: "NonZeroAndMaxString",
}

Represents the input for a request action.

Instance Attribute Summary collapse

Instance Attribute Details

#alias_idString

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.

Returns:

  • (String)


5445
5446
5447
5448
5449
5450
5451
5452
5453
# File 'gems/aws-sdk-gamelift/lib/aws-sdk-gamelift/types.rb', line 5445

class SearchGameSessionsInput < Struct.new(
  :fleet_id,
  :alias_id,
  :filter_expression,
  :sort_expression,
  :limit,
  :next_token)
  include Aws::Structure
end

#filter_expressionString

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:

  1. =, <>, <, >, <=, >=

  2. Parentheses

  3. NOT

  4. AND

  5. 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".

Returns:

  • (String)


5445
5446
5447
5448
5449
5450
5451
5452
5453
# File 'gems/aws-sdk-gamelift/lib/aws-sdk-gamelift/types.rb', line 5445

class SearchGameSessionsInput < Struct.new(
  :fleet_id,
  :alias_id,
  :filter_expression,
  :sort_expression,
  :limit,
  :next_token)
  include Aws::Structure
end

#fleet_idString

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.

Returns:

  • (String)


5445
5446
5447
5448
5449
5450
5451
5452
5453
# File 'gems/aws-sdk-gamelift/lib/aws-sdk-gamelift/types.rb', line 5445

class SearchGameSessionsInput < Struct.new(
  :fleet_id,
  :alias_id,
  :filter_expression,
  :sort_expression,
  :limit,
  :next_token)
  include Aws::Structure
end

#limitInteger

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.

Returns:

  • (Integer)


5445
5446
5447
5448
5449
5450
5451
5452
5453
# File 'gems/aws-sdk-gamelift/lib/aws-sdk-gamelift/types.rb', line 5445

class SearchGameSessionsInput < Struct.new(
  :fleet_id,
  :alias_id,
  :filter_expression,
  :sort_expression,
  :limit,
  :next_token)
  include Aws::Structure
end

#next_tokenString

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.

Returns:

  • (String)


5445
5446
5447
5448
5449
5450
5451
5452
5453
# File 'gems/aws-sdk-gamelift/lib/aws-sdk-gamelift/types.rb', line 5445

class SearchGameSessionsInput < Struct.new(
  :fleet_id,
  :alias_id,
  :filter_expression,
  :sort_expression,
  :limit,
  :next_token)
  include Aws::Structure
end

#sort_expressionString

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.

Returns:

  • (String)


5445
5446
5447
5448
5449
5450
5451
5452
5453
# File 'gems/aws-sdk-gamelift/lib/aws-sdk-gamelift/types.rb', line 5445

class SearchGameSessionsInput < Struct.new(
  :fleet_id,
  :alias_id,
  :filter_expression,
  :sort_expression,
  :limit,
  :next_token)
  include Aws::Structure
end