InstanceRoleType Enum
Instance Role Types.
| Source | aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts |
|---|
Example
ts
new tasks.EmrCreateCluster(this, 'CreateCluster', {
instances: {
instanceFleets: [
{
instanceFleetType: tasks.EmrCreateCluster.InstanceRoleType.CORE,
instanceTypeConfigs: [
{
instanceType: 'm5.xlarge',
},
],
targetOnDemandCapacity: 1,
},
{
instanceFleetType: tasks.EmrCreateCluster.InstanceRoleType.MASTER,
instanceTypeConfigs: [
{
instanceType: 'm5.xlarge',
},
],
targetOnDemandCapacity: 1,
},
],
},
name: 'ClusterName',
releaseLabel: 'emr-7.9.0',
managedScalingPolicy: {
computeLimits: {
unitType: tasks.EmrCreateCluster.ComputeLimitsUnitType.INSTANCE_FLEET_UNITS,
maximumCapacityUnits: 4,
minimumCapacityUnits: 1,
maximumOnDemandCapacityUnits: 4,
maximumCoreCapacityUnits: 2,
},
},
});
python
tasks.EmrCreateCluster(self, "CreateCluster",
instances=tasks.EmrCreateCluster.InstancesConfigProperty(
instance_fleets=[tasks.EmrCreateCluster.InstanceFleetConfigProperty(
instance_fleet_type=tasks.EmrCreateCluster.InstanceRoleType.CORE,
instance_type_configs=[tasks.EmrCreateCluster.InstanceTypeConfigProperty(
instance_type="m5.xlarge"
)
],
target_on_demand_capacity=1
), tasks.EmrCreateCluster.InstanceFleetConfigProperty(
instance_fleet_type=tasks.EmrCreateCluster.InstanceRoleType.MASTER,
instance_type_configs=[tasks.EmrCreateCluster.InstanceTypeConfigProperty(
instance_type="m5.xlarge"
)
],
target_on_demand_capacity=1
)
]
),
name="ClusterName",
release_label="emr-7.9.0",
managed_scaling_policy=tasks.EmrCreateCluster.ManagedScalingPolicyProperty(
compute_limits=tasks.EmrCreateCluster.ManagedScalingComputeLimitsProperty(
unit_type=tasks.EmrCreateCluster.ComputeLimitsUnitType.INSTANCE_FLEET_UNITS,
maximum_capacity_units=4,
minimum_capacity_units=1,
maximum_on_demand_capacity_units=4,
maximum_core_capacity_units=2
)
)
)
java
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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
new EmrCreateCluster(this, "CreateCluster", new EmrCreateClusterProps {
Instances = new InstancesConfigProperty {
InstanceFleets = new [] { new InstanceFleetConfigProperty {
InstanceFleetType = EmrCreateCluster.InstanceRoleType.CORE,
InstanceTypeConfigs = new [] { new InstanceTypeConfigProperty {
InstanceType = "m5.xlarge"
} },
TargetOnDemandCapacity = 1
}, new InstanceFleetConfigProperty {
InstanceFleetType = EmrCreateCluster.InstanceRoleType.MASTER,
InstanceTypeConfigs = new [] { new InstanceTypeConfigProperty {
InstanceType = "m5.xlarge"
} },
TargetOnDemandCapacity = 1
} }
},
Name = "ClusterName",
ReleaseLabel = "emr-7.9.0",
ManagedScalingPolicy = new ManagedScalingPolicyProperty {
ComputeLimits = new ManagedScalingComputeLimitsProperty {
UnitType = EmrCreateCluster.ComputeLimitsUnitType.INSTANCE_FLEET_UNITS,
MaximumCapacityUnits = 4,
MinimumCapacityUnits = 1,
MaximumOnDemandCapacityUnits = 4,
MaximumCoreCapacityUnits = 2
}
}
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
tasks.NewEmrCreateCluster(this, jsii.String("CreateCluster"), &EmrCreateClusterProps{
Instances: &InstancesConfigProperty{
InstanceFleets: []InstanceFleetConfigProperty{
&InstanceFleetConfigProperty{
InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_CORE,
InstanceTypeConfigs: []InstanceTypeConfigProperty{
&InstanceTypeConfigProperty{
InstanceType: jsii.String("m5.xlarge"),
},
},
TargetOnDemandCapacity: jsii.Number(1),
},
&InstanceFleetConfigProperty{
InstanceFleetType: tasks.EmrCreateCluster.InstanceRoleType_MASTER,
InstanceTypeConfigs: []InstanceTypeConfigProperty{
&InstanceTypeConfigProperty{
InstanceType: jsii.String("m5.xlarge"),
},
},
TargetOnDemandCapacity: jsii.Number(1),
},
},
},
Name: jsii.String("ClusterName"),
ReleaseLabel: jsii.String("emr-7.9.0"),
ManagedScalingPolicy: &ManagedScalingPolicyProperty{
ComputeLimits: &ManagedScalingComputeLimitsProperty{
UnitType: tasks.EmrCreateCluster.ComputeLimitsUnitType_INSTANCE_FLEET_UNITS,
MaximumCapacityUnits: jsii.Number(4),
MinimumCapacityUnits: jsii.Number(1),
MaximumOnDemandCapacityUnits: jsii.Number(4),
MaximumCoreCapacityUnits: jsii.Number(2),
},
},
})
Members
| Member | Description |
|---|---|
MASTER | Master Node. |
CORE | Core Node. |
TASK | Task Node. |
Referenced by
EmrCreateCluster.InstanceFleetConfigProperty.instanceFleetTypeinstance_fleet_typeinstanceFleetTypeInstanceFleetTypeInstanceFleetTypeEmrCreateCluster.InstanceGroupConfigProperty.instanceRoleinstance_roleinstanceRoleInstanceRoleInstanceRole