Class: AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceFleetConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceFleetConfigProperty
- Defined in:
- step_functions_tasks/emr_create_cluster.rb
Overview
The configuration that defines an instance fleet.
Instance Attribute Summary collapse
-
#instance_fleet_type ⇒ AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceRoleType
readonly
The node type that the instance fleet hosts.
-
#instance_type_configs ⇒ Array<AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceTypeConfigProperty>?
readonly
The instance type configurations that define the EC2 instances in the instance fleet.
-
#launch_specifications ⇒ AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceFleetProvisioningSpecificationsProperty?
readonly
The launch specification for the instance fleet.
-
#name ⇒ String?
readonly
The friendly name of 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(instance_fleet_type:, instance_type_configs: nil, launch_specifications: nil, name: nil, target_on_demand_capacity: nil, target_spot_capacity: nil) ⇒ InstanceFleetConfigProperty
constructor
A new instance of InstanceFleetConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(instance_fleet_type:, instance_type_configs: nil, launch_specifications: nil, name: nil, target_on_demand_capacity: nil, target_spot_capacity: nil) ⇒ InstanceFleetConfigProperty
Returns a new instance of InstanceFleetConfigProperty.
1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1363 def initialize(instance_fleet_type:, instance_type_configs: nil, launch_specifications: nil, name: nil, target_on_demand_capacity: nil, target_spot_capacity: nil) @instance_fleet_type = instance_fleet_type Jsii::Type.check_type(@instance_fleet_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5FbXJDcmVhdGVDbHVzdGVyLkluc3RhbmNlUm9sZVR5cGUifQ==")), "instanceFleetType") @instance_type_configs = instance_type_configs.is_a?(Array) ? instance_type_configs.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceTypeConfigProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : instance_type_configs Jsii::Type.check_type(@instance_type_configs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zdGVwZnVuY3Rpb25zX3Rhc2tzLkVtckNyZWF0ZUNsdXN0ZXIuSW5zdGFuY2VUeXBlQ29uZmlnUHJvcGVydHkifSwia2luZCI6ImFycmF5In19")), "instanceTypeConfigs") unless @instance_type_configs.nil? @launch_specifications = launch_specifications.is_a?(Hash) ? ::AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceFleetProvisioningSpecificationsProperty.new(**launch_specifications.transform_keys(&:to_sym)) : launch_specifications Jsii::Type.check_type(@launch_specifications, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5FbXJDcmVhdGVDbHVzdGVyLkluc3RhbmNlRmxlZXRQcm92aXNpb25pbmdTcGVjaWZpY2F0aW9uc1Byb3BlcnR5In0=")), "launchSpecifications") unless @launch_specifications.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.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
#instance_fleet_type ⇒ AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceRoleType (readonly)
The node type that the instance fleet hosts.
Valid values are MASTER,CORE,and TASK.
1383 1384 1385 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1383 def instance_fleet_type @instance_fleet_type end |
#instance_type_configs ⇒ Array<AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceTypeConfigProperty>? (readonly)
Default: No instanceTpeConfigs
The instance type configurations that define the EC2 instances in the instance fleet.
1388 1389 1390 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1388 def instance_type_configs @instance_type_configs end |
#launch_specifications ⇒ AWSCDK::StepFunctionsTasks::EMRCreateCluster::InstanceFleetProvisioningSpecificationsProperty? (readonly)
Default: No launchSpecifications
The launch specification for the instance fleet.
1393 1394 1395 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1393 def launch_specifications @launch_specifications end |
#name ⇒ String? (readonly)
Default: No name
The friendly name of the instance fleet.
1398 1399 1400 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1398 def name @name end |
#target_on_demand_capacity ⇒ Numeric? (readonly)
Default: No targetOnDemandCapacity
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using target_spot_capacity.
At least one of target_spot_capacity and target_on_demand_capacity should be greater than 0.
For a master instance fleet, only one of target_spot_capacity and target_on_demand_capacity can be specified, and its value
must be 1.
1409 1410 1411 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1409 def target_on_demand_capacity @target_on_demand_capacity end |
#target_spot_capacity ⇒ Numeric? (readonly)
Default: No targetSpotCapacity
The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet using target_on_demand_capacity.
At least one of target_spot_capacity and target_on_demand_capacity should be greater than 0.
For a master instance fleet, only one of target_spot_capacity and target_on_demand_capacity can be specified, and its value
must be 1.
1420 1421 1422 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1420 def target_spot_capacity @target_spot_capacity end |
Class Method Details
.jsii_properties ⇒ Object
1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1422 def self.jsii_properties { :instance_fleet_type => "instanceFleetType", :instance_type_configs => "instanceTypeConfigs", :launch_specifications => "launchSpecifications", :name => "name", :target_on_demand_capacity => "targetOnDemandCapacity", :target_spot_capacity => "targetSpotCapacity", } end |
Instance Method Details
#to_jsii ⇒ Object
1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 |
# File 'step_functions_tasks/emr_create_cluster.rb', line 1433 def to_jsii result = {} result.merge!({ "instanceFleetType" => @instance_fleet_type, "instanceTypeConfigs" => @instance_type_configs, "launchSpecifications" => @launch_specifications, "name" => @name, "targetOnDemandCapacity" => @target_on_demand_capacity, "targetSpotCapacity" => @target_spot_capacity, }) result.compact end |