Class CfnInstanceFleetConfig

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-06T14:43:19.166Z") @Stability(Stable) public class CfnInstanceFleetConfig extends CfnResource implements IInspectable
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)
                                         .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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getClusterId

      @Stability(Stable) @NotNull public String getClusterId()
      The unique identifier of the EMR cluster.
    • setClusterId

      @Stability(Stable) public void setClusterId(@NotNull String value)
      The unique identifier of the EMR cluster.
    • getInstanceFleetType

      @Stability(Stable) @NotNull public String getInstanceFleetType()
      The node type that the instance fleet hosts.
    • setInstanceFleetType

      @Stability(Stable) public void setInstanceFleetType(@NotNull String value)
      The node type that the instance fleet hosts.
    • getInstanceTypeConfigs

      @Stability(Stable) @Nullable public Object getInstanceTypeConfigs()
      InstanceTypeConfigs determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
    • setInstanceTypeConfigs

      @Stability(Stable) public void setInstanceTypeConfigs(@Nullable IResolvable value)
      InstanceTypeConfigs determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
    • setInstanceTypeConfigs

      @Stability(Stable) public void setInstanceTypeConfigs(@Nullable List<Object> value)
      InstanceTypeConfigs determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
    • getLaunchSpecifications

      @Stability(Stable) @Nullable public Object getLaunchSpecifications()
      The launch specification for the instance fleet.
    • setLaunchSpecifications

      @Stability(Stable) public void setLaunchSpecifications(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public String getName()
      The friendly name of the instance fleet.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The friendly name of the instance fleet.
    • getResizeSpecifications

      @Stability(Stable) @Nullable public Object getResizeSpecifications()
      The resize specification for the instance fleet.
    • setResizeSpecifications

      @Stability(Stable) public void setResizeSpecifications(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public Number getTargetOnDemandCapacity()
      The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
    • setTargetOnDemandCapacity

      @Stability(Stable) public void setTargetOnDemandCapacity(@Nullable Number value)
      The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
    • getTargetSpotCapacity

      @Stability(Stable) @Nullable public Number getTargetSpotCapacity()
      The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
    • setTargetSpotCapacity

      @Stability(Stable) public void setTargetSpotCapacity(@Nullable Number value)
      The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.