Class: AWSCDK::EMR::CfnCluster::OnDemandProvisioningSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
emr/cfn_cluster.rb

Overview

The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.

The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allocation_strategy:, capacity_reservation_options: nil) ⇒ OnDemandProvisioningSpecificationProperty

Returns a new instance of OnDemandProvisioningSpecificationProperty.

Parameters:



2457
2458
2459
2460
2461
2462
# File 'emr/cfn_cluster.rb', line 2457

def initialize(allocation_strategy:, capacity_reservation_options: nil)
  @allocation_strategy = allocation_strategy
  Jsii::Type.check_type(@allocation_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allocationStrategy")
  @capacity_reservation_options = capacity_reservation_options.is_a?(Hash) ? ::AWSCDK::EMR::CfnCluster::OnDemandCapacityReservationOptionsProperty.new(**capacity_reservation_options.transform_keys(&:to_sym)) : capacity_reservation_options
  Jsii::Type.check_type(@capacity_reservation_options, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbXIuQ2ZuQ2x1c3Rlci5PbkRlbWFuZENhcGFjaXR5UmVzZXJ2YXRpb25PcHRpb25zUHJvcGVydHkifV19fQ==")), "capacityReservationOptions") unless @capacity_reservation_options.nil?
end

Instance Attribute Details

#allocation_strategyString (readonly)

Specifies the strategy to use in launching On-Demand instance fleets.

Available options are lowest-price and prioritized . lowest-price specifies to launch the instances with the lowest price first, and prioritized specifies that Amazon EMR should launch the instances with the highest priority first. The default is lowest-price .



2470
2471
2472
# File 'emr/cfn_cluster.rb', line 2470

def allocation_strategy
  @allocation_strategy
end

#capacity_reservation_optionsAWSCDK::IResolvable, ... (readonly)

The launch specification for On-Demand instances in the instance fleet, which determines the allocation strategy.



2475
2476
2477
# File 'emr/cfn_cluster.rb', line 2475

def capacity_reservation_options
  @capacity_reservation_options
end

Class Method Details

.jsii_propertiesObject



2477
2478
2479
2480
2481
2482
# File 'emr/cfn_cluster.rb', line 2477

def self.jsii_properties
  {
    :allocation_strategy => "allocationStrategy",
    :capacity_reservation_options => "capacityReservationOptions",
  }
end

Instance Method Details

#to_jsiiObject



2484
2485
2486
2487
2488
2489
2490
2491
# File 'emr/cfn_cluster.rb', line 2484

def to_jsii
  result = {}
  result.merge!({
    "allocationStrategy" => @allocation_strategy,
    "capacityReservationOptions" => @capacity_reservation_options,
  })
  result.compact
end