Class: AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceTypeConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
step_functions_tasks/emr_create_cluster.rb

Overview

An instance type configuration for each instance type in an instance fleet, which determines the EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance_type:, bid_price: nil, bid_price_as_percentage_of_on_demand_price: nil, configurations: nil, ebs_configuration: nil, priority: nil, weighted_capacity: nil) ⇒ InstanceTypeConfigProperty

Returns a new instance of InstanceTypeConfigProperty.

Parameters:

  • instance_type (String)

    An EC2 instance type.

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

    The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD.

  • bid_price_as_percentage_of_on_demand_price (Numeric, nil) (defaults to: nil)

    The bid price, as a percentage of On-Demand price.

  • configurations (Array<AWSCDK::StepFunctionsTasks::EMRCreateCluster::ConfigurationProperty>, nil) (defaults to: nil)

    A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.

  • ebs_configuration (AWSCDK::StepFunctionsTasks::EMRCreateCluster::EbsConfigurationProperty, nil) (defaults to: nil)

    The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType.

  • priority (Numeric, nil) (defaults to: nil)

    The priority at which Amazon EMR launches the EC2 instance with this instance type.

  • weighted_capacity (Numeric, nil) (defaults to: nil)

    The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in the InstanceFleetConfig.



1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
# File 'step_functions_tasks/emr_create_cluster.rb', line 1654

def initialize(instance_type:, bid_price: nil, bid_price_as_percentage_of_on_demand_price: nil, configurations: nil, ebs_configuration: nil, priority: nil, weighted_capacity: nil)
  @instance_type = instance_type
  Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType")
  @bid_price = bid_price
  Jsii::Type.check_type(@bid_price, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bidPrice") unless @bid_price.nil?
  @bid_price_as_percentage_of_on_demand_price = bid_price_as_percentage_of_on_demand_price
  Jsii::Type.check_type(@bid_price_as_percentage_of_on_demand_price, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "bidPriceAsPercentageOfOnDemandPrice") unless @bid_price_as_percentage_of_on_demand_price.nil?
  @configurations = configurations.is_a?(Array) ? configurations.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::StepFunctionsTasks::EMRCreateCluster::ConfigurationProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : configurations
  Jsii::Type.check_type(@configurations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zdGVwZnVuY3Rpb25zX3Rhc2tzLkVtckNyZWF0ZUNsdXN0ZXIuQ29uZmlndXJhdGlvblByb3BlcnR5In0sImtpbmQiOiJhcnJheSJ9fQ==")), "configurations") unless @configurations.nil?
  @ebs_configuration = ebs_configuration.is_a?(Hash) ? ::AWSCDK::StepFunctionsTasks::EMRCreateCluster::EbsConfigurationProperty.new(**ebs_configuration.transform_keys(&:to_sym)) : ebs_configuration
  Jsii::Type.check_type(@ebs_configuration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5FbXJDcmVhdGVDbHVzdGVyLkVic0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9")), "ebsConfiguration") unless @ebs_configuration.nil?
  @priority = priority
  Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil?
  @weighted_capacity = weighted_capacity
  Jsii::Type.check_type(@weighted_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weightedCapacity") unless @weighted_capacity.nil?
end

Instance Attribute Details

#bid_priceString? (readonly)

Note:

Default: - None

The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD.

Cannot specify both bid_price and bid_price_as_percentage_of_on_demand_price.

Returns:

  • (String, nil)


1681
1682
1683
# File 'step_functions_tasks/emr_create_cluster.rb', line 1681

def bid_price
  @bid_price
end

#bid_price_as_percentage_of_on_demand_priceNumeric? (readonly)

Note:

Default: - None

The bid price, as a percentage of On-Demand price.

Cannot specify both bid_price and bid_price_as_percentage_of_on_demand_price.

Returns:

  • (Numeric, nil)


1688
1689
1690
# File 'step_functions_tasks/emr_create_cluster.rb', line 1688

def bid_price_as_percentage_of_on_demand_price
  @bid_price_as_percentage_of_on_demand_price
end

#configurationsArray<AWSCDK::StepFunctionsTasks::EMRCreateCluster::ConfigurationProperty>? (readonly)

Note:

Default: - None

A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.



1693
1694
1695
# File 'step_functions_tasks/emr_create_cluster.rb', line 1693

def configurations
  @configurations
end

#ebs_configurationAWSCDK::StepFunctionsTasks::EMRCreateCluster::EbsConfigurationProperty? (readonly)

Note:

Default: - None

The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType.



1698
1699
1700
# File 'step_functions_tasks/emr_create_cluster.rb', line 1698

def ebs_configuration
  @ebs_configuration
end

#instance_typeString (readonly)

An EC2 instance type.

Returns:

  • (String)


1674
1675
1676
# File 'step_functions_tasks/emr_create_cluster.rb', line 1674

def instance_type
  @instance_type
end

#priorityNumeric? (readonly)

Note:

Default: - No priority is assigned

The priority at which Amazon EMR launches the EC2 instance with this instance type.

Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.



1706
1707
1708
# File 'step_functions_tasks/emr_create_cluster.rb', line 1706

def priority
  @priority
end

#weighted_capacityNumeric? (readonly)

Note:

Default: - None

The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in the InstanceFleetConfig.

Returns:

  • (Numeric, nil)


1711
1712
1713
# File 'step_functions_tasks/emr_create_cluster.rb', line 1711

def weighted_capacity
  @weighted_capacity
end

Class Method Details

.jsii_propertiesObject



1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
# File 'step_functions_tasks/emr_create_cluster.rb', line 1713

def self.jsii_properties
  {
    :instance_type => "instanceType",
    :bid_price => "bidPrice",
    :bid_price_as_percentage_of_on_demand_price => "bidPriceAsPercentageOfOnDemandPrice",
    :configurations => "configurations",
    :ebs_configuration => "ebsConfiguration",
    :priority => "priority",
    :weighted_capacity => "weightedCapacity",
  }
end

Instance Method Details

#to_jsiiObject



1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
# File 'step_functions_tasks/emr_create_cluster.rb', line 1725

def to_jsii
  result = {}
  result.merge!({
    "instanceType" => @instance_type,
    "bidPrice" => @bid_price,
    "bidPriceAsPercentageOfOnDemandPrice" => @bid_price_as_percentage_of_on_demand_price,
    "configurations" => @configurations,
    "ebsConfiguration" => @ebs_configuration,
    "priority" => @priority,
    "weightedCapacity" => @weighted_capacity,
  })
  result.compact
end