Interface EmrCreateCluster.InstanceFleetConfigProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
EmrCreateCluster.InstanceFleetConfigProperty.Jsii$Proxy
Enclosing class:
EmrCreateCluster

@Stability(Stable) public static interface EmrCreateCluster.InstanceFleetConfigProperty extends software.amazon.jsii.JsiiSerializable
The configuration that defines an instance fleet.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.stepfunctions.tasks.*;
 ConfigurationProperty configurationProperty_;
 Size size;
 InstanceFleetConfigProperty instanceFleetConfigProperty = InstanceFleetConfigProperty.builder()
         .instanceFleetType(EmrCreateCluster.getInstanceRoleType().MASTER)
         // 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")
                         .configurations(List.of(configurationProperty_))
                         .properties(Map.of(
                                 "propertiesKey", "properties"))
                         .build()))
                 .ebsConfiguration(EbsConfigurationProperty.builder()
                         .ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
                                 .volumeSpecification(VolumeSpecificationProperty.builder()
                                         .volumeSize(size)
                                         .volumeType(EmrCreateCluster.getEbsBlockDeviceVolumeType().GP3)
                                         // 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(EmrCreateCluster.getOnDemandAllocationStrategy().LOWEST_PRICE)
                         .build())
                 .spotSpecification(SpotProvisioningSpecificationProperty.builder()
                         .timeoutAction(EmrCreateCluster.getSpotTimeoutAction().SWITCH_TO_ON_DEMAND)
                         // the properties below are optional
                         .allocationStrategy(EmrCreateCluster.getSpotAllocationStrategy().CAPACITY_OPTIMIZED)
                         .blockDurationMinutes(123)
                         .timeout(Duration.minutes(30))
                         .timeoutDurationMinutes(123)
                         .build())
                 .build())
         .name("name")
         .targetOnDemandCapacity(123)
         .targetSpotCapacity(123)
         .build();
 

See Also:
  • Method Details

    • getInstanceFleetType

      @Stability(Stable) @NotNull EmrCreateCluster.InstanceRoleType getInstanceFleetType()
      The node type that the instance fleet hosts.

      Valid values are MASTER,CORE,and TASK.

    • getInstanceTypeConfigs

      @Stability(Stable) @Nullable default List<EmrCreateCluster.InstanceTypeConfigProperty> getInstanceTypeConfigs()
      The instance type configurations that define the EC2 instances in the instance fleet.

      Default: No instanceTpeConfigs

    • getLaunchSpecifications

      @Stability(Stable) @Nullable default EmrCreateCluster.InstanceFleetProvisioningSpecificationsProperty getLaunchSpecifications()
      The launch specification for the instance fleet.

      Default: No launchSpecifications

    • getName

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

      Default: No name

    • getTargetOnDemandCapacity

      @Stability(Stable) @Nullable default Number getTargetOnDemandCapacity()
      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 targetSpotCapacity.

      At least one of targetSpotCapacity and targetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of targetSpotCapacity and targetOnDemandCapacity can be specified, and its value must be 1.

      Default: No targetOnDemandCapacity

    • getTargetSpotCapacity

      @Stability(Stable) @Nullable default Number getTargetSpotCapacity()
      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 targetOnDemandCapacity.

      At least one of targetSpotCapacity and targetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of targetSpotCapacity and targetOnDemandCapacity can be specified, and its value must be 1.

      Default: No targetSpotCapacity

    • builder

      @Stability(Stable) static EmrCreateCluster.InstanceFleetConfigProperty.Builder builder()
      Returns:
      a EmrCreateCluster.InstanceFleetConfigProperty.Builder of EmrCreateCluster.InstanceFleetConfigProperty