Class: AWSCDK::EMR::CfnInstanceFleetConfig::InstanceTypeConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnInstanceFleetConfig::InstanceTypeConfigProperty
- Defined in:
- emr/cfn_instance_fleet_config.rb
Overview
InstanceType config is a subproperty of InstanceFleetConfig .
An instance type configuration specifies each instance type in an instance fleet. The configuration determines the EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
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
Amazon EMR releases 4.x or later.
-
#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.
843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 |
# File 'emr/cfn_instance_fleet_config.rb', line 843 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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZW1yLkNmbkluc3RhbmNlRmxlZXRDb25maWcuQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "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::CfnInstanceFleetConfig::EbsConfigurationProperty.new(**ebs_configuration.transform_keys(&:to_sym)) : ebs_configuration Jsii::Type.check_type(@ebs_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbXIuQ2ZuSW5zdGFuY2VGbGVldENvbmZpZy5FYnNDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "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%.
873 874 875 |
# File 'emr/cfn_instance_fleet_config.rb', line 873 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%.
880 881 882 |
# File 'emr/cfn_instance_fleet_config.rb', line 880 def bid_price_as_percentage_of_on_demand_price @bid_price_as_percentage_of_on_demand_price end |
#configurations ⇒ AWSCDK::IResolvable, ... (readonly)
Amazon EMR releases 4.x or later.
An optional configuration specification to be used when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file. For more information, see Configuring Applications .
887 888 889 |
# File 'emr/cfn_instance_fleet_config.rb', line 887 def configurations @configurations end |
#custom_ami_id ⇒ String? (readonly)
The custom AMI ID to use for the instance type.
892 893 894 |
# File 'emr/cfn_instance_fleet_config.rb', line 892 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 .
897 898 899 |
# File 'emr/cfn_instance_fleet_config.rb', line 897 def ebs_configuration @ebs_configuration end |
#instance_type ⇒ String (readonly)
An Amazon EC2 instance type, such as m3.xlarge .
866 867 868 |
# File 'emr/cfn_instance_fleet_config.rb', line 866 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.
904 905 906 |
# File 'emr/cfn_instance_fleet_config.rb', line 904 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.
911 912 913 |
# File 'emr/cfn_instance_fleet_config.rb', line 911 def weighted_capacity @weighted_capacity end |
Class Method Details
.jsii_properties ⇒ Object
913 914 915 916 917 918 919 920 921 922 923 924 |
# File 'emr/cfn_instance_fleet_config.rb', line 913 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
926 927 928 929 930 931 932 933 934 935 936 937 938 939 |
# File 'emr/cfn_instance_fleet_config.rb', line 926 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 |