Class CfnInstanceFleetConfig
- All Implemented Interfaces:
IInspectable,IInstanceFleetConfigRef,IEnvironmentAware,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
TaskInstanceFleetssubproperty 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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnInstanceFleetConfig.static interfacestatic interfaceEbsBlockDeviceConfigis a subproperty of theEbsConfigurationproperty type.static interfaceEbsConfigurationdetermines the EBS volumes to attach to EMR cluster instances.static interfacestatic interfaceThe resize specification for On-Demand and Spot Instances in the fleet.static interfaceInstanceTypeconfig is a subproperty ofInstanceFleetConfig.static interfaceDescribes the strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.static interfaceThe launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.static interfaceThe resize specification for On-Demand Instances in the instance fleet, which contains the resize timeout period.static interfaceSpotProvisioningSpecificationis a subproperty of theInstanceFleetProvisioningSpecificationsproperty type.static interfaceThe resize specification for Spot Instances in the instance fleet, which contains the resize timeout period.static interfaceVolumeSpecificationis a subproperty of theEbsBlockDeviceConfigproperty type.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.emr.IInstanceFleetConfigRef
IInstanceFleetConfigRef.Jsii$Default, IInstanceFleetConfigRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnInstanceFleetConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnInstanceFleetConfig(software.amazon.jsii.JsiiObjectRef objRef) CfnInstanceFleetConfig(software.constructs.Construct scope, String id, CfnInstanceFleetConfigProps props) Create a newAWS::EMR::InstanceFleetConfig. -
Method Summary
Modifier and TypeMethodDescriptionThe unique identifier of the EMR cluster.A reference to a InstanceFleetConfig resource.The node type that the instance fleet hosts.InstanceTypeConfigsdetermine 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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnInstanceFleetConfig.renderProperties(Map<String, Object> props) voidsetClusterId(String value) The unique identifier of the EMR cluster.voidsetInstanceFleetType(String value) The node type that the instance fleet hosts.voidsetInstanceTypeConfigs(List<Object> value) InstanceTypeConfigsdetermine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.voidInstanceTypeConfigsdetermine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.voidThe launch specification for the instance fleet.voidsetLaunchSpecifications(CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty value) The launch specification for the instance fleet.voidThe friendly name of the instance fleet.voidThe resize specification for the instance fleet.voidThe resize specification for the instance fleet.voidsetTargetOnDemandCapacity(Number value) The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.voidsetTargetSpotCapacity(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, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods 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) Create a newAWS::EMR::InstanceFleetConfig.- 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
-
isCfnInstanceFleetConfig
Checks whether the given object is a CfnInstanceFleetConfig.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getInstanceFleetConfigRef
A reference to a InstanceFleetConfig resource.- Specified by:
getInstanceFleetConfigRefin interfaceIInstanceFleetConfigRef
-
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
InstanceTypeConfigsdetermine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnInstanceFleetConfig.InstanceTypeConfigProperty> -
setInstanceTypeConfigs
InstanceTypeConfigsdetermine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. -
setInstanceTypeConfigs
InstanceTypeConfigsdetermine 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.Returns union: either
IResolvableorCfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty -
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.Returns union: either
IResolvableorCfnInstanceFleetConfig.InstanceFleetResizingSpecificationsProperty -
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.
-