@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:50.241Z") public class EmrCreateCluster extends TaskStateBase
The ClusterConfiguration is defined as Parameters in the state machine definition.
OUTPUT: the ClusterId.
Example:
Role clusterRole = Role.Builder.create(this, "ClusterRole") .assumedBy(new ServicePrincipal("ec2.amazonaws.com")) .build(); Role serviceRole = Role.Builder.create(this, "ServiceRole") .assumedBy(new ServicePrincipal("elasticmapreduce.amazonaws.com")) .build(); Role autoScalingRole = Role.Builder.create(this, "AutoScalingRole") .assumedBy(new ServicePrincipal("elasticmapreduce.amazonaws.com")) .build(); autoScalingRole.assumeRolePolicy.addStatements( PolicyStatement.Builder.create() .effect(Effect.ALLOW) .principals(List.of( new ServicePrincipal("application-autoscaling.amazonaws.com"))) .actions(List.of("sts:AssumeRole")) .build()); EmrCreateCluster.Builder.create(this, "Create Cluster") .instances(InstancesConfigProperty.builder().build()) .clusterRole(clusterRole) .name(TaskInput.fromJsonPathAt("$.ClusterName").getValue()) .serviceRole(serviceRole) .autoScalingRole(autoScalingRole) .build();
Modifier and Type | Class and Description |
---|---|
static interface |
EmrCreateCluster.ApplicationConfigProperty
Properties for the EMR Cluster Applications.
|
static interface |
EmrCreateCluster.AutoScalingPolicyProperty
An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster.
|
static interface |
EmrCreateCluster.BootstrapActionConfigProperty
Configuration of a bootstrap action.
|
static class |
EmrCreateCluster.Builder
A fluent builder for
EmrCreateCluster . |
static class |
EmrCreateCluster.CloudWatchAlarmComparisonOperator
CloudWatch Alarm Comparison Operators.
|
static interface |
EmrCreateCluster.CloudWatchAlarmDefinitionProperty
The definition of a CloudWatch metric alarm, which determines when an automatic scaling activity is triggered.
|
static class |
EmrCreateCluster.CloudWatchAlarmStatistic
CloudWatch Alarm Statistics.
|
static class |
EmrCreateCluster.CloudWatchAlarmUnit
CloudWatch Alarm Units.
|
static interface |
EmrCreateCluster.ConfigurationProperty
An optional configuration specification to be used when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR.
|
static interface |
EmrCreateCluster.EbsBlockDeviceConfigProperty
Configuration of requested EBS block device associated with the instance group with count of volumes that will be associated to every instance.
|
static class |
EmrCreateCluster.EbsBlockDeviceVolumeType
EBS Volume Types.
|
static interface |
EmrCreateCluster.EbsConfigurationProperty
The Amazon EBS configuration of a cluster instance.
|
static class |
EmrCreateCluster.EmrClusterScaleDownBehavior
The Cluster ScaleDownBehavior specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.
|
static interface |
EmrCreateCluster.InstanceFleetConfigProperty
The configuration that defines an instance fleet.
|
static interface |
EmrCreateCluster.InstanceFleetProvisioningSpecificationsProperty
The launch specification for Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior.
|
static interface |
EmrCreateCluster.InstanceGroupConfigProperty
Configuration defining a new instance group.
|
static class |
EmrCreateCluster.InstanceMarket
EC2 Instance Market.
|
static class |
EmrCreateCluster.InstanceRoleType
Instance Role Types.
|
static interface |
EmrCreateCluster.InstancesConfigProperty
A specification of the number and type of Amazon EC2 instances.
|
static interface |
EmrCreateCluster.InstanceTypeConfigProperty
An instance type configuration for each instance type in an instance fleet, which determines the EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
|
static interface |
EmrCreateCluster.KerberosAttributesProperty
Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.
|
static interface |
EmrCreateCluster.MetricDimensionProperty
A CloudWatch dimension, which is specified using a Key (known as a Name in CloudWatch), Value pair.
|
static interface |
EmrCreateCluster.PlacementTypeProperty
The Amazon EC2 Availability Zone configuration of the cluster (job flow).
|
static interface |
EmrCreateCluster.ScalingActionProperty
The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.
|
static class |
EmrCreateCluster.ScalingAdjustmentType
AutoScaling Adjustment Type.
|
static interface |
EmrCreateCluster.ScalingConstraintsProperty
The upper and lower EC2 instance limits for an automatic scaling policy.
|
static interface |
EmrCreateCluster.ScalingRuleProperty
A scale-in or scale-out rule that defines scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments.
|
static interface |
EmrCreateCluster.ScalingTriggerProperty
The conditions that trigger an automatic scaling activity and the definition of a CloudWatch metric alarm.
|
static interface |
EmrCreateCluster.ScriptBootstrapActionConfigProperty
Configuration of the script to run during a bootstrap action.
|
static interface |
EmrCreateCluster.SimpleScalingPolicyConfigurationProperty
An automatic scaling configuration, which describes how the policy adds or removes instances, the cooldown period, and the number of EC2 instances that will be added each time the CloudWatch metric alarm condition is satisfied.
|
static class |
EmrCreateCluster.SpotAllocationStrategy
Spot Allocation Strategies.
|
static interface |
EmrCreateCluster.SpotProvisioningSpecificationProperty
The launch specification for Spot instances in the instance fleet, which determines the defined duration and provisioning timeout behavior.
|
static class |
EmrCreateCluster.SpotTimeoutAction
Spot Timeout Actions.
|
static interface |
EmrCreateCluster.VolumeSpecificationProperty
EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster.
|
INextable.Jsii$Default
IChainable.Jsii$Default
IConstruct.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
EmrCreateCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
EmrCreateCluster(software.amazon.jsii.JsiiObjectRef objRef) |
|
EmrCreateCluster(software.constructs.Construct scope,
java.lang.String id,
EmrCreateClusterProps props) |
Modifier and Type | Method and Description |
---|---|
IRole |
getAutoScalingRole()
The autoscaling role for the EMR Cluster.
|
IRole |
getClusterRole()
The instance role for the EMR Cluster.
|
IRole |
getServiceRole()
The service role for the EMR Cluster.
|
protected TaskMetricsConfig |
getTaskMetrics() |
protected java.util.List<PolicyStatement> |
getTaskPolicies() |
addCatch, addCatch, addRetry, addRetry, getEndStates, metric, metric, metricFailed, metricFailed, metricHeartbeatTimedOut, metricHeartbeatTimedOut, metricRunTime, metricRunTime, metricScheduled, metricScheduled, metricScheduleTime, metricScheduleTime, metricStarted, metricStarted, metricSucceeded, metricSucceeded, metricTime, metricTime, metricTimedOut, metricTimedOut, next, toStateJson, whenBoundToGraph
addBranch, addChoice, addIterator, addPrefix, bindToGraph, filterNextables, findReachableEndStates, findReachableEndStates, findReachableStates, findReachableStates, getBranches, getComment, getDefaultChoice, getId, getInputPath, getIteration, getOutputPath, getParameters, getResultPath, getResultSelector, getStartState, getStateId, makeDefault, makeNext, prefixStates, renderBranches, renderChoices, renderInputOutput, renderIterator, renderNextEnd, renderResultSelector, renderRetryCatch, setDefaultChoice, setIteration
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
protected EmrCreateCluster(software.amazon.jsii.JsiiObjectRef objRef)
protected EmrCreateCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public EmrCreateCluster(software.constructs.Construct scope, java.lang.String id, EmrCreateClusterProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public IRole getAutoScalingRole()
Only available after task has been added to a state machine.
public IRole getClusterRole()
Only available after task has been added to a state machine.
public IRole getServiceRole()
Only available after task has been added to a state machine.
protected TaskMetricsConfig getTaskMetrics()
getTaskMetrics
in class TaskStateBase
protected java.util.List<PolicyStatement> getTaskPolicies()
getTaskPolicies
in class TaskStateBase