Skip to content
v2.274.0

EmrCreateClusterJsonataProps Struct ​

Properties for calling an AWS service's API action using JSONata from your state machine across regions.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';

declare const assign: any;
declare const configurationProperty_: stepfunctions_tasks.EmrCreateCluster.ConfigurationProperty;
declare const outputs: any;
declare const role: iam.Role;
declare const size: cdk.Size;
declare const taskRole: stepfunctions.TaskRole;
declare const timeout: stepfunctions.Timeout;
const emrCreateClusterJsonataProps: stepfunctions_tasks.EmrCreateClusterJsonataProps = {
  instances: {
    additionalMasterSecurityGroups: ['additionalMasterSecurityGroups'],
    additionalSlaveSecurityGroups: ['additionalSlaveSecurityGroups'],
    ec2KeyName: 'ec2KeyName',
    ec2SubnetId: 'ec2SubnetId',
    ec2SubnetIds: ['ec2SubnetIds'],
    emrManagedMasterSecurityGroup: 'emrManagedMasterSecurityGroup',
    emrManagedSlaveSecurityGroup: 'emrManagedSlaveSecurityGroup',
    hadoopVersion: 'hadoopVersion',
    instanceCount: 123,
    instanceFleets: [{
      instanceFleetType: stepfunctions_tasks.EmrCreateCluster.InstanceRoleType.MASTER,

      // the properties below are optional
      instanceTypeConfigs: [{
        instanceType: 'instanceType',

        // the properties below are optional
        bidPrice: 'bidPrice',
        bidPriceAsPercentageOfOnDemandPrice: 123,
        configurations: [{
          classification: 'classification',
          configurations: [configurationProperty_],
          properties: {
            propertiesKey: 'properties',
          },
        }],
        ebsConfiguration: {
          ebsBlockDeviceConfigs: [{
            volumeSpecification: {
              volumeSize: size,
              volumeType: stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType.GP3,

              // the properties below are optional
              iops: 123,
            },

            // the properties below are optional
            volumesPerInstance: 123,
          }],
          ebsOptimized: false,
        },
        priority: 123,
        weightedCapacity: 123,
      }],
      launchSpecifications: {
        onDemandSpecification: {
          allocationStrategy: stepfunctions_tasks.EmrCreateCluster.OnDemandAllocationStrategy.LOWEST_PRICE,
        },
        spotSpecification: {
          timeoutAction: stepfunctions_tasks.EmrCreateCluster.SpotTimeoutAction.SWITCH_TO_ON_DEMAND,

          // the properties below are optional
          allocationStrategy: stepfunctions_tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
          blockDurationMinutes: 123,
          timeout: cdk.Duration.minutes(30),
          timeoutDurationMinutes: 123,
        },
      },
      name: 'name',
      targetOnDemandCapacity: 123,
      targetSpotCapacity: 123,
    }],
    instanceGroups: [{
      instanceCount: 123,
      instanceRole: stepfunctions_tasks.EmrCreateCluster.InstanceRoleType.MASTER,
      instanceType: 'instanceType',

      // the properties below are optional
      autoScalingPolicy: {
        constraints: {
          maxCapacity: 123,
          minCapacity: 123,
        },
        rules: [{
          action: {
            simpleScalingPolicyConfiguration: {
              scalingAdjustment: 123,

              // the properties below are optional
              adjustmentType: stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType.CHANGE_IN_CAPACITY,
              coolDown: 123,
            },

            // the properties below are optional
            market: stepfunctions_tasks.EmrCreateCluster.InstanceMarket.ON_DEMAND,
          },
          name: 'name',
          trigger: {
            cloudWatchAlarmDefinition: {
              comparisonOperator: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator.GREATER_THAN_OR_EQUAL,
              metricName: 'metricName',
              period: cdk.Duration.minutes(30),

              // the properties below are optional
              dimensions: [{
                key: 'key',
                value: 'value',
              }],
              evaluationPeriods: 123,
              namespace: 'namespace',
              statistic: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic.SAMPLE_COUNT,
              threshold: 123,
              unit: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit.NONE,
            },
          },

          // the properties below are optional
          description: 'description',
        }],
      },
      bidPrice: 'bidPrice',
      configurations: [{
        classification: 'classification',
        configurations: [configurationProperty_],
        properties: {
          propertiesKey: 'properties',
        },
      }],
      ebsConfiguration: {
        ebsBlockDeviceConfigs: [{
          volumeSpecification: {
            volumeSize: size,
            volumeType: stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType.GP3,

            // the properties below are optional
            iops: 123,
          },

          // the properties below are optional
          volumesPerInstance: 123,
        }],
        ebsOptimized: false,
      },
      market: stepfunctions_tasks.EmrCreateCluster.InstanceMarket.ON_DEMAND,
      name: 'name',
    }],
    masterInstanceType: 'masterInstanceType',
    placement: {
      availabilityZone: 'availabilityZone',
      availabilityZones: ['availabilityZones'],
    },
    serviceAccessSecurityGroup: 'serviceAccessSecurityGroup',
    slaveInstanceType: 'slaveInstanceType',
    terminationProtected: false,
  },
  name: 'name',

  // the properties below are optional
  additionalInfo: 'additionalInfo',
  applications: [{
    name: 'name',

    // the properties below are optional
    additionalInfo: {
      additionalInfoKey: 'additionalInfo',
    },
    args: ['args'],
    version: 'version',
  }],
  assign: {
    assignKey: assign,
  },
  autoScalingRole: role,
  autoTerminationPolicyIdleTimeout: cdk.Duration.minutes(30),
  bootstrapActions: [{
    name: 'name',
    scriptBootstrapAction: {
      path: 'path',

      // the properties below are optional
      args: ['args'],
    },
  }],
  clusterRole: role,
  comment: 'comment',
  configurations: [{
    classification: 'classification',
    configurations: [configurationProperty_],
    properties: {
      propertiesKey: 'properties',
    },
  }],
  credentials: {
    role: taskRole,
  },
  customAmiId: 'customAmiId',
  ebsRootVolumeIops: 123,
  ebsRootVolumeSize: size,
  ebsRootVolumeThroughput: 123,
  heartbeat: cdk.Duration.minutes(30),
  heartbeatTimeout: timeout,
  integrationPattern: stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
  kerberosAttributes: {
    realm: 'realm',

    // the properties below are optional
    adDomainJoinPassword: 'adDomainJoinPassword',
    adDomainJoinUser: 'adDomainJoinUser',
    crossRealmTrustPrincipalPassword: 'crossRealmTrustPrincipalPassword',
    kdcAdminPassword: 'kdcAdminPassword',
  },
  logUri: 'logUri',
  managedScalingPolicy: {
    computeLimits: {
      maximumCapacityUnits: 123,
      minimumCapacityUnits: 123,
      unitType: stepfunctions_tasks.EmrCreateCluster.ComputeLimitsUnitType.INSTANCE_FLEET_UNITS,

      // the properties below are optional
      maximumCoreCapacityUnits: 123,
      maximumOnDemandCapacityUnits: 123,
    },
  },
  outputs: outputs,
  queryLanguage: stepfunctions.QueryLanguage.JSON_PATH,
  releaseLabel: 'releaseLabel',
  scaleDownBehavior: stepfunctions_tasks.EmrCreateCluster.EmrClusterScaleDownBehavior.TERMINATE_AT_INSTANCE_HOUR,
  securityConfiguration: 'securityConfiguration',
  serviceRole: role,
  stateName: 'stateName',
  stepConcurrencyLevel: 123,
  tags: {
    tagsKey: 'tags',
  },
  taskTimeout: timeout,
  timeout: cdk.Duration.minutes(30),
  visibleToAllUsers: false,
};

