Class: AWSCDK::GameLift::CfnGameSessionQueue::PriorityConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
game_lift/cfn_game_session_queue.rb

Overview

Custom prioritization settings for use by a game session queue when placing new game sessions with available game servers.

When defined, this configuration replaces the default FleetIQ prioritization process, which is as follows:

  • If player latency data is included in a game session request, destinations and locations are prioritized first based on lowest average latency (1), then on lowest hosting cost (2), then on destination list order (3), and finally on location (alphabetical) (4). This approach ensures that the queue's top priority is to place game sessions where average player latency is lowest, and--if latency is the same--where the hosting cost is less, etc.
  • If player latency data is not included, destinations and locations are prioritized first on destination list order (1), and then on location (alphabetical) (2). This approach ensures that the queue's top priority is to place game sessions on the first destination fleet listed. If that fleet has multiple locations, the game session is placed on the first location (when listed alphabetically).

Changing the priority order will affect how game sessions are placed.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location_order: nil, priority_order: nil) ⇒ PriorityConfigurationProperty

Returns a new instance of PriorityConfigurationProperty.

Parameters:

  • location_order (Array<String>, nil) (defaults to: nil)

    The prioritization order to use for fleet locations, when the PriorityOrder property includes LOCATION .

  • priority_order (Array<String>, nil) (defaults to: nil)

    A custom sequence to use when prioritizing where to place new game sessions. Each priority type is listed once.



819
820
821
822
823
824
# File 'game_lift/cfn_game_session_queue.rb', line 819

def initialize(location_order: nil, priority_order: nil)
  @location_order = location_order
  Jsii::Type.check_type(@location_order, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "locationOrder") unless @location_order.nil?
  @priority_order = priority_order
  Jsii::Type.check_type(@priority_order, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "priorityOrder") unless @priority_order.nil?
end

Instance Attribute Details

#location_orderArray<String>? (readonly)

The prioritization order to use for fleet locations, when the PriorityOrder property includes LOCATION .

Locations can include AWS Region codes (such as us-west-2 ), local zones, and custom locations (for Anywhere fleets). Each location must be listed only once. For details, see Amazon GameLift Servers service locations.



832
833
834
# File 'game_lift/cfn_game_session_queue.rb', line 832

def location_order
  @location_order
end

#priority_orderArray<String>? (readonly)

A custom sequence to use when prioritizing where to place new game sessions. Each priority type is listed once.

  • LATENCY -- Amazon GameLift Servers prioritizes locations where the average player latency is lowest. Player latency data is provided in each game session placement request.
  • COST -- Amazon GameLift Servers prioritizes queue destinations with the lowest current hosting costs. Cost is evaluated based on the destination's location, instance type, and fleet type (Spot or On-Demand).
  • DESTINATION -- Amazon GameLift Servers prioritizes based on the list order of destinations in the queue configuration.
  • LOCATION -- Amazon GameLift Servers prioritizes based on the provided order of locations, as defined in LocationOrder .


842
843
844
# File 'game_lift/cfn_game_session_queue.rb', line 842

def priority_order
  @priority_order
end

Class Method Details

.jsii_propertiesObject



844
845
846
847
848
849
# File 'game_lift/cfn_game_session_queue.rb', line 844

def self.jsii_properties
  {
    :location_order => "locationOrder",
    :priority_order => "priorityOrder",
  }
end

Instance Method Details

#to_jsiiObject



851
852
853
854
855
856
857
858
# File 'game_lift/cfn_game_session_queue.rb', line 851

def to_jsii
  result = {}
  result.merge!({
    "locationOrder" => @location_order,
    "priorityOrder" => @priority_order,
  })
  result.compact
end