Class: AWSCDK::EMR::CfnInstanceFleetConfigProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EMR::CfnInstanceFleetConfigProps
- Defined in:
- emr/cfn_instance_fleet_config_props.rb
Overview
Properties for defining a CfnInstanceFleetConfig.
Instance Attribute Summary collapse
-
#cluster_id ⇒ String
readonly
The unique identifier of the EMR cluster.
-
#instance_fleet_type ⇒ String
readonly
The node type that the instance fleet hosts.
-
#instance_type_configs ⇒ AWSCDK::IResolvable, ...
readonly
InstanceTypeConfigsdetermine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. -
#launch_specifications ⇒ AWSCDK::IResolvable, ...
readonly
The launch specification for the instance fleet.
-
#name ⇒ String?
readonly
The friendly name of the instance fleet.
-
#resize_specifications ⇒ AWSCDK::IResolvable, ...
readonly
The resize specification for the instance fleet.
-
#target_on_demand_capacity ⇒ Numeric?
readonly
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
-
#target_spot_capacity ⇒ Numeric?
readonly
The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cluster_id:, instance_fleet_type:, instance_type_configs: nil, launch_specifications: nil, name: nil, resize_specifications: nil, target_on_demand_capacity: nil, target_spot_capacity: nil) ⇒ CfnInstanceFleetConfigProps
constructor
A new instance of CfnInstanceFleetConfigProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cluster_id:, instance_fleet_type:, instance_type_configs: nil, launch_specifications: nil, name: nil, resize_specifications: nil, target_on_demand_capacity: nil, target_spot_capacity: nil) ⇒ CfnInstanceFleetConfigProps
Returns a new instance of CfnInstanceFleetConfigProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 17 def initialize(cluster_id:, instance_fleet_type:, instance_type_configs: nil, launch_specifications: nil, name: nil, resize_specifications: nil, target_on_demand_capacity: nil, target_spot_capacity: nil) @cluster_id = cluster_id Jsii::Type.check_type(@cluster_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterId") @instance_fleet_type = instance_fleet_type Jsii::Type.check_type(@instance_fleet_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceFleetType") @instance_type_configs = instance_type_configs Jsii::Type.check_type(@instance_type_configs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZW1yLkNmbkluc3RhbmNlRmxlZXRDb25maWcuSW5zdGFuY2VUeXBlQ29uZmlnUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "instanceTypeConfigs") unless @instance_type_configs.nil? @launch_specifications = launch_specifications.is_a?(Hash) ? ::AWSCDK::EMR::CfnInstanceFleetConfig::InstanceFleetProvisioningSpecificationsProperty.new(**launch_specifications.transform_keys(&:to_sym)) : launch_specifications Jsii::Type.check_type(@launch_specifications, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbXIuQ2ZuSW5zdGFuY2VGbGVldENvbmZpZy5JbnN0YW5jZUZsZWV0UHJvdmlzaW9uaW5nU3BlY2lmaWNhdGlvbnNQcm9wZXJ0eSJ9XX19")), "launchSpecifications") unless @launch_specifications.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @resize_specifications = resize_specifications.is_a?(Hash) ? ::AWSCDK::EMR::CfnInstanceFleetConfig::InstanceFleetResizingSpecificationsProperty.new(**resize_specifications.transform_keys(&:to_sym)) : resize_specifications Jsii::Type.check_type(@resize_specifications, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lbXIuQ2ZuSW5zdGFuY2VGbGVldENvbmZpZy5JbnN0YW5jZUZsZWV0UmVzaXppbmdTcGVjaWZpY2F0aW9uc1Byb3BlcnR5In1dfX0=")), "resizeSpecifications") unless @resize_specifications.nil? @target_on_demand_capacity = target_on_demand_capacity Jsii::Type.check_type(@target_on_demand_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetOnDemandCapacity") unless @target_on_demand_capacity.nil? @target_spot_capacity = target_spot_capacity Jsii::Type.check_type(@target_spot_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetSpotCapacity") unless @target_spot_capacity.nil? end |
Instance Attribute Details
#cluster_id ⇒ String (readonly)
The unique identifier of the EMR cluster.
40 41 42 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 40 def cluster_id @cluster_id end |
#instance_fleet_type ⇒ String (readonly)
The node type that the instance fleet hosts.
Allowed Values : TASK
47 48 49 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 47 def instance_fleet_type @instance_fleet_type end |
#instance_type_configs ⇒ AWSCDK::IResolvable, ... (readonly)
InstanceTypeConfigs determine the EC2 instances that 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.
54 55 56 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 54 def instance_type_configs @instance_type_configs end |
#launch_specifications ⇒ AWSCDK::IResolvable, ... (readonly)
The launch specification for the instance fleet.
59 60 61 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 59 def launch_specifications @launch_specifications end |
#name ⇒ String? (readonly)
The friendly name of the instance fleet.
64 65 66 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 64 def name @name end |
#resize_specifications ⇒ AWSCDK::IResolvable, ... (readonly)
The resize specification for the instance fleet.
69 70 71 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 69 def resize_specifications @resize_specifications end |
#target_on_demand_capacity ⇒ Numeric? (readonly)
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig . Each instance configuration has a specified WeightedCapacity . When an On-Demand instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.
If not specified or set to 0, only Spot instances are provisioned for the instance fleet using
TargetSpotCapacity. At least one ofTargetSpotCapacityandTargetOnDemandCapacityshould be greater than 0. For a master instance fleet, only one ofTargetSpotCapacityandTargetOnDemandCapacitycan be specified, and its value must be 1.
78 79 80 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 78 def target_on_demand_capacity @target_on_demand_capacity end |
#target_spot_capacity ⇒ Numeric? (readonly)
The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by InstanceTypeConfig . Each instance configuration has a specified WeightedCapacity . When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.
If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of
TargetSpotCapacityandTargetOnDemandCapacityshould be greater than 0. For a master instance fleet, only one ofTargetSpotCapacityandTargetOnDemandCapacitycan be specified, and its value must be 1.
87 88 89 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 87 def target_spot_capacity @target_spot_capacity end |
Class Method Details
.jsii_properties ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 89 def self.jsii_properties { :cluster_id => "clusterId", :instance_fleet_type => "instanceFleetType", :instance_type_configs => "instanceTypeConfigs", :launch_specifications => "launchSpecifications", :name => "name", :resize_specifications => "resizeSpecifications", :target_on_demand_capacity => "targetOnDemandCapacity", :target_spot_capacity => "targetSpotCapacity", } end |
Instance Method Details
#to_jsii ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'emr/cfn_instance_fleet_config_props.rb', line 102 def to_jsii result = {} result.merge!({ "clusterId" => @cluster_id, "instanceFleetType" => @instance_fleet_type, "instanceTypeConfigs" => @instance_type_configs, "launchSpecifications" => @launch_specifications, "name" => @name, "resizeSpecifications" => @resize_specifications, "targetOnDemandCapacity" => @target_on_demand_capacity, "targetSpotCapacity" => @target_spot_capacity, }) result.compact end |