Properties ​

additionalInfooptionalstringadditional_infooptionalstradditionalInfooptionalStringAdditionalInfooptionalstringAdditionalInfooptional*string= None#
A JSON string for selecting additional features.
applicationsoptionalEmrCreateCluster.ApplicationConfigProperty[]applicationsoptionaltyping.List[ApplicationConfigProperty]applicationsoptionalList<ApplicationConfigProperty>ApplicationsoptionalApplicationConfigProperty[]Applicationsoptional*[]ApplicationConfigProperty#
A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster.

Default: EMR selected default

assignoptional{ [key: string]: any }assignoptionaltyping.Mapping[str, Any]assignoptionalMap<String, Object>AssignoptionalIDictionary<string, object>Assignoptional*map[string]interface{}#
Workflow variables to store in this step.

Default: Not assign variables

Using workflow variables, you can store data in a step and retrieve that data in future steps.

autoScalingRoleoptionalIRoleauto_scaling_roleoptionalIRoleautoScalingRoleoptionalIRoleAutoScalingRoleoptionalIRoleAutoScalingRoleoptionalIRole#
An IAM role for automatic scaling policies.

Default: A role will be created.

autoTerminationPolicyIdleTimeoutoptionalDurationauto_termination_policy_idle_timeoutoptionalDurationautoTerminationPolicyIdleTimeoutoptionalDurationAutoTerminationPolicyIdleTimeoutoptionalDurationAutoTerminationPolicyIdleTimeoutoptionalDuration#
The amount of idle time after which the cluster automatically terminates.

