Class EmrCreateCluster

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

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-13T16:55:18.801Z") @Stability(Stable) public class EmrCreateCluster extends TaskStateBase
A Step Functions Task to create an EMR Cluster.

The ClusterConfiguration is defined as Parameters in the state machine definition.

OUTPUT: the ClusterId.

Example:

 EmrCreateCluster.Builder.create(this, "PrioritizedAllocation")
         .instances(InstancesConfigProperty.builder()
                 .instanceFleets(List.of(InstanceFleetConfigProperty.builder()
                         .instanceFleetType(EmrCreateCluster.getInstanceRoleType().CORE)
                         .instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
                                 .instanceType("m5.large")
                                 .priority(0)
                                 .build(), InstanceTypeConfigProperty.builder()
                                 .instanceType("m5.xlarge")
                                 .priority(1)
                                 .build()))
                         .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
                                 .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
                                         .allocationStrategy(EmrCreateCluster.getOnDemandAllocationStrategy().PRIORITIZED)
                                         .build())
                                 .build())
                         .targetOnDemandCapacity(2)
                         .build()))
                 .build())
         .name("PrioritizedCluster")
         .integrationPattern(IntegrationPattern.RUN_JOB)
         .build();
 
  • Constructor Details

    • EmrCreateCluster

      protected EmrCreateCluster(software.amazon.jsii.JsiiObjectRef objRef)
    • EmrCreateCluster

      protected EmrCreateCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • EmrCreateCluster

      @Stability(Stable) public EmrCreateCluster(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EmrCreateClusterProps props)
      Parameters:
      scope - This parameter is required.
      id - Descriptive identifier for this chainable. This parameter is required.
      props - This parameter is required.
  • Method Details

    • jsonata

      @Stability(Stable) @NotNull public static EmrCreateCluster jsonata(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EmrCreateClusterJsonataProps props)
      A Step Functions task using JSONata to create an EMR Cluster.

      This task creates a Lambda function to call cross-region AWS API and invokes it.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
    • jsonPath

      @Stability(Stable) @NotNull public static EmrCreateCluster jsonPath(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EmrCreateClusterJsonPathProps props)
      A Step Functions task using JSONPath to create an EMR Cluster.

      This task creates a Lambda function to call cross-region AWS API and invokes it.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
    • getAutoScalingRole

      @Stability(Stable) @NotNull public IRole getAutoScalingRole()
      The autoscaling role for the EMR Cluster.

      Only available after task has been added to a state machine.

    • getClusterRole

      @Stability(Stable) @NotNull public IRole getClusterRole()
      The instance role for the EMR Cluster.

      Only available after task has been added to a state machine.

    • getServiceRole

      @Stability(Stable) @NotNull public IRole getServiceRole()
      The service role for the EMR Cluster.

      Only available after task has been added to a state machine.

    • getTaskMetrics

      @Stability(Stable) @Nullable protected TaskMetricsConfig getTaskMetrics()
      Specified by:
      getTaskMetrics in class TaskStateBase
    • getTaskPolicies

      @Stability(Stable) @Nullable protected List<PolicyStatement> getTaskPolicies()
      Specified by:
      getTaskPolicies in class TaskStateBase