Skip to content
v2.278.0

InstanceGroupConfigProperty Struct ​

Configuration defining a new instance group.

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_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';

declare const configurationProperty_: stepfunctions_tasks.EmrCreateCluster.ConfigurationProperty;
declare const size: cdk.Size;
const instanceGroupConfigProperty: stepfunctions_tasks.EmrCreateCluster.InstanceGroupConfigProperty = {
  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',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks

# configuration_property_: stepfunctions_tasks.EmrCreateCluster.ConfigurationProperty
# size: cdk.Size

instance_group_config_property = stepfunctions_tasks.EmrCreateCluster.InstanceGroupConfigProperty(
    instance_count=123,
    instance_role=stepfunctions_tasks.EmrCreateCluster.InstanceRoleType.MASTER,
    instance_type="instanceType",

    # the properties below are optional
    auto_scaling_policy=stepfunctions_tasks.EmrCreateCluster.AutoScalingPolicyProperty(
        constraints=stepfunctions_tasks.EmrCreateCluster.ScalingConstraintsProperty(
            max_capacity=123,
            min_capacity=123
        ),
        rules=[stepfunctions_tasks.EmrCreateCluster.ScalingRuleProperty(
            action=stepfunctions_tasks.EmrCreateCluster.ScalingActionProperty(
                simple_scaling_policy_configuration=stepfunctions_tasks.EmrCreateCluster.SimpleScalingPolicyConfigurationProperty(
                    scaling_adjustment=123,

                    # the properties below are optional
                    adjustment_type=stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType.CHANGE_IN_CAPACITY,
                    cool_down=123
                ),

                # the properties below are optional
                market=stepfunctions_tasks.EmrCreateCluster.InstanceMarket.ON_DEMAND
            ),
            name="name",
            trigger=stepfunctions_tasks.EmrCreateCluster.ScalingTriggerProperty(
                cloud_watch_alarm_definition=stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmDefinitionProperty(
                    comparison_operator=stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator.GREATER_THAN_OR_EQUAL,
                    metric_name="metricName",
                    period=cdk.Duration.minutes(30),

                    # the properties below are optional
                    dimensions=[stepfunctions_tasks.EmrCreateCluster.MetricDimensionProperty(
                        key="key",
                        value="value"
                    )],
                    evaluation_periods=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"
        )]
    ),
    bid_price="bidPrice",
    configurations=[stepfunctions_tasks.EmrCreateCluster.ConfigurationProperty(
        classification="classification",
        configurations=[configuration_property_],
        properties={
            "properties_key": "properties"
        }
    )],
    ebs_configuration=stepfunctions_tasks.EmrCreateCluster.EbsConfigurationProperty(
        ebs_block_device_configs=[stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceConfigProperty(
            volume_specification=stepfunctions_tasks.EmrCreateCluster.VolumeSpecificationProperty(
                volume_size=size,
                volume_type=stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType.GP3,

                # the properties below are optional
                iops=123
            ),

            # the properties below are optional
            volumes_per_instance=123
        )],
        ebs_optimized=False
    ),
    market=stepfunctions_tasks.EmrCreateCluster.InstanceMarket.ON_DEMAND,
    name="name"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.stepfunctions.tasks.*;

ConfigurationProperty configurationProperty_;
Size size;

InstanceGroupConfigProperty instanceGroupConfigProperty = InstanceGroupConfigProperty.builder()
        .instanceCount(123)
        .instanceRole(EmrCreateCluster.getInstanceRoleType().MASTER)
        .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(EmrCreateCluster.getScalingAdjustmentType().CHANGE_IN_CAPACITY)
                                        .coolDown(123)
                                        .build())

                                // the properties below are optional
                                .market(EmrCreateCluster.getInstanceMarket().ON_DEMAND)
                                .build())
                        .name("name")
                        .trigger(ScalingTriggerProperty.builder()
                                .cloudWatchAlarmDefinition(CloudWatchAlarmDefinitionProperty.builder()
                                        .comparisonOperator(EmrCreateCluster.getCloudWatchAlarmComparisonOperator().GREATER_THAN_OR_EQUAL)
                                        .metricName("metricName")
                                        .period(Duration.minutes(30))

                                        // the properties below are optional
                                        .dimensions(List.of(MetricDimensionProperty.builder()
                                                .key("key")
                                                .value("value")
                                                .build()))
                                        .evaluationPeriods(123)
                                        .namespace("namespace")
                                        .statistic(EmrCreateCluster.getCloudWatchAlarmStatistic().SAMPLE_COUNT)
                                        .threshold(123)
                                        .unit(EmrCreateCluster.getCloudWatchAlarmUnit().NONE)
                                        .build())
                                .build())

                        // the properties below are optional
                        .description("description")
                        .build()))
                .build())
        .bidPrice("bidPrice")
        .configurations(List.of(ConfigurationProperty.builder()
                .classification("classification")
                .configurations(List.of(configurationProperty_))
                .properties(Map.of(
                        "propertiesKey", "properties"))
                .build()))
        .ebsConfiguration(EbsConfigurationProperty.builder()
                .ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
                        .volumeSpecification(VolumeSpecificationProperty.builder()
                                .volumeSize(size)
                                .volumeType(EmrCreateCluster.getEbsBlockDeviceVolumeType().GP3)

                                // the properties below are optional
                                .iops(123)
                                .build())

                        // the properties below are optional
                        .volumesPerInstance(123)
                        .build()))
                .ebsOptimized(false)
                .build())
        .market(EmrCreateCluster.getInstanceMarket().ON_DEMAND)
        .name("name")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.StepFunctions.Tasks;

ConfigurationProperty configurationProperty_;
Size size;

var instanceGroupConfigProperty = new InstanceGroupConfigProperty {
    InstanceCount = 123,
    InstanceRole = EmrCreateCluster.InstanceRoleType.MASTER,
    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 = EmrCreateCluster.ScalingAdjustmentType.CHANGE_IN_CAPACITY,
                    CoolDown = 123
                },

                // the properties below are optional
                Market = EmrCreateCluster.InstanceMarket.ON_DEMAND
            },
            Name = "name",
            Trigger = new ScalingTriggerProperty {
                CloudWatchAlarmDefinition = new CloudWatchAlarmDefinitionProperty {
                    ComparisonOperator = EmrCreateCluster.CloudWatchAlarmComparisonOperator.GREATER_THAN_OR_EQUAL,
                    MetricName = "metricName",
                    Period = Duration.Minutes(30),

                    // the properties below are optional
                    Dimensions = new [] { new MetricDimensionProperty {
                        Key = "key",
                        Value = "value"
                    } },
                    EvaluationPeriods = 123,
                    Namespace = "namespace",
                    Statistic = EmrCreateCluster.CloudWatchAlarmStatistic.SAMPLE_COUNT,
                    Threshold = 123,
                    Unit = EmrCreateCluster.CloudWatchAlarmUnit.NONE
                }
            },

            // the properties below are optional
            Description = "description"
        } }
    },
    BidPrice = "bidPrice",
    Configurations = new [] { new ConfigurationProperty {
        Classification = "classification",
        Configurations = new [] { configurationProperty_ },
        Properties = new Dictionary<string, string> {
            { "propertiesKey", "properties" }
        }
    } },
    EbsConfiguration = new EbsConfigurationProperty {
        EbsBlockDeviceConfigs = new [] { new EbsBlockDeviceConfigProperty {
            VolumeSpecification = new VolumeSpecificationProperty {
                VolumeSize = size,
                VolumeType = EmrCreateCluster.EbsBlockDeviceVolumeType.GP3,

                // the properties below are optional
                Iops = 123
            },

            // the properties below are optional
            VolumesPerInstance = 123
        } },
        EbsOptimized = false
    },
    Market = EmrCreateCluster.InstanceMarket.ON_DEMAND,
    Name = "name"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var configurationProperty_ ConfigurationProperty
var size Size

instanceGroupConfigProperty := &InstanceGroupConfigProperty{
	InstanceCount: jsii.Number(123),
	InstanceRole: awscdk.Aws_stepfunctions_tasks.EmrCreateCluster.InstanceRoleType_MASTER,
	InstanceType: jsii.String("instanceType"),

	// the properties below are optional
	AutoScalingPolicy: &AutoScalingPolicyProperty{
		Constraints: &ScalingConstraintsProperty{
			MaxCapacity: jsii.Number(123),
			MinCapacity: jsii.Number(123),
		},
		Rules: []ScalingRuleProperty{
			&ScalingRuleProperty{
				Action: &ScalingActionProperty{
					SimpleScalingPolicyConfiguration: &SimpleScalingPolicyConfigurationProperty{
						ScalingAdjustment: jsii.Number(123),

						// the properties below are optional
						AdjustmentType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType_CHANGE_IN_CAPACITY,
						CoolDown: jsii.Number(123),
					},

					// the properties below are optional
					Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND,
				},
				Name: jsii.String("name"),
				Trigger: &ScalingTriggerProperty{
					CloudWatchAlarmDefinition: &CloudWatchAlarmDefinitionProperty{
						ComparisonOperator: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator_GREATER_THAN_OR_EQUAL,
						MetricName: jsii.String("metricName"),
						Period: cdk.Duration_Minutes(jsii.Number(30)),

						// the properties below are optional
						Dimensions: []MetricDimensionProperty{
							&MetricDimensionProperty{
								Key: jsii.String("key"),
								Value: jsii.String("value"),
							},
						},
						EvaluationPeriods: jsii.Number(123),
						Namespace: jsii.String("namespace"),
						Statistic: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic_SAMPLE_COUNT,
						Threshold: jsii.Number(123),
						Unit: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit_NONE,
					},
				},

				// the properties below are optional
				Description: jsii.String("description"),
			},
		},
	},
	BidPrice: jsii.String("bidPrice"),
	Configurations: []ConfigurationProperty{
		&ConfigurationProperty{
			Classification: jsii.String("classification"),
			Configurations: []ConfigurationProperty{
				configurationProperty_,
			},
			Properties: map[string]*string{
				"propertiesKey": jsii.String("properties"),
			},
		},
	},
	EbsConfiguration: &EbsConfigurationProperty{
		EbsBlockDeviceConfigs: []EbsBlockDeviceConfigProperty{
			&EbsBlockDeviceConfigProperty{
				VolumeSpecification: &VolumeSpecificationProperty{
					VolumeSize: size,
					VolumeType: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType_GP3,

					// the properties below are optional
					Iops: jsii.Number(123),
				},

				// the properties below are optional
				VolumesPerInstance: jsii.Number(123),
			},
		},
		EbsOptimized: jsii.Boolean(false),
	},
	Market: awscdk.*Aws_stepfunctions_tasks.EmrCreateCluster.InstanceMarket_ON_DEMAND,
	Name: jsii.String("name"),
}

Properties ​

autoScalingPolicyoptionalEmrCreateCluster.AutoScalingPolicyPropertyauto_scaling_policyoptionalAutoScalingPolicyPropertyautoScalingPolicyoptionalAutoScalingPolicyPropertyAutoScalingPolicyoptionalAutoScalingPolicyPropertyAutoScalingPolicyoptionalAutoScalingPolicyProperty = None #
An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster.
bidPriceoptionalstringbid_priceoptionalstrbidPriceoptionalStringBidPriceoptionalstringBidPriceoptional*string = None #
The bid price for each EC2 Spot instance type as defined by InstanceType.

Expressed in USD.

configurationsoptionalEmrCreateCluster.ConfigurationProperty[]configurationsoptionaltyping.List[ConfigurationProperty]configurationsoptionalList<ConfigurationProperty>ConfigurationsoptionalConfigurationProperty[]Configurationsoptional*[]ConfigurationProperty = None #
The list of configurations supplied for an EMR cluster instance group.
ebsConfigurationoptionalEmrCreateCluster.EbsConfigurationPropertyebs_configurationoptionalEbsConfigurationPropertyebsConfigurationoptionalEbsConfigurationPropertyEbsConfigurationoptionalEbsConfigurationPropertyEbsConfigurationoptionalEbsConfigurationProperty = None #
EBS configurations that will be attached to each EC2 instance in the instance group.
instanceCountnumberinstance_countint | floatinstanceCountNumberInstanceCountdoubleInstanceCount*float64 required #
Target number of instances for the instance group.
instanceRoleEmrCreateCluster.InstanceRoleTypeinstance_roleInstanceRoleTypeinstanceRoleInstanceRoleTypeInstanceRoleInstanceRoleTypeInstanceRoleInstanceRoleType required #
The role of the instance group in the cluster.
instanceTypestringinstance_typestrinstanceTypeStringInstanceTypestringInstanceType*string required #
The EC2 instance type for all instances in the instance group.
marketoptionalEmrCreateCluster.InstanceMarketmarketoptionalInstanceMarketmarketoptionalInstanceMarketMarketoptionalInstanceMarketMarketoptionalInstanceMarket #
Market type of the EC2 instances used to create a cluster node.

Default: EMR selected default

nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string = None #
Friendly name given to the instance group.