Default: No timeout

You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

bootstrapActionsoptionalEmrCreateCluster.BootstrapActionConfigProperty[]bootstrap_actionsoptionaltyping.List[BootstrapActionConfigProperty]bootstrapActionsoptionalList<BootstrapActionConfigProperty>BootstrapActionsoptionalBootstrapActionConfigProperty[]BootstrapActionsoptional*[]BootstrapActionConfigProperty= None#
A list of bootstrap actions to run before Hadoop starts on the cluster nodes.
clusterRoleoptionalIRolecluster_roleoptionalIRoleclusterRoleoptionalIRoleClusterRoleoptionalIRoleClusterRoleoptionalIRole#
Also called instance profile and EC2 role.

Default: * A Role will be created

An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role.

This attribute has been renamed from jobFlowRole to clusterRole to align with other ERM/StepFunction integration parameters.

commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string#
A comment describing this state.

Default: No comment

configurationsoptionalEmrCreateCluster.ConfigurationProperty[]configurationsoptionaltyping.List[ConfigurationProperty]configurationsoptionalList<ConfigurationProperty>ConfigurationsoptionalConfigurationProperty[]Configurationsoptional*[]ConfigurationProperty= None#
The list of configurations supplied for the EMR cluster you are creating.
credentialsoptionalCredentialscredentialsoptionalCredentialscredentialsoptionalCredentialsCredentialsoptionalCredentialsCredentialsoptionalCredentials#
Credentials for an IAM Role that the State Machine assumes for executing the task.

