Class CfnInstanceFleetConfig
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::EMR::InstanceFleetConfig
.
Use InstanceFleetConfig
to define instance fleets for an EMR cluster. A cluster can not use both instance fleets and instance groups. For more information, see Configure Instance Fleets in the Amazon EMR Management Guide .
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. > You can currently only add a task instance fleet to a cluster with this resource. If you use this resource, CloudFormation waits for the cluster launch to complete before adding the task instance fleet to the cluster. In order to add a task instance fleet to the cluster as part of the cluster launch and minimize delays in provisioning task nodes, use the
TaskInstanceFleets
subproperty for the AWS::EMR::Cluster JobFlowInstancesConfig property instead. To use this subproperty, see AWS::EMR::Cluster for examples.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.emr.*; ConfigurationProperty configurationProperty_; CfnInstanceFleetConfig cfnInstanceFleetConfig = CfnInstanceFleetConfig.Builder.create(this, "MyCfnInstanceFleetConfig") .clusterId("clusterId") .instanceFleetType("instanceFleetType") // the properties below are optional .instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder() .instanceType("instanceType") // the properties below are optional .bidPrice("bidPrice") .bidPriceAsPercentageOfOnDemandPrice(123) .configurations(List.of(ConfigurationProperty.builder() .classification("classification") .configurationProperties(Map.of( "configurationPropertiesKey", "configurationProperties")) .configurations(List.of(configurationProperty_)) .build())) .customAmiId("customAmiId") .ebsConfiguration(EbsConfigurationProperty.builder() .ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder() .volumeSpecification(VolumeSpecificationProperty.builder() .sizeInGb(123) .volumeType("volumeType") // the properties below are optional .iops(123) .build()) // the properties below are optional .volumesPerInstance(123) .build())) .ebsOptimized(false) .build()) .weightedCapacity(123) .build())) .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder() .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder() .allocationStrategy("allocationStrategy") .build()) .spotSpecification(SpotProvisioningSpecificationProperty.builder() .timeoutAction("timeoutAction") .timeoutDurationMinutes(123) // the properties below are optional .allocationStrategy("allocationStrategy") .blockDurationMinutes(123) .build()) .build()) .name("name") .targetOnDemandCapacity(123) .targetSpotCapacity(123) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnInstanceFleetConfig
.static interface
static interface
EbsBlockDeviceConfig
is a subproperty of theEbsConfiguration
property type.static interface
EbsConfiguration
determines the EBS volumes to attach to EMR cluster instances.static interface
static interface
InstanceType
config is a subproperty ofInstanceFleetConfig
.static interface
The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.static interface
SpotProvisioningSpecification
is a subproperty of theInstanceFleetProvisioningSpecifications
property type.static interface
VolumeSpecification
is a subproperty of theEbsBlockDeviceConfig
property type.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnInstanceFleetConfig
(Construct scope, String id, CfnInstanceFleetConfigProps props) Create a newAWS::EMR::InstanceFleetConfig
.protected
CfnInstanceFleetConfig
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnInstanceFleetConfig
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe unique identifier of the EMR cluster.The node type that the instance fleet hosts.InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.The launch specification for the instance fleet.getName()
The friendly name of the instance fleet.The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setClusterId
(String value) The unique identifier of the EMR cluster.void
setInstanceFleetType
(String value) The node type that the instance fleet hosts.void
setInstanceTypeConfigs
(List<Object> value) InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.void
InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.void
The launch specification for the instance fleet.void
setLaunchSpecifications
(CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty value) The launch specification for the instance fleet.void
The friendly name of the instance fleet.void
setTargetOnDemandCapacity
(Number value) The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.void
setTargetSpotCapacity
(Number value) The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnInstanceFleetConfig
protected CfnInstanceFleetConfig(software.amazon.jsii.JsiiObjectRef objRef) -
CfnInstanceFleetConfig
protected CfnInstanceFleetConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnInstanceFleetConfig
@Stability(Stable) public CfnInstanceFleetConfig(@NotNull Construct scope, @NotNull String id, @NotNull CfnInstanceFleetConfigProps props) Create a newAWS::EMR::InstanceFleetConfig
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getClusterId
The unique identifier of the EMR cluster. -
setClusterId
The unique identifier of the EMR cluster. -
getInstanceFleetType
The node type that the instance fleet hosts.Allowed Values : TASK
-
setInstanceFleetType
The node type that the instance fleet hosts.Allowed Values : TASK
-
getInstanceTypeConfigs
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.
-
setInstanceTypeConfigs
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.
-
setInstanceTypeConfigs
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.
-
getLaunchSpecifications
The launch specification for the instance fleet. -
setLaunchSpecifications
The launch specification for the instance fleet. -
setLaunchSpecifications
@Stability(Stable) public void setLaunchSpecifications(@Nullable CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty value) The launch specification for the instance fleet. -
getName
The friendly name of the instance fleet. -
setName
The friendly name of the instance fleet. -
getTargetOnDemandCapacity
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 specifiedWeightedCapacity
. When an On-Demand instance is provisioned, theWeightedCapacity
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 aWeightedCapacity
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 ofTargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1. -
setTargetOnDemandCapacity
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 specifiedWeightedCapacity
. When an On-Demand instance is provisioned, theWeightedCapacity
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 aWeightedCapacity
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 ofTargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1. -
getTargetSpotCapacity
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 specifiedWeightedCapacity
. When a Spot instance is provisioned, theWeightedCapacity
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 aWeightedCapacity
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
TargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1. -
setTargetSpotCapacity
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 specifiedWeightedCapacity
. When a Spot instance is provisioned, theWeightedCapacity
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 aWeightedCapacity
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
TargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1.
-