Class: AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceTypeConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceTypeConfigProperty
- 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
-
#bid_price ⇒ String?
readonly
The bid price for each EC2 Spot instance type as defined by InstanceType.
-
#bid_price_as_percentage_of_on_demand_price ⇒ Numeric?
readonly
The bid price, as a percentage of On-Demand price.
-
#configurations ⇒ Array<AWSCDK::StepFunctionsTasks::EMRCreateCluster::ConfigurationProperty>?
readonly
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?
readonly
The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType.
-
#instance_type ⇒ String
readonly
An EC2 instance type.
-
#priority ⇒ Numeric?
readonly
The priority at which Amazon EMR launches the EC2 instance with this instance type.
-
#weighted_capacity ⇒ Numeric?
readonly
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in the InstanceFleetConfig.
Class Method Summary collapse
Instance Method Summary collapse
-
#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
constructor
A new instance of InstanceTypeConfigProperty.
- #to_jsii ⇒ Object
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.
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_price ⇒ String? (readonly)
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.
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_price ⇒ Numeric? (readonly)
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.
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 |
#configurations ⇒ Array<AWSCDK::StepFunctionsTasks::EMRCreateCluster::ConfigurationProperty>? (readonly)
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_configuration ⇒ AWSCDK::StepFunctionsTasks::EMRCreateCluster::EbsConfigurationProperty? (readonly)
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_type ⇒ String (readonly)
An EC2 instance type.
1674 1675 1676 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1674 def instance_type @instance_type end |
#priority ⇒ Numeric? (readonly)
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_capacity ⇒ Numeric? (readonly)
Default: - None
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in the InstanceFleetConfig.
1711 1712 1713 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1711 def weighted_capacity @weighted_capacity end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |