Class: AWSCDK::GameLift::CfnContainerFleet::TargetConfigurationProperty

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

Overview

Settings for a target-based scaling policy.

A target-based policy tracks a particular fleet metric specifies a target value for the metric. As player usage changes, the policy triggers Amazon GameLift Servers to adjust capacity so that the metric returns to the target value. The target configuration specifies settings as needed for the target based policy, including the target value.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_value:) ⇒ TargetConfigurationProperty

Returns a new instance of TargetConfigurationProperty.

Parameters:

  • target_value (Numeric)

    Desired value to use with a target-based scaling policy.



1477
1478
1479
1480
# File 'game_lift/cfn_container_fleet.rb', line 1477

def initialize(target_value:)
  @target_value = target_value
  Jsii::Type.check_type(@target_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetValue")
end

Instance Attribute Details

#target_valueNumeric (readonly)

Desired value to use with a target-based scaling policy.

The value must be relevant for whatever metric the scaling policy is using. For example, in a policy using the metric PercentAvailableGameSessions, the target value should be the preferred size of the fleet's buffer (the percent of capacity that should be idle and ready for new game sessions).



1488
1489
1490
# File 'game_lift/cfn_container_fleet.rb', line 1488

def target_value
  @target_value
end

Class Method Details

.jsii_propertiesObject



1490
1491
1492
1493
1494
# File 'game_lift/cfn_container_fleet.rb', line 1490

def self.jsii_properties
  {
    :target_value => "targetValue",
  }
end

Instance Method Details

#to_jsiiObject



1496
1497
1498
1499
1500
1501
1502
# File 'game_lift/cfn_container_fleet.rb', line 1496

def to_jsii
  result = {}
  result.merge!({
    "targetValue" => @target_value,
  })
  result.compact
end