Class: AWSCDK::GameLift::CfnFleet::LocationCapacityProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GameLift::CfnFleet::LocationCapacityProperty
- Defined in:
- game_lift/cfn_fleet.rb
Overview
Current resource capacity settings for managed EC2 fleets and managed container fleets.
For multi-location fleets, location values might refer to a fleet's remote location or its home Region.
Returned by: DescribeFleetCapacity , DescribeFleetLocationCapacity , UpdateFleetCapacity
Instance Attribute Summary collapse
-
#desired_ec2_instances ⇒ Numeric?
readonly
The number of Amazon EC2 instances you want to maintain in the specified fleet location.
-
#managed_capacity_configuration ⇒ AWSCDK::IResolvable, ...
readonly
Configuration options for Amazon GameLift Servers-managed capacity behavior.
-
#max_size ⇒ Numeric
readonly
The maximum number of instances that are allowed in the specified fleet location.
-
#min_size ⇒ Numeric?
readonly
The minimum number of instances that are allowed in the specified fleet location.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_size:, desired_ec2_instances: nil, managed_capacity_configuration: nil, min_size: nil) ⇒ LocationCapacityProperty
constructor
A new instance of LocationCapacityProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_size:, desired_ec2_instances: nil, managed_capacity_configuration: nil, min_size: nil) ⇒ LocationCapacityProperty
Returns a new instance of LocationCapacityProperty.
1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 |
# File 'game_lift/cfn_fleet.rb', line 1100 def initialize(max_size:, desired_ec2_instances: nil, managed_capacity_configuration: nil, min_size: nil) @max_size = max_size Jsii::Type.check_type(@max_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxSize") @desired_ec2_instances = desired_ec2_instances Jsii::Type.check_type(@desired_ec2_instances, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "desiredEc2Instances") unless @desired_ec2_instances.nil? @managed_capacity_configuration = managed_capacity_configuration.is_a?(Hash) ? ::AWSCDK::GameLift::CfnFleet::ManagedCapacityConfigurationProperty.new(**managed_capacity_configuration.transform_keys(&:to_sym)) : managed_capacity_configuration Jsii::Type.check_type(@managed_capacity_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nYW1lbGlmdC5DZm5GbGVldC5NYW5hZ2VkQ2FwYWNpdHlDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "managedCapacityConfiguration") unless @managed_capacity_configuration.nil? @min_size = min_size Jsii::Type.check_type(@min_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minSize") unless @min_size.nil? end |
Instance Attribute Details
#desired_ec2_instances ⇒ Numeric? (readonly)
The number of Amazon EC2 instances you want to maintain in the specified fleet location.
This value must fall between the minimum and maximum size limits. Changes in desired instance value can take up to 1 minute to be reflected when viewing the fleet's capacity settings.
1124 1125 1126 |
# File 'game_lift/cfn_fleet.rb', line 1124 def desired_ec2_instances @desired_ec2_instances end |
#managed_capacity_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
Configuration options for Amazon GameLift Servers-managed capacity behavior.
1129 1130 1131 |
# File 'game_lift/cfn_fleet.rb', line 1129 def managed_capacity_configuration @managed_capacity_configuration end |
#max_size ⇒ Numeric (readonly)
The maximum number of instances that are allowed in the specified fleet location.
If this parameter is not set, the default is 1.
1117 1118 1119 |
# File 'game_lift/cfn_fleet.rb', line 1117 def max_size @max_size end |
#min_size ⇒ Numeric? (readonly)
The minimum number of instances that are allowed in the specified fleet location.
If this parameter is not set, the default is 0.
1136 1137 1138 |
# File 'game_lift/cfn_fleet.rb', line 1136 def min_size @min_size end |
Class Method Details
.jsii_properties ⇒ Object
1138 1139 1140 1141 1142 1143 1144 1145 |
# File 'game_lift/cfn_fleet.rb', line 1138 def self.jsii_properties { :max_size => "maxSize", :desired_ec2_instances => "desiredEc2Instances", :managed_capacity_configuration => "managedCapacityConfiguration", :min_size => "minSize", } end |
Instance Method Details
#to_jsii ⇒ Object
1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 |
# File 'game_lift/cfn_fleet.rb', line 1147 def to_jsii result = {} result.merge!({ "maxSize" => @max_size, "desiredEc2Instances" => @desired_ec2_instances, "managedCapacityConfiguration" => @managed_capacity_configuration, "minSize" => @min_size, }) result.compact end |