Class CfnCluster.JobFlowInstancesConfigProperty
JobFlowInstancesConfig
is a property of the AWS::EMR::Cluster
resource.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EMR
Assembly: Amazon.CDK.AWS.EMR.dll
Syntax (csharp)
public class JobFlowInstancesConfigProperty : Object, CfnCluster.IJobFlowInstancesConfigProperty
Syntax (vb)
Public Class JobFlowInstancesConfigProperty
Inherits Object
Implements CfnCluster.IJobFlowInstancesConfigProperty
Remarks
JobFlowInstancesConfig
defines the instance groups or instance fleets that comprise the cluster. JobFlowInstancesConfig
must contain either InstanceFleetConfig
or InstanceGroupConfig
. They cannot be used together.
You can now define task instance groups or task instance fleets using the TaskInstanceGroups
and TaskInstanceFleets
subproperties. Using these subproperties reduces delays in provisioning task nodes compared to specifying task nodes with the InstanceFleetConfig
and InstanceGroupConfig
resources.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EMR;
ConfigurationProperty configurationProperty_;
var jobFlowInstancesConfigProperty = new JobFlowInstancesConfigProperty {
AdditionalMasterSecurityGroups = new [] { "additionalMasterSecurityGroups" },
AdditionalSlaveSecurityGroups = new [] { "additionalSlaveSecurityGroups" },
CoreInstanceFleet = new InstanceFleetConfigProperty {
InstanceTypeConfigs = new [] { new InstanceTypeConfigProperty {
InstanceType = "instanceType",
// the properties below are optional
BidPrice = "bidPrice",
BidPriceAsPercentageOfOnDemandPrice = 123,
Configurations = new [] { new ConfigurationProperty {
Classification = "classification",
ConfigurationProperties = new Dictionary<string, string> {
{ "configurationPropertiesKey", "configurationProperties" }
},
Configurations = new [] { configurationProperty_ }
} },
CustomAmiId = "customAmiId",
EbsConfiguration = new EbsConfigurationProperty {
EbsBlockDeviceConfigs = new [] { new EbsBlockDeviceConfigProperty {
VolumeSpecification = new VolumeSpecificationProperty {
SizeInGb = 123,
VolumeType = "volumeType",
// the properties below are optional
Iops = 123
},
// the properties below are optional
VolumesPerInstance = 123
} },
EbsOptimized = false
},
WeightedCapacity = 123
} },
LaunchSpecifications = new InstanceFleetProvisioningSpecificationsProperty {
OnDemandSpecification = new OnDemandProvisioningSpecificationProperty {
AllocationStrategy = "allocationStrategy"
},
SpotSpecification = new SpotProvisioningSpecificationProperty {
TimeoutAction = "timeoutAction",
TimeoutDurationMinutes = 123,
// the properties below are optional
AllocationStrategy = "allocationStrategy",
BlockDurationMinutes = 123
}
},
Name = "name",
TargetOnDemandCapacity = 123,
TargetSpotCapacity = 123
},
CoreInstanceGroup = new InstanceGroupConfigProperty {
InstanceCount = 123,
InstanceType = "instanceType",
// the properties below are optional
AutoScalingPolicy = new AutoScalingPolicyProperty {
Constraints = new ScalingConstraintsProperty {
MaxCapacity = 123,
MinCapacity = 123
},
Rules = new [] { new ScalingRuleProperty {
Action = new ScalingActionProperty {
SimpleScalingPolicyConfiguration = new SimpleScalingPolicyConfigurationProperty {
ScalingAdjustment = 123,
// the properties below are optional
AdjustmentType = "adjustmentType",
CoolDown = 123
},
// the properties below are optional
Market = "market"
},
Name = "name",
Trigger = new ScalingTriggerProperty {
CloudWatchAlarmDefinition = new CloudWatchAlarmDefinitionProperty {
ComparisonOperator = "comparisonOperator",
MetricName = "metricName",
Period = 123,
Threshold = 123,
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Key = "key",
Value = "value"
} },
EvaluationPeriods = 123,
Namespace = "namespace",
Statistic = "statistic",
Unit = "unit"
}
},
// the properties below are optional
Description = "description"
} }
},
BidPrice = "bidPrice",
Configurations = new [] { new ConfigurationProperty {
Classification = "classification",
ConfigurationProperties = new Dictionary<string, string> {
{ "configurationPropertiesKey", "configurationProperties" }
},
Configurations = new [] { configurationProperty_ }
} },
CustomAmiId = "customAmiId",
EbsConfiguration = new EbsConfigurationProperty {
EbsBlockDeviceConfigs = new [] { new EbsBlockDeviceConfigProperty {
VolumeSpecification = new VolumeSpecificationProperty {
SizeInGb = 123,
VolumeType = "volumeType",
// the properties below are optional
Iops = 123
},
// the properties below are optional
VolumesPerInstance = 123
} },
EbsOptimized = false
},
Market = "market",
Name = "name"
},
Ec2KeyName = "ec2KeyName",
Ec2SubnetId = "ec2SubnetId",
Ec2SubnetIds = new [] { "ec2SubnetIds" },
EmrManagedMasterSecurityGroup = "emrManagedMasterSecurityGroup",
EmrManagedSlaveSecurityGroup = "emrManagedSlaveSecurityGroup",
HadoopVersion = "hadoopVersion",
KeepJobFlowAliveWhenNoSteps = false,
MasterInstanceFleet = new InstanceFleetConfigProperty {
InstanceTypeConfigs = new [] { new InstanceTypeConfigProperty {
InstanceType = "instanceType",
// the properties below are optional
BidPrice = "bidPrice",
BidPriceAsPercentageOfOnDemandPrice = 123,
Configurations = new [] { new ConfigurationProperty {
Classification = "classification",
ConfigurationProperties = new Dictionary<string, string> {
{ "configurationPropertiesKey", "configurationProperties" }
},
Configurations = new [] { configurationProperty_ }
} },
CustomAmiId = "customAmiId",
EbsConfiguration = new EbsConfigurationProperty {
EbsBlockDeviceConfigs = new [] { new EbsBlockDeviceConfigProperty {
VolumeSpecification = new VolumeSpecificationProperty {
SizeInGb = 123,
VolumeType = "volumeType",
// the properties below are optional
Iops = 123
},
// the properties below are optional
VolumesPerInstance = 123
} },
EbsOptimized = false
},
WeightedCapacity = 123
} },
LaunchSpecifications = new InstanceFleetProvisioningSpecificationsProperty {
OnDemandSpecification = new OnDemandProvisioningSpecificationProperty {
AllocationStrategy = "allocationStrategy"
},
SpotSpecification = new SpotProvisioningSpecificationProperty {
TimeoutAction = "timeoutAction",
TimeoutDurationMinutes = 123,
// the properties below are optional
AllocationStrategy = "allocationStrategy",
BlockDurationMinutes = 123
}
},
Name = "name",
TargetOnDemandCapacity = 123,
TargetSpotCapacity = 123
},
MasterInstanceGroup = new InstanceGroupConfigProperty {
InstanceCount = 123,
InstanceType = "instanceType",
// the properties below are optional
AutoScalingPolicy = new AutoScalingPolicyProperty {
Constraints = new ScalingConstraintsProperty {
MaxCapacity = 123,
MinCapacity = 123
},
Rules = new [] { new ScalingRuleProperty {
Action = new ScalingActionProperty {
SimpleScalingPolicyConfiguration = new SimpleScalingPolicyConfigurationProperty {
ScalingAdjustment = 123,
// the properties below are optional
AdjustmentType = "adjustmentType",
CoolDown = 123
},
// the properties below are optional
Market = "market"
},
Name = "name",
Trigger = new ScalingTriggerProperty {
CloudWatchAlarmDefinition = new CloudWatchAlarmDefinitionProperty {
ComparisonOperator = "comparisonOperator",
MetricName = "metricName",
Period = 123,
Threshold = 123,
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Key = "key",
Value = "value"
} },
EvaluationPeriods = 123,
Namespace = "namespace",
Statistic = "statistic",
Unit = "unit"
}
},
// the properties below are optional
Description = "description"
} }
},
BidPrice = "bidPrice",
Configurations = new [] { new ConfigurationProperty {
Classification = "classification",
ConfigurationProperties = new Dictionary<string, string> {
{ "configurationPropertiesKey", "configurationProperties" }
},
Configurations = new [] { configurationProperty_ }
} },
CustomAmiId = "customAmiId",
EbsConfiguration = new EbsConfigurationProperty {
EbsBlockDeviceConfigs = new [] { new EbsBlockDeviceConfigProperty {
VolumeSpecification = new VolumeSpecificationProperty {
SizeInGb = 123,
VolumeType = "volumeType",
// the properties below are optional
Iops = 123
},
// the properties below are optional
VolumesPerInstance = 123
} },
EbsOptimized = false
},
Market = "market",
Name = "name"
},
Placement = new PlacementTypeProperty {
AvailabilityZone = "availabilityZone"
},
ServiceAccessSecurityGroup = "serviceAccessSecurityGroup",
TaskInstanceFleets = new [] { new InstanceFleetConfigProperty {
InstanceTypeConfigs = new [] { new InstanceTypeConfigProperty {
InstanceType = "instanceType",
// the properties below are optional
BidPrice = "bidPrice",
BidPriceAsPercentageOfOnDemandPrice = 123,
Configurations = new [] { new ConfigurationProperty {
Classification = "classification",
ConfigurationProperties = new Dictionary<string, string> {
{ "configurationPropertiesKey", "configurationProperties" }
},
Configurations = new [] { configurationProperty_ }
} },
CustomAmiId = "customAmiId",
EbsConfiguration = new EbsConfigurationProperty {
EbsBlockDeviceConfigs = new [] { new EbsBlockDeviceConfigProperty {
VolumeSpecification = new VolumeSpecificationProperty {
SizeInGb = 123,
VolumeType = "volumeType",
// the properties below are optional
Iops = 123
},
// the properties below are optional
VolumesPerInstance = 123
} },
EbsOptimized = false
},
WeightedCapacity = 123
} },
LaunchSpecifications = new InstanceFleetProvisioningSpecificationsProperty {
OnDemandSpecification = new OnDemandProvisioningSpecificationProperty {
AllocationStrategy = "allocationStrategy"
},
SpotSpecification = new SpotProvisioningSpecificationProperty {
TimeoutAction = "timeoutAction",
TimeoutDurationMinutes = 123,
// the properties below are optional
AllocationStrategy = "allocationStrategy",
BlockDurationMinutes = 123
}
},
Name = "name",
TargetOnDemandCapacity = 123,
TargetSpotCapacity = 123
} },
TaskInstanceGroups = new [] { new InstanceGroupConfigProperty {
InstanceCount = 123,
InstanceType = "instanceType",
// the properties below are optional
AutoScalingPolicy = new AutoScalingPolicyProperty {
Constraints = new ScalingConstraintsProperty {
MaxCapacity = 123,
MinCapacity = 123
},
Rules = new [] { new ScalingRuleProperty {
Action = new ScalingActionProperty {
SimpleScalingPolicyConfiguration = new SimpleScalingPolicyConfigurationProperty {
ScalingAdjustment = 123,
// the properties below are optional
AdjustmentType = "adjustmentType",
CoolDown = 123
},
// the properties below are optional
Market = "market"
},
Name = "name",
Trigger = new ScalingTriggerProperty {
CloudWatchAlarmDefinition = new CloudWatchAlarmDefinitionProperty {
ComparisonOperator = "comparisonOperator",
MetricName = "metricName",
Period = 123,
Threshold = 123,
// the properties below are optional
Dimensions = new [] { new MetricDimensionProperty {
Key = "key",
Value = "value"
} },
EvaluationPeriods = 123,
Namespace = "namespace",
Statistic = "statistic",
Unit = "unit"
}
},
// the properties below are optional
Description = "description"
} }
},
BidPrice = "bidPrice",
Configurations = new [] { new ConfigurationProperty {
Classification = "classification",
ConfigurationProperties = new Dictionary<string, string> {
{ "configurationPropertiesKey", "configurationProperties" }
},
Configurations = new [] { configurationProperty_ }
} },
CustomAmiId = "customAmiId",
EbsConfiguration = new EbsConfigurationProperty {
EbsBlockDeviceConfigs = new [] { new EbsBlockDeviceConfigProperty {
VolumeSpecification = new VolumeSpecificationProperty {
SizeInGb = 123,
VolumeType = "volumeType",
// the properties below are optional
Iops = 123
},
// the properties below are optional
VolumesPerInstance = 123
} },
EbsOptimized = false
},
Market = "market",
Name = "name"
} },
TerminationProtected = false
};
Synopsis
Constructors
JobFlowInstancesConfigProperty() |
Properties
AdditionalMasterSecurityGroups | A list of additional Amazon EC2 security group IDs for the master node. |
AdditionalSlaveSecurityGroups | A list of additional Amazon EC2 security group IDs for the core and task nodes. |
CoreInstanceFleet | Describes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration. |
CoreInstanceGroup | Describes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration. |
Ec2KeyName | The name of the Amazon EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop.". |
Ec2SubnetId | Applies to clusters that use the uniform instance group configuration. |
Ec2SubnetIds | Applies to clusters that use the instance fleet configuration. |
EmrManagedMasterSecurityGroup | The identifier of the Amazon EC2 security group for the master node. |
EmrManagedSlaveSecurityGroup | The identifier of the Amazon EC2 security group for the core and task nodes. |
HadoopVersion | Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the |
KeepJobFlowAliveWhenNoSteps | Specifies whether the cluster should remain available after completing all steps. |
MasterInstanceFleet | Describes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration. |
MasterInstanceGroup | Describes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration. |
Placement | The Availability Zone in which the cluster runs. |
ServiceAccessSecurityGroup | The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets. |
TaskInstanceFleets | Describes the EC2 instances and instance configurations for the task instance fleets when using clusters with the instance fleet configuration. |
TaskInstanceGroups | Describes the EC2 instances and instance configurations for task instance groups when using clusters with the uniform instance group configuration. |
TerminationProtected | Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error. |
Constructors
JobFlowInstancesConfigProperty()
public JobFlowInstancesConfigProperty()
Properties
AdditionalMasterSecurityGroups
A list of additional Amazon EC2 security group IDs for the master node.
public string[] AdditionalMasterSecurityGroups { get; set; }
Property Value
System.String[]
Remarks
AdditionalSlaveSecurityGroups
A list of additional Amazon EC2 security group IDs for the core and task nodes.
public string[] AdditionalSlaveSecurityGroups { get; set; }
Property Value
System.String[]
Remarks
CoreInstanceFleet
Describes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration.
public object CoreInstanceFleet { get; set; }
Property Value
System.Object
Remarks
CoreInstanceGroup
Describes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration.
public object CoreInstanceGroup { get; set; }
Property Value
System.Object
Remarks
Ec2KeyName
The name of the Amazon EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop.".
public string Ec2KeyName { get; set; }
Property Value
System.String
Remarks
Ec2SubnetId
Applies to clusters that use the uniform instance group configuration.
public string Ec2SubnetId { get; set; }
Property Value
System.String
Remarks
To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches in EC2-Classic.
Ec2SubnetIds
Applies to clusters that use the instance fleet configuration.
public string[] Ec2SubnetIds { get; set; }
Property Value
System.String[]
Remarks
When multiple Amazon EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
EmrManagedMasterSecurityGroup
The identifier of the Amazon EC2 security group for the master node.
public string EmrManagedMasterSecurityGroup { get; set; }
Property Value
System.String
Remarks
If you specify EmrManagedMasterSecurityGroup
, you must also specify EmrManagedSlaveSecurityGroup
.
EmrManagedSlaveSecurityGroup
The identifier of the Amazon EC2 security group for the core and task nodes.
public string EmrManagedSlaveSecurityGroup { get; set; }
Property Value
System.String
Remarks
If you specify EmrManagedSlaveSecurityGroup
, you must also specify EmrManagedMasterSecurityGroup
.
HadoopVersion
Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion
parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.
public string HadoopVersion { get; set; }
Property Value
System.String
Remarks
KeepJobFlowAliveWhenNoSteps
Specifies whether the cluster should remain available after completing all steps.
public object KeepJobFlowAliveWhenNoSteps { get; set; }
Property Value
System.Object
Remarks
Defaults to true
. For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide .
MasterInstanceFleet
Describes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration.
public object MasterInstanceFleet { get; set; }
Property Value
System.Object
Remarks
MasterInstanceGroup
Describes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration.
public object MasterInstanceGroup { get; set; }
Property Value
System.Object
Remarks
Placement
The Availability Zone in which the cluster runs.
public object Placement { get; set; }
Property Value
System.Object
Remarks
ServiceAccessSecurityGroup
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
public string ServiceAccessSecurityGroup { get; set; }
Property Value
System.String
Remarks
TaskInstanceFleets
Describes the EC2 instances and instance configurations for the task instance fleets when using clusters with the instance fleet configuration.
public object TaskInstanceFleets { get; set; }
Property Value
System.Object
Remarks
These task instance fleets are added to the cluster as part of the cluster launch. Each task instance fleet must have a unique name specified so that CloudFormation can differentiate between the task instance fleets.
You can currently specify only one task instance fleet for a cluster. After creating the cluster, you can only modify the mutable properties of InstanceFleetConfig
, which are TargetOnDemandCapacity
and TargetSpotCapacity
. Modifying any other property results in cluster replacement. > To allow a maximum of 30 Amazon EC2 instance types per fleet, include TaskInstanceFleets
when you create your cluster. If you create your cluster without TaskInstanceFleets
, Amazon EMR uses its default allocation strategy, which allows for a maximum of five Amazon EC2 instance types.
TaskInstanceGroups
Describes the EC2 instances and instance configurations for task instance groups when using clusters with the uniform instance group configuration.
public object TaskInstanceGroups { get; set; }
Property Value
System.Object
Remarks
These task instance groups are added to the cluster as part of the cluster launch. Each task instance group must have a unique name specified so that CloudFormation can differentiate between the task instance groups.
After creating the cluster, you can only modify the mutable properties of InstanceGroupConfig
, which are AutoScalingPolicy
and InstanceCount
. Modifying any other property results in cluster replacement.
TerminationProtected
Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.
public object TerminationProtected { get; set; }
Property Value
System.Object