Enum EmrCreateCluster.OnDemandAllocationStrategy

java.lang.Object
java.lang.Enum<EmrCreateCluster.OnDemandAllocationStrategy>
software.amazon.awscdk.services.stepfunctions.tasks.EmrCreateCluster.OnDemandAllocationStrategy
All Implemented Interfaces:
Serializable, Comparable<EmrCreateCluster.OnDemandAllocationStrategy>, java.lang.constant.Constable
Enclosing class:
EmrCreateCluster

@Stability(Stable) public static enum EmrCreateCluster.OnDemandAllocationStrategy extends Enum<EmrCreateCluster.OnDemandAllocationStrategy>
On-Demand Allocation Strategies.

Specifies the strategy to use in launching On-Demand instance fleets. Currently, the only option is "lowest-price" (the default), which launches the lowest price first.

Example:

 EmrCreateCluster.Builder.create(this, "OnDemandSpecification")
         .instances(InstancesConfigProperty.builder()
                 .instanceFleets(List.of(InstanceFleetConfigProperty.builder()
                         .instanceFleetType(EmrCreateCluster.getInstanceRoleType().MASTER)
                         .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
                                 .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
                                         .allocationStrategy(EmrCreateCluster.getOnDemandAllocationStrategy().LOWEST_PRICE)
                                         .build())
                                 .build())
                         .build()))
                 .build())
         .name("OnDemandCluster")
         .integrationPattern(IntegrationPattern.RUN_JOB)
         .build();
 EmrCreateCluster.Builder.create(this, "SpotSpecification")
         .instances(InstancesConfigProperty.builder()
                 .instanceFleets(List.of(InstanceFleetConfigProperty.builder()
                         .instanceFleetType(EmrCreateCluster.getInstanceRoleType().MASTER)
                         .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
                                 .spotSpecification(SpotProvisioningSpecificationProperty.builder()
                                         .allocationStrategy(EmrCreateCluster.getSpotAllocationStrategy().CAPACITY_OPTIMIZED)
                                         .timeoutAction(EmrCreateCluster.getSpotTimeoutAction().TERMINATE_CLUSTER)
                                         .timeout(Duration.minutes(5))
                                         .build())
                                 .build())
                         .build()))
                 .build())
         .name("SpotCluster")
         .integrationPattern(IntegrationPattern.RUN_JOB)
         .build();
 

See Also:
  • Enum Constant Details

  • Method Details

    • values

      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null