Class: AWSCDK::EMR::CfnCluster::InstanceTypeConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnCluster::InstanceTypeConfigProperty
- Defined in:
- emr/cfn_cluster.rb
Overview
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
InstanceTypeConfig is a sub-property of InstanceFleetConfig . InstanceTypeConfig determines the EC2 instances that 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 Amazon 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, for each Amazon EC2 Spot Instance as defined by
InstanceType. -
#configurations ⇒ AWSCDK::IResolvable, ...
readonly
A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.
-
#custom_ami_id ⇒ String?
readonly
The custom AMI ID to use for the instance type.
-
#ebs_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by
InstanceType. -
#instance_type ⇒ String
readonly
An Amazon EC2 instance type, such as
m3.xlarge. -
#priority ⇒ Numeric?
readonly
The priority at which Amazon EMR launches the Amazon EC2 instances 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
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, custom_ami_id: 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, custom_ami_id: nil, ebs_configuration: nil, priority: nil, weighted_capacity: nil) ⇒ InstanceTypeConfigProperty
Returns a new instance of InstanceTypeConfigProperty.
1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 |
# File 'emr/cfn_cluster.rb', line 1821 def initialize(instance_type:, bid_price: nil, bid_price_as_percentage_of_on_demand_price: nil, configurations: nil, custom_ami_id: 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 Jsii::Type.check_type(@configurations, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZW1yLkNmbkNsdXN0ZXIuQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "configurations") unless @configurations.nil? @custom_ami_id = custom_ami_id Jsii::Type.check_type(@custom_ami_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customAmiId") unless @custom_ami_id.nil? @ebs_configuration = ebs_configuration.is_a?(Hash) ? ::AWSCDK::EMR::CfnCluster::EbsConfigurationProperty.new(**ebs_configuration.transform_keys(&:to_sym)) : ebs_configuration Jsii::Type.check_type(@ebs_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbXIuQ2ZuQ2x1c3Rlci5FYnNDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "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)
The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType .
Expressed in USD. If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.
1851 1852 1853 |
# File 'emr/cfn_cluster.rb', line 1851 def bid_price @bid_price end |
#bid_price_as_percentage_of_on_demand_price ⇒ Numeric? (readonly)
The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by InstanceType .
Expressed as a number (for example, 20 specifies 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.
1858 1859 1860 |
# File 'emr/cfn_cluster.rb', line 1858 def bid_price_as_percentage_of_on_demand_price @bid_price_as_percentage_of_on_demand_price end |
#configurations ⇒ AWSCDK::IResolvable, ... (readonly)
A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.
1863 1864 1865 |
# File 'emr/cfn_cluster.rb', line 1863 def configurations @configurations end |
#custom_ami_id ⇒ String? (readonly)
The custom AMI ID to use for the instance type.
1868 1869 1870 |
# File 'emr/cfn_cluster.rb', line 1868 def custom_ami_id @custom_ami_id end |
#ebs_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by InstanceType .
1873 1874 1875 |
# File 'emr/cfn_cluster.rb', line 1873 def ebs_configuration @ebs_configuration end |
#instance_type ⇒ String (readonly)
An Amazon EC2 instance type, such as m3.xlarge .
1844 1845 1846 |
# File 'emr/cfn_cluster.rb', line 1844 def instance_type @instance_type end |
#priority ⇒ Numeric? (readonly)
The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type.
Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.
1880 1881 1882 |
# File 'emr/cfn_cluster.rb', line 1880 def priority @priority end |
#weighted_capacity ⇒ Numeric? (readonly)
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig .
This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified.
1887 1888 1889 |
# File 'emr/cfn_cluster.rb', line 1887 def weighted_capacity @weighted_capacity end |
Class Method Details
.jsii_properties ⇒ Object
1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 |
# File 'emr/cfn_cluster.rb', line 1889 def self.jsii_properties { :instance_type => "instanceType", :bid_price => "bidPrice", :bid_price_as_percentage_of_on_demand_price => "bidPriceAsPercentageOfOnDemandPrice", :configurations => "configurations", :custom_ami_id => "customAmiId", :ebs_configuration => "ebsConfiguration", :priority => "priority", :weighted_capacity => "weightedCapacity", } end |
Instance Method Details
#to_jsii ⇒ Object
1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 |
# File 'emr/cfn_cluster.rb', line 1902 def to_jsii result = {} result.merge!({ "instanceType" => @instance_type, "bidPrice" => @bid_price, "bidPriceAsPercentageOfOnDemandPrice" => @bid_price_as_percentage_of_on_demand_price, "configurations" => @configurations, "customAmiId" => @custom_ami_id, "ebsConfiguration" => @ebs_configuration, "priority" => @priority, "weightedCapacity" => @weighted_capacity, }) result.compact end |