Class: AWSCDK::PCS::CfnComputeNodeGroup::SpotOptionsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pcs/cfn_compute_node_group.rb

Overview

Additional configuration when you specify SPOT as the purchaseOption for the CreateComputeNodeGroup API action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allocation_strategy: nil) ⇒ SpotOptionsProperty

Returns a new instance of SpotOptionsProperty.

Parameters:

  • allocation_strategy (String, nil) (defaults to: nil)

    The Amazon EC2 allocation strategy AWS PCS uses to provision EC2 instances.



945
946
947
948
# File 'pcs/cfn_compute_node_group.rb', line 945

def initialize(allocation_strategy: nil)
  @allocation_strategy = allocation_strategy
  Jsii::Type.check_type(@allocation_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allocationStrategy") unless @allocation_strategy.nil?
end

Instance Attribute Details

#allocation_strategyString? (readonly)

The Amazon EC2 allocation strategy AWS PCS uses to provision EC2 instances.

AWS PCS supports lowest price , capacity optimized , and price capacity optimized . For more information, see Use allocation strategies to determine how EC2 Fleet or Spot Fleet fulfills Spot and On-Demand capacity in the Amazon Elastic Compute Cloud User Guide . If you don't provide this option, it defaults to price capacity optimized .



956
957
958
# File 'pcs/cfn_compute_node_group.rb', line 956

def allocation_strategy
  @allocation_strategy
end

Class Method Details

.jsii_propertiesObject



958
959
960
961
962
# File 'pcs/cfn_compute_node_group.rb', line 958

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

Instance Method Details

#to_jsiiObject



964
965
966
967
968
969
970
# File 'pcs/cfn_compute_node_group.rb', line 964

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