Default: None (Task is executed using the State Machine's execution role)

This enables cross-account resource invocations.

customAmiIdoptionalstringcustom_ami_idoptionalstrcustomAmiIdoptionalStringCustomAmiIdoptionalstringCustomAmiIdoptional*string= None#
The ID of a custom Amazon EBS-backed Linux AMI.
ebsRootVolumeIopsoptionalnumberebs_root_volume_iopsoptionalint | floatebsRootVolumeIopsoptionalNumberEbsRootVolumeIopsoptionaldoubleEbsRootVolumeIopsoptional*float64#
The IOPS of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

Default: EMR selected default

Requires EMR release label 6.15.0 or above. Must be in range [3000, 16000].

ebsRootVolumeSizeoptionalSizeebs_root_volume_sizeoptionalSizeebsRootVolumeSizeoptionalSizeEbsRootVolumeSizeoptionalSizeEbsRootVolumeSizeoptionalSize#
The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

Default: EMR selected default

ebsRootVolumeThroughputoptionalnumberebs_root_volume_throughputoptionalint | floatebsRootVolumeThroughputoptionalNumberEbsRootVolumeThroughputoptionaldoubleEbsRootVolumeThroughputoptional*float64#
The throughput, in MiB/s, of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

Default: EMR selected default

Requires EMR release label 6.15.0 or above. Must be in range [125, 1000].

heartbeatoptionalDurationheartbeatoptionalDurationheartbeatoptionalDurationHeartbeatoptionalDurationHeartbeatoptionalDuration= Nonedeprecated#
use `heartbeatTimeout`
heartbeatTimeoutoptionalTimeoutheartbeat_timeoutoptionalTimeoutheartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeoutHeartbeatTimeoutoptionalTimeout= None#
Timeout for the heartbeat.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

A specification of the number and type of Amazon EC2 instances.
integrationPatternoptionalIntegrationPatternintegration_patternoptionalIntegrationPatternintegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPatternIntegrationPatternoptionalIntegrationPattern#
AWS Step Functions integrates with services directly in the Amazon States Language.

Default: IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.

You can control these AWS services using service integration patterns.

Depending on the AWS Service, the Service Integration Pattern availability will vary.

kerberosAttributesoptionalEmrCreateCluster.KerberosAttributesPropertykerberos_attributesoptionalKerberosAttributesPropertykerberosAttributesoptionalKerberosAttributesPropertyKerberosAttributesoptionalKerberosAttributesPropertyKerberosAttributesoptionalKerberosAttributesProperty= None#
Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.
logUrioptionalstringlog_urioptionalstrlogUrioptionalStringLogUrioptionalstringLogUrioptional*string= None#
The location in Amazon S3 to write the log files of the job flow.
managedScalingPolicyoptionalEmrCreateCluster.ManagedScalingPolicyPropertymanaged_scaling_policyoptionalManagedScalingPolicyPropertymanagedScalingPolicyoptionalManagedScalingPolicyPropertyManagedScalingPolicyoptionalManagedScalingPolicyPropertyManagedScalingPolicyoptionalManagedScalingPolicyProperty= None#
The specified managed scaling policy for an Amazon EMR cluster.
namestringnamestrnameStringNamestringName*stringrequired#
The Name of the Cluster.
outputsoptionalanyoutputsoptionalAnyoutputsoptionalObjectOutputsoptionalobjectOutputsoptionalinterface{}#
Used to specify and transform output from the state.

Default: $states.result or $states.errorOutput

notes

When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.

queryLanguageoptionalQueryLanguagequery_languageoptionalQueryLanguagequeryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguageQueryLanguageoptionalQueryLanguage= JSONPath#
The name of the query language used by the state.

If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.

releaseLabeloptionalstringrelease_labeloptionalstrreleaseLabeloptionalStringReleaseLabeloptionalstringReleaseLabeloptional*string#
The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.

Default: EMR selected default

scaleDownBehavioroptionalEmrCreateCluster.EmrClusterScaleDownBehaviorscale_down_behavioroptionalEmrClusterScaleDownBehaviorscaleDownBehavioroptionalEmrClusterScaleDownBehaviorScaleDownBehavioroptionalEmrClusterScaleDownBehaviorScaleDownBehavioroptionalEmrClusterScaleDownBehavior#
Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

Default: EMR selected default

securityConfigurationoptionalstringsecurity_configurationoptionalstrsecurityConfigurationoptionalStringSecurityConfigurationoptionalstringSecurityConfigurationoptional*string= None#
The name of a security configuration to apply to the cluster.
serviceRoleoptionalIRoleservice_roleoptionalIRoleserviceRoleoptionalIRoleServiceRoleoptionalIRoleServiceRoleoptionalIRole#
The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.

Default: A role will be created that Amazon EMR service can assume.

stateNameoptionalstringstate_nameoptionalstrstateNameoptionalStringStateNameoptionalstringStateNameoptional*string#
Optional name for this state.

Default: The construct ID will be used as state name

stepConcurrencyLeveloptionalnumberstep_concurrency_leveloptionalint | floatstepConcurrencyLeveloptionalNumberStepConcurrencyLeveloptionaldoubleStepConcurrencyLeveloptional*float64#
Specifies the step concurrency level to allow multiple steps to run in parallel.

Default: 1 - no step concurrency allowed

Requires EMR release label 5.28.0 or above. Must be in range [1, 256].

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string= None#
A list of tags to associate with a cluster and propagate to Amazon EC2 instances.
taskTimeoutoptionalTimeouttask_timeoutoptionalTimeouttaskTimeoutoptionalTimeoutTaskTimeoutoptionalTimeoutTaskTimeoutoptionalTimeout= None#
Timeout for the task.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

timeoutoptionalDurationtimeoutoptionalDurationtimeoutoptionalDurationTimeoutoptionalDurationTimeoutoptionalDuration= Nonedeprecated#
use `taskTimeout`
visibleToAllUsersoptionalbooleanvisible_to_all_usersoptionalboolvisibleToAllUsersoptionalBooleanVisibleToAllUsersoptionalboolVisibleToAllUsersoptional*bool= true#
A value of true indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions.