Class: AWSCDK::GameLift::CfnFleet::ManagedCapacityConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GameLift::CfnFleet::ManagedCapacityConfigurationProperty
- Defined in:
- game_lift/cfn_fleet.rb
Overview
Configuration options for Amazon GameLift Servers-managed capacity behavior.
Instance Attribute Summary collapse
-
#scale_in_after_inactivity_minutes ⇒ Numeric?
readonly
Length of time, in minutes, that Amazon GameLift Servers will wait before scaling in your MinSize and DesiredInstances to 0 after a period with no game session activity.
-
#zero_capacity_strategy ⇒ String
readonly
The strategy Amazon GameLift Servers will use to automatically scale your capacity to and from zero in response to game session activity.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(zero_capacity_strategy:, scale_in_after_inactivity_minutes: nil) ⇒ ManagedCapacityConfigurationProperty
constructor
A new instance of ManagedCapacityConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(zero_capacity_strategy:, scale_in_after_inactivity_minutes: nil) ⇒ ManagedCapacityConfigurationProperty
Returns a new instance of ManagedCapacityConfigurationProperty.
1226 1227 1228 1229 1230 1231 |
# File 'game_lift/cfn_fleet.rb', line 1226 def initialize(zero_capacity_strategy:, scale_in_after_inactivity_minutes: nil) @zero_capacity_strategy = zero_capacity_strategy Jsii::Type.check_type(@zero_capacity_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "zeroCapacityStrategy") @scale_in_after_inactivity_minutes = scale_in_after_inactivity_minutes Jsii::Type.check_type(@scale_in_after_inactivity_minutes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scaleInAfterInactivityMinutes") unless @scale_in_after_inactivity_minutes.nil? end |
Instance Attribute Details
#scale_in_after_inactivity_minutes ⇒ Numeric? (readonly)
Length of time, in minutes, that Amazon GameLift Servers will wait before scaling in your MinSize and DesiredInstances to 0 after a period with no game session activity.
1244 1245 1246 |
# File 'game_lift/cfn_fleet.rb', line 1244 def scale_in_after_inactivity_minutes @scale_in_after_inactivity_minutes end |
#zero_capacity_strategy ⇒ String (readonly)
The strategy Amazon GameLift Servers will use to automatically scale your capacity to and from zero in response to game session activity.
Game session activity refers to any active running sessions or game session requests. When set to SCALE_TO_AND_FROM_ZERO, MinSize must not be specified and will be managed automatically. When set to MANUAL, MinSize is required.
1239 1240 1241 |
# File 'game_lift/cfn_fleet.rb', line 1239 def zero_capacity_strategy @zero_capacity_strategy end |
Class Method Details
.jsii_properties ⇒ Object
1246 1247 1248 1249 1250 1251 |
# File 'game_lift/cfn_fleet.rb', line 1246 def self.jsii_properties { :zero_capacity_strategy => "zeroCapacityStrategy", :scale_in_after_inactivity_minutes => "scaleInAfterInactivityMinutes", } end |
Instance Method Details
#to_jsii ⇒ Object
1253 1254 1255 1256 1257 1258 1259 1260 |
# File 'game_lift/cfn_fleet.rb', line 1253 def to_jsii result = {} result.merge!({ "zeroCapacityStrategy" => @zero_capacity_strategy, "scaleInAfterInactivityMinutes" => @scale_in_after_inactivity_minutes, }) result.compact end |