Class: AWSCDK::EMR::CfnInstanceFleetConfig::OnDemandCapacityReservationOptionsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnInstanceFleetConfig::OnDemandCapacityReservationOptionsProperty
- Defined in:
- emr/cfn_instance_fleet_config.rb
Overview
Describes the strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.
Instance Attribute Summary collapse
-
#capacity_reservation_preference ⇒ String?
readonly
Indicates the instance's Capacity Reservation preferences.
-
#capacity_reservation_resource_group_arn ⇒ String?
readonly
The ARN of the Capacity Reservation resource group in which to run the instance.
-
#usage_strategy ⇒ String?
readonly
Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(capacity_reservation_preference: nil, capacity_reservation_resource_group_arn: nil, usage_strategy: nil) ⇒ OnDemandCapacityReservationOptionsProperty
constructor
A new instance of OnDemandCapacityReservationOptionsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(capacity_reservation_preference: nil, capacity_reservation_resource_group_arn: nil, usage_strategy: nil) ⇒ OnDemandCapacityReservationOptionsProperty
Returns a new instance of OnDemandCapacityReservationOptionsProperty.
951 952 953 954 955 956 957 958 |
# File 'emr/cfn_instance_fleet_config.rb', line 951 def initialize(capacity_reservation_preference: nil, capacity_reservation_resource_group_arn: nil, usage_strategy: nil) @capacity_reservation_preference = capacity_reservation_preference Jsii::Type.check_type(@capacity_reservation_preference, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "capacityReservationPreference") unless @capacity_reservation_preference.nil? @capacity_reservation_resource_group_arn = capacity_reservation_resource_group_arn Jsii::Type.check_type(@capacity_reservation_resource_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "capacityReservationResourceGroupArn") unless @capacity_reservation_resource_group_arn.nil? @usage_strategy = usage_strategy Jsii::Type.check_type(@usage_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "usageStrategy") unless @usage_strategy.nil? end |
Instance Attribute Details
#capacity_reservation_preference ⇒ String? (readonly)
Indicates the instance's Capacity Reservation preferences. Possible preferences include:.
open- The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).none- The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.
967 968 969 |
# File 'emr/cfn_instance_fleet_config.rb', line 967 def capacity_reservation_preference @capacity_reservation_preference end |
#capacity_reservation_resource_group_arn ⇒ String? (readonly)
The ARN of the Capacity Reservation resource group in which to run the instance.
972 973 974 |
# File 'emr/cfn_instance_fleet_config.rb', line 972 def capacity_reservation_resource_group_arn @capacity_reservation_resource_group_arn end |
#usage_strategy ⇒ String? (readonly)
Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.
If you specify use-capacity-reservations-first , the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy ( lowest-price ) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy ( lowest-price ).
If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand allocation strategy.
981 982 983 |
# File 'emr/cfn_instance_fleet_config.rb', line 981 def usage_strategy @usage_strategy end |
Class Method Details
.jsii_properties ⇒ Object
983 984 985 986 987 988 989 |
# File 'emr/cfn_instance_fleet_config.rb', line 983 def self.jsii_properties { :capacity_reservation_preference => "capacityReservationPreference", :capacity_reservation_resource_group_arn => "capacityReservationResourceGroupArn", :usage_strategy => "usageStrategy", } end |
Instance Method Details
#to_jsii ⇒ Object
991 992 993 994 995 996 997 998 999 |
# File 'emr/cfn_instance_fleet_config.rb', line 991 def to_jsii result = {} result.merge!({ "capacityReservationPreference" => @capacity_reservation_preference, "capacityReservationResourceGroupArn" => @capacity_reservation_resource_group_arn, "usageStrategy" => @usage_strategy, }) result.compact end |