Class: AWSCDK::EMR::CfnCluster::OnDemandCapacityReservationOptionsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnCluster::OnDemandCapacityReservationOptionsProperty
- Defined in:
- emr/cfn_cluster.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.
2396 2397 2398 2399 2400 2401 2402 2403 |
# File 'emr/cfn_cluster.rb', line 2396 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.
2412 2413 2414 |
# File 'emr/cfn_cluster.rb', line 2412 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.
2417 2418 2419 |
# File 'emr/cfn_cluster.rb', line 2417 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.
2426 2427 2428 |
# File 'emr/cfn_cluster.rb', line 2426 def usage_strategy @usage_strategy end |
Class Method Details
.jsii_properties ⇒ Object
2428 2429 2430 2431 2432 2433 2434 |
# File 'emr/cfn_cluster.rb', line 2428 def self.jsii_properties { :capacity_reservation_preference => "capacityReservationPreference", :capacity_reservation_resource_group_arn => "capacityReservationResourceGroupArn", :usage_strategy => "usageStrategy", } end |
Instance Method Details
#to_jsii ⇒ Object
2436 2437 2438 2439 2440 2441 2442 2443 2444 |
# File 'emr/cfn_cluster.rb', line 2436 def to_jsii result = {} result.merge!({ "capacityReservationPreference" => @capacity_reservation_preference, "capacityReservationResourceGroupArn" => @capacity_reservation_resource_group_arn, "usageStrategy" => @usage_strategy, }) result.compact end |