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.113.0 (build fc68b25)", date="2025-09-25T11:29:18.412Z") @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, "CreateCluster")
         .instances(InstancesConfigProperty.builder()
                 .instanceFleets(List.of(InstanceFleetConfigProperty.builder()
                         .instanceFleetType(EmrCreateCluster.getInstanceRoleType().CORE)
                         .instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
                                 .instanceType("m5.xlarge")
                                 .build()))
                         .targetOnDemandCapacity(1)
                         .build(), InstanceFleetConfigProperty.builder()
                         .instanceFleetType(EmrCreateCluster.getInstanceRoleType().MASTER)
                         .instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
                                 .instanceType("m5.xlarge")
                                 .build()))
                         .targetOnDemandCapacity(1)
                         .build()))
                 .build())
         .name("ClusterName")
         .releaseLabel("emr-7.9.0")
         .managedScalingPolicy(ManagedScalingPolicyProperty.builder()
                 .computeLimits(ManagedScalingComputeLimitsProperty.builder()
                         .unitType(EmrCreateCluster.getComputeLimitsUnitType().INSTANCE_FLEET_UNITS)
                         .maximumCapacityUnits(4)
                         .minimumCapacityUnits(1)
                         .maximumOnDemandCapacityUnits(4)
                         .maximumCoreCapacityUnits(2)
                         .build())
                 .build())
         .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