Interface CfnCluster.JobFlowInstancesConfigProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnCluster.JobFlowInstancesConfigProperty.Jsii$Proxy
Enclosing class:
CfnCluster

@Stability(Stable) public static interface CfnCluster.JobFlowInstancesConfigProperty extends software.amazon.jsii.JsiiSerializable
JobFlowInstancesConfig is a property of the AWS::EMR::Cluster resource.

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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.emr.*;
 ConfigurationProperty configurationProperty_;
 JobFlowInstancesConfigProperty jobFlowInstancesConfigProperty = JobFlowInstancesConfigProperty.builder()
         .additionalMasterSecurityGroups(List.of("additionalMasterSecurityGroups"))
         .additionalSlaveSecurityGroups(List.of("additionalSlaveSecurityGroups"))
         .coreInstanceFleet(InstanceFleetConfigProperty.builder()
                 .instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
                         .instanceType("instanceType")
                         // the properties below are optional
                         .bidPrice("bidPrice")
                         .bidPriceAsPercentageOfOnDemandPrice(123)
                         .configurations(List.of(ConfigurationProperty.builder()
                                 .classification("classification")
                                 .configurationProperties(Map.of(
                                         "configurationPropertiesKey", "configurationProperties"))
                                 .configurations(List.of(configurationProperty_))
                                 .build()))
                         .customAmiId("customAmiId")
                         .ebsConfiguration(EbsConfigurationProperty.builder()
                                 .ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
                                         .volumeSpecification(VolumeSpecificationProperty.builder()
                                                 .sizeInGb(123)
                                                 .volumeType("volumeType")
                                                 // the properties below are optional
                                                 .iops(123)
                                                 .throughput(123)
                                                 .build())
                                         // the properties below are optional
                                         .volumesPerInstance(123)
                                         .build()))
                                 .ebsOptimized(false)
                                 .build())
                         .priority(123)
                         .weightedCapacity(123)
                         .build()))
                 .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
                         .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
                                 .allocationStrategy("allocationStrategy")
                                 // the properties below are optional
                                 .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
                                         .capacityReservationPreference("capacityReservationPreference")
                                         .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                                         .usageStrategy("usageStrategy")
                                         .build())
                                 .build())
                         .spotSpecification(SpotProvisioningSpecificationProperty.builder()
                                 .timeoutAction("timeoutAction")
                                 .timeoutDurationMinutes(123)
                                 // the properties below are optional
                                 .allocationStrategy("allocationStrategy")
                                 .blockDurationMinutes(123)
                                 .build())
                         .build())
                 .name("name")
                 .resizeSpecifications(InstanceFleetResizingSpecificationsProperty.builder()
                         .onDemandResizeSpecification(OnDemandResizingSpecificationProperty.builder()
                                 .allocationStrategy("allocationStrategy")
                                 .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
                                         .capacityReservationPreference("capacityReservationPreference")
                                         .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                                         .usageStrategy("usageStrategy")
                                         .build())
                                 .timeoutDurationMinutes(123)
                                 .build())
                         .spotResizeSpecification(SpotResizingSpecificationProperty.builder()
                                 .allocationStrategy("allocationStrategy")
                                 .timeoutDurationMinutes(123)
                                 .build())
                         .build())
                 .targetOnDemandCapacity(123)
                 .targetSpotCapacity(123)
                 .build())
         .coreInstanceGroup(InstanceGroupConfigProperty.builder()
                 .instanceCount(123)
                 .instanceType("instanceType")
                 // the properties below are optional
                 .autoScalingPolicy(AutoScalingPolicyProperty.builder()
                         .constraints(ScalingConstraintsProperty.builder()
                                 .maxCapacity(123)
                                 .minCapacity(123)
                                 .build())
                         .rules(List.of(ScalingRuleProperty.builder()
                                 .action(ScalingActionProperty.builder()
                                         .simpleScalingPolicyConfiguration(SimpleScalingPolicyConfigurationProperty.builder()
                                                 .scalingAdjustment(123)
                                                 // the properties below are optional
                                                 .adjustmentType("adjustmentType")
                                                 .coolDown(123)
                                                 .build())
                                         // the properties below are optional
                                         .market("market")
                                         .build())
                                 .name("name")
                                 .trigger(ScalingTriggerProperty.builder()
                                         .cloudWatchAlarmDefinition(CloudWatchAlarmDefinitionProperty.builder()
                                                 .comparisonOperator("comparisonOperator")
                                                 .metricName("metricName")
                                                 .period(123)
                                                 .threshold(123)
                                                 // the properties below are optional
                                                 .dimensions(List.of(MetricDimensionProperty.builder()
                                                         .key("key")
                                                         .value("value")
                                                         .build()))
                                                 .evaluationPeriods(123)
                                                 .namespace("namespace")
                                                 .statistic("statistic")
                                                 .unit("unit")
                                                 .build())
                                         .build())
                                 // the properties below are optional
                                 .description("description")
                                 .build()))
                         .build())
                 .bidPrice("bidPrice")
                 .configurations(List.of(ConfigurationProperty.builder()
                         .classification("classification")
                         .configurationProperties(Map.of(
                                 "configurationPropertiesKey", "configurationProperties"))
                         .configurations(List.of(configurationProperty_))
                         .build()))
                 .customAmiId("customAmiId")
                 .ebsConfiguration(EbsConfigurationProperty.builder()
                         .ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
                                 .volumeSpecification(VolumeSpecificationProperty.builder()
                                         .sizeInGb(123)
                                         .volumeType("volumeType")
                                         // the properties below are optional
                                         .iops(123)
                                         .throughput(123)
                                         .build())
                                 // the properties below are optional
                                 .volumesPerInstance(123)
                                 .build()))
                         .ebsOptimized(false)
                         .build())
                 .market("market")
                 .name("name")
                 .build())
         .ec2KeyName("ec2KeyName")
         .ec2SubnetId("ec2SubnetId")
         .ec2SubnetIds(List.of("ec2SubnetIds"))
         .emrManagedMasterSecurityGroup("emrManagedMasterSecurityGroup")
         .emrManagedSlaveSecurityGroup("emrManagedSlaveSecurityGroup")
         .hadoopVersion("hadoopVersion")
         .keepJobFlowAliveWhenNoSteps(false)
         .masterInstanceFleet(InstanceFleetConfigProperty.builder()
                 .instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
                         .instanceType("instanceType")
                         // the properties below are optional
                         .bidPrice("bidPrice")
                         .bidPriceAsPercentageOfOnDemandPrice(123)
                         .configurations(List.of(ConfigurationProperty.builder()
                                 .classification("classification")
                                 .configurationProperties(Map.of(
                                         "configurationPropertiesKey", "configurationProperties"))
                                 .configurations(List.of(configurationProperty_))
                                 .build()))
                         .customAmiId("customAmiId")
                         .ebsConfiguration(EbsConfigurationProperty.builder()
                                 .ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
                                         .volumeSpecification(VolumeSpecificationProperty.builder()
                                                 .sizeInGb(123)
                                                 .volumeType("volumeType")
                                                 // the properties below are optional
                                                 .iops(123)
                                                 .throughput(123)
                                                 .build())
                                         // the properties below are optional
                                         .volumesPerInstance(123)
                                         .build()))
                                 .ebsOptimized(false)
                                 .build())
                         .priority(123)
                         .weightedCapacity(123)
                         .build()))
                 .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
                         .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
                                 .allocationStrategy("allocationStrategy")
                                 // the properties below are optional
                                 .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
                                         .capacityReservationPreference("capacityReservationPreference")
                                         .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                                         .usageStrategy("usageStrategy")
                                         .build())
                                 .build())
                         .spotSpecification(SpotProvisioningSpecificationProperty.builder()
                                 .timeoutAction("timeoutAction")
                                 .timeoutDurationMinutes(123)
                                 // the properties below are optional
                                 .allocationStrategy("allocationStrategy")
                                 .blockDurationMinutes(123)
                                 .build())
                         .build())
                 .name("name")
                 .resizeSpecifications(InstanceFleetResizingSpecificationsProperty.builder()
                         .onDemandResizeSpecification(OnDemandResizingSpecificationProperty.builder()
                                 .allocationStrategy("allocationStrategy")
                                 .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
                                         .capacityReservationPreference("capacityReservationPreference")
                                         .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                                         .usageStrategy("usageStrategy")
                                         .build())
                                 .timeoutDurationMinutes(123)
                                 .build())
                         .spotResizeSpecification(SpotResizingSpecificationProperty.builder()
                                 .allocationStrategy("allocationStrategy")
                                 .timeoutDurationMinutes(123)
                                 .build())
                         .build())
                 .targetOnDemandCapacity(123)
                 .targetSpotCapacity(123)
                 .build())
         .masterInstanceGroup(InstanceGroupConfigProperty.builder()
                 .instanceCount(123)
                 .instanceType("instanceType")
                 // the properties below are optional
                 .autoScalingPolicy(AutoScalingPolicyProperty.builder()
                         .constraints(ScalingConstraintsProperty.builder()
                                 .maxCapacity(123)
                                 .minCapacity(123)
                                 .build())
                         .rules(List.of(ScalingRuleProperty.builder()
                                 .action(ScalingActionProperty.builder()
                                         .simpleScalingPolicyConfiguration(SimpleScalingPolicyConfigurationProperty.builder()
                                                 .scalingAdjustment(123)
                                                 // the properties below are optional
                                                 .adjustmentType("adjustmentType")
                                                 .coolDown(123)
                                                 .build())
                                         // the properties below are optional
                                         .market("market")
                                         .build())
                                 .name("name")
                                 .trigger(ScalingTriggerProperty.builder()
                                         .cloudWatchAlarmDefinition(CloudWatchAlarmDefinitionProperty.builder()
                                                 .comparisonOperator("comparisonOperator")
                                                 .metricName("metricName")
                                                 .period(123)
                                                 .threshold(123)
                                                 // the properties below are optional
                                                 .dimensions(List.of(MetricDimensionProperty.builder()
                                                         .key("key")
                                                         .value("value")
                                                         .build()))
                                                 .evaluationPeriods(123)
                                                 .namespace("namespace")
                                                 .statistic("statistic")
                                                 .unit("unit")
                                                 .build())
                                         .build())
                                 // the properties below are optional
                                 .description("description")
                                 .build()))
                         .build())
                 .bidPrice("bidPrice")
                 .configurations(List.of(ConfigurationProperty.builder()
                         .classification("classification")
                         .configurationProperties(Map.of(
                                 "configurationPropertiesKey", "configurationProperties"))
                         .configurations(List.of(configurationProperty_))
                         .build()))
                 .customAmiId("customAmiId")
                 .ebsConfiguration(EbsConfigurationProperty.builder()
                         .ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
                                 .volumeSpecification(VolumeSpecificationProperty.builder()
                                         .sizeInGb(123)
                                         .volumeType("volumeType")
                                         // the properties below are optional
                                         .iops(123)
                                         .throughput(123)
                                         .build())
                                 // the properties below are optional
                                 .volumesPerInstance(123)
                                 .build()))
                         .ebsOptimized(false)
                         .build())
                 .market("market")
                 .name("name")
                 .build())
         .placement(PlacementTypeProperty.builder()
                 .availabilityZone("availabilityZone")
                 .build())
         .serviceAccessSecurityGroup("serviceAccessSecurityGroup")
         .taskInstanceFleets(List.of(InstanceFleetConfigProperty.builder()
                 .instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder()
                         .instanceType("instanceType")
                         // the properties below are optional
                         .bidPrice("bidPrice")
                         .bidPriceAsPercentageOfOnDemandPrice(123)
                         .configurations(List.of(ConfigurationProperty.builder()
                                 .classification("classification")
                                 .configurationProperties(Map.of(
                                         "configurationPropertiesKey", "configurationProperties"))
                                 .configurations(List.of(configurationProperty_))
                                 .build()))
                         .customAmiId("customAmiId")
                         .ebsConfiguration(EbsConfigurationProperty.builder()
                                 .ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
                                         .volumeSpecification(VolumeSpecificationProperty.builder()
                                                 .sizeInGb(123)
                                                 .volumeType("volumeType")
                                                 // the properties below are optional
                                                 .iops(123)
                                                 .throughput(123)
                                                 .build())
                                         // the properties below are optional
                                         .volumesPerInstance(123)
                                         .build()))
                                 .ebsOptimized(false)
                                 .build())
                         .priority(123)
                         .weightedCapacity(123)
                         .build()))
                 .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder()
                         .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
                                 .allocationStrategy("allocationStrategy")
                                 // the properties below are optional
                                 .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
                                         .capacityReservationPreference("capacityReservationPreference")
                                         .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                                         .usageStrategy("usageStrategy")
                                         .build())
                                 .build())
                         .spotSpecification(SpotProvisioningSpecificationProperty.builder()
                                 .timeoutAction("timeoutAction")
                                 .timeoutDurationMinutes(123)
                                 // the properties below are optional
                                 .allocationStrategy("allocationStrategy")
                                 .blockDurationMinutes(123)
                                 .build())
                         .build())
                 .name("name")
                 .resizeSpecifications(InstanceFleetResizingSpecificationsProperty.builder()
                         .onDemandResizeSpecification(OnDemandResizingSpecificationProperty.builder()
                                 .allocationStrategy("allocationStrategy")
                                 .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
                                         .capacityReservationPreference("capacityReservationPreference")
                                         .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                                         .usageStrategy("usageStrategy")
                                         .build())
                                 .timeoutDurationMinutes(123)
                                 .build())
                         .spotResizeSpecification(SpotResizingSpecificationProperty.builder()
                                 .allocationStrategy("allocationStrategy")
                                 .timeoutDurationMinutes(123)
                                 .build())
                         .build())
                 .targetOnDemandCapacity(123)
                 .targetSpotCapacity(123)
                 .build()))
         .taskInstanceGroups(List.of(InstanceGroupConfigProperty.builder()
                 .instanceCount(123)
                 .instanceType("instanceType")
                 // the properties below are optional
                 .autoScalingPolicy(AutoScalingPolicyProperty.builder()
                         .constraints(ScalingConstraintsProperty.builder()
                                 .maxCapacity(123)
                                 .minCapacity(123)
                                 .build())
                         .rules(List.of(ScalingRuleProperty.builder()
                                 .action(ScalingActionProperty.builder()
                                         .simpleScalingPolicyConfiguration(SimpleScalingPolicyConfigurationProperty.builder()
                                                 .scalingAdjustment(123)
                                                 // the properties below are optional
                                                 .adjustmentType("adjustmentType")
                                                 .coolDown(123)
                                                 .build())
                                         // the properties below are optional
                                         .market("market")
                                         .build())
                                 .name("name")
                                 .trigger(ScalingTriggerProperty.builder()
                                         .cloudWatchAlarmDefinition(CloudWatchAlarmDefinitionProperty.builder()
                                                 .comparisonOperator("comparisonOperator")
                                                 .metricName("metricName")
                                                 .period(123)
                                                 .threshold(123)
                                                 // the properties below are optional
                                                 .dimensions(List.of(MetricDimensionProperty.builder()
                                                         .key("key")
                                                         .value("value")
                                                         .build()))
                                                 .evaluationPeriods(123)
                                                 .namespace("namespace")
                                                 .statistic("statistic")
                                                 .unit("unit")
                                                 .build())
                                         .build())
                                 // the properties below are optional
                                 .description("description")
                                 .build()))
                         .build())
                 .bidPrice("bidPrice")
                 .configurations(List.of(ConfigurationProperty.builder()
                         .classification("classification")
                         .configurationProperties(Map.of(
                                 "configurationPropertiesKey", "configurationProperties"))
                         .configurations(List.of(configurationProperty_))
                         .build()))
                 .customAmiId("customAmiId")
                 .ebsConfiguration(EbsConfigurationProperty.builder()
                         .ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
                                 .volumeSpecification(VolumeSpecificationProperty.builder()
                                         .sizeInGb(123)
                                         .volumeType("volumeType")
                                         // the properties below are optional
                                         .iops(123)
                                         .throughput(123)
                                         .build())
                                 // the properties below are optional
                                 .volumesPerInstance(123)
                                 .build()))
                         .ebsOptimized(false)
                         .build())
                 .market("market")
                 .name("name")
                 .build()))
         .terminationProtected(false)
         .unhealthyNodeReplacement(false)
         .build();
 

See Also: