Class: AWSCDK::GameLift::CfnAlias::RoutingStrategyProperty

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

Overview

The routing configuration for a fleet alias.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, fleet_id: nil, message: nil) ⇒ RoutingStrategyProperty

Returns a new instance of RoutingStrategyProperty.

Parameters:

  • type (String)

    A type of routing strategy.

  • fleet_id (String, nil) (defaults to: nil)

    A unique identifier for a fleet that the alias points to.

  • message (String, nil) (defaults to: nil)

    The message text to be used with a terminal routing strategy.



597
598
599
600
601
602
603
604
# File 'game_lift/cfn_alias.rb', line 597

def initialize(type:, fleet_id: nil, message: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @fleet_id = fleet_id
  Jsii::Type.check_type(@fleet_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fleetId") unless @fleet_id.nil?
  @message = message
  Jsii::Type.check_type(@message, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "message") unless @message.nil?
end

Instance Attribute Details

#fleet_idString? (readonly)

A unique identifier for a fleet that the alias points to.

If you specify SIMPLE for the Type property, you must specify this property.



622
623
624
# File 'game_lift/cfn_alias.rb', line 622

def fleet_id
  @fleet_id
end

#messageString? (readonly)

The message text to be used with a terminal routing strategy.

If you specify TERMINAL for the Type property, you must specify this property.



629
630
631
# File 'game_lift/cfn_alias.rb', line 629

def message
  @message
end

#typeString (readonly)

A type of routing strategy.

Possible routing types include the following:

  • SIMPLE - The alias resolves to one specific fleet. Use this type when routing to active fleets.
  • TERMINAL - The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a TerminalRoutingStrategyException with the message that you specified in the Message property.


615
616
617
# File 'game_lift/cfn_alias.rb', line 615

def type
  @type
end

Class Method Details

.jsii_propertiesObject



631
632
633
634
635
636
637
# File 'game_lift/cfn_alias.rb', line 631

def self.jsii_properties
  {
    :type => "type",
    :fleet_id => "fleetId",
    :message => "message",
  }
end

Instance Method Details

#to_jsiiObject



639
640
641
642
643
644
645
646
647
# File 'game_lift/cfn_alias.rb', line 639

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "fleetId" => @fleet_id,
    "message" => @message,
  })
  result.compact
end