Class CfnInstanceFleetConfig
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
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) .throughput(123) .build()) // the properties below are optional .volumesPerInstance(123) .build())) .ebsOptimized(false) .build()) .priority(123) .weightedCapacity(123) .build())) .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder() .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder() .allocationStrategy("allocationStrategy") // the properties below are optional .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder() .capacityReservationPreference("capacityReservationPreference") .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn") .usageStrategy("usageStrategy") .build()) .build()) .spotSpecification(SpotProvisioningSpecificationProperty.builder() .timeoutAction("timeoutAction") .timeoutDurationMinutes(123) // the properties below are optional .allocationStrategy("allocationStrategy") .blockDurationMinutes(123) .build()) .build()) .name("name") .resizeSpecifications(InstanceFleetResizingSpecificationsProperty.builder() .onDemandResizeSpecification(OnDemandResizingSpecificationProperty.builder() .allocationStrategy("allocationStrategy") .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder() .capacityReservationPreference("capacityReservationPreference") .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn") .usageStrategy("usageStrategy") .build()) .timeoutDurationMinutes(123) .build()) .spotResizeSpecification(SpotResizingSpecificationProperty.builder() .allocationStrategy("allocationStrategy") .timeoutDurationMinutes(123) .build()) .build()) .targetOnDemandCapacity(123) .targetSpotCapacity(123) .build();
- See Also:
-
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
The resize specification for On-Demand and Spot Instances in the fleet.static interface
InstanceType
config is a subproperty ofInstanceFleetConfig
.static interface
Describes the strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.static interface
The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.static interface
The resize specification for On-Demand Instances in the instance fleet, which contains the resize timeout period.static interface
SpotProvisioningSpecification
is a subproperty of theInstanceFleetProvisioningSpecifications
property type.static interface
The resize specification for Spot Instances in the instance fleet, which contains the resize timeout period.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.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.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
ModifierConstructorDescriptionprotected
CfnInstanceFleetConfig
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnInstanceFleetConfig
(software.amazon.jsii.JsiiObjectRef objRef) CfnInstanceFleetConfig
(software.constructs.Construct scope, String id, CfnInstanceFleetConfigProps props) -
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 resize specification for 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
The resize specification for the instance fleet.void
The resize specification for 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.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnInstanceFleetConfigProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
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. -
setInstanceFleetType
The node type that the instance fleet hosts. -
getInstanceTypeConfigs
InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. -
setInstanceTypeConfigs
InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. -
setInstanceTypeConfigs
InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. -
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. -
getResizeSpecifications
The resize specification for the instance fleet. -
setResizeSpecifications
The resize specification for the instance fleet. -
setResizeSpecifications
@Stability(Stable) public void setResizeSpecifications(@Nullable CfnInstanceFleetConfig.InstanceFleetResizingSpecificationsProperty value) The resize specification for the instance fleet. -
getTargetOnDemandCapacity
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. -
setTargetOnDemandCapacity
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. -
getTargetSpotCapacity
The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. -
setTargetSpotCapacity
The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
-