Skip to content
v2.278.0

CfnInstanceGroupConfigProps Struct ​

Properties for defining a CfnInstanceGroupConfig.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_emr as emr } from 'aws-cdk-lib';

declare const configurationProperty_: emr.CfnInstanceGroupConfig.ConfigurationProperty;
const cfnInstanceGroupConfigProps: emr.CfnInstanceGroupConfigProps = {
  instanceCount: 123,
  instanceRole: 'instanceRole',
  instanceType: 'instanceType',
  jobFlowId: 'jobFlowId',

  // the properties below are optional
  autoScalingPolicy: {
    constraints: {
      maxCapacity: 123,
      minCapacity: 123,
    },
    rules: [{
      action: {
        simpleScalingPolicyConfiguration: {
          scalingAdjustment: 123,

          // the properties below are optional
          adjustmentType: 'adjustmentType',
          coolDown: 123,
        },

        // the properties below are optional
        market: 'market',
      },
      name: 'name',
      trigger: {
        cloudWatchAlarmDefinition: {
          comparisonOperator: 'comparisonOperator',
          metricName: 'metricName',
          period: 123,
          threshold: 123,

          // the properties below are optional
          dimensions: [{
            key: 'key',
            value: 'value',
          }],
          evaluationPeriods: 123,
          namespace: 'namespace',
          statistic: 'statistic',
          unit: 'unit',
        },
      },

      // the properties below are optional
      description: 'description',
    }],
  },
  bidPrice: 'bidPrice',
  configurations: [{
    classification: 'classification',
    configurationProperties: {
      configurationPropertiesKey: 'configurationProperties',
    },
    configurations: [configurationProperty_],
  }],
  customAmiId: 'customAmiId',
  ebsConfiguration: {
    ebsBlockDeviceConfigs: [{
      volumeSpecification: {
        sizeInGb: 123,
        volumeType: 'volumeType',

        // the properties below are optional
        iops: 123,
        throughput: 123,
      },

      // the properties below are optional
      volumesPerInstance: 123,
    }],
    ebsOptimized: false,
  },
  market: 'market',
  name: 'name',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_emr as emr

# configuration_property_: emr.CfnInstanceGroupConfig.ConfigurationProperty

cfn_instance_group_config_props = emr.CfnInstanceGroupConfigProps(
    instance_count=123,
    instance_role="instanceRole",
    instance_type="instanceType",
    job_flow_id="jobFlowId",

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

                    # the properties below are optional
                    adjustment_type="adjustmentType",
                    cool_down=123
                ),

                # the properties below are optional
                market="market"
            ),
            name="name",
            trigger=emr.CfnInstanceGroupConfig.ScalingTriggerProperty(
                cloud_watch_alarm_definition=emr.CfnInstanceGroupConfig.CloudWatchAlarmDefinitionProperty(
                    comparison_operator="comparisonOperator",
                    metric_name="metricName",
                    period=123,
                    threshold=123,

                    # the properties below are optional
                    dimensions=[emr.CfnInstanceGroupConfig.MetricDimensionProperty(
                        key="key",
                        value="value"
                    )],
                    evaluation_periods=123,
                    namespace="namespace",
                    statistic="statistic",
                    unit="unit"
                )
            ),

            # the properties below are optional
            description="description"
        )]
    ),
    bid_price="bidPrice",
    configurations=[emr.CfnInstanceGroupConfig.ConfigurationProperty(
        classification="classification",
        configuration_properties={
            "configuration_properties_key": "configurationProperties"
        },
        configurations=[configuration_property_]
    )],
    custom_ami_id="customAmiId",
    ebs_configuration=emr.CfnInstanceGroupConfig.EbsConfigurationProperty(
        ebs_block_device_configs=[emr.CfnInstanceGroupConfig.EbsBlockDeviceConfigProperty(
            volume_specification=emr.CfnInstanceGroupConfig.VolumeSpecificationProperty(
                size_in_gb=123,
                volume_type="volumeType",

                # the properties below are optional
                iops=123,
                throughput=123
            ),

            # the properties below are optional
            volumes_per_instance=123
        )],
        ebs_optimized=False
    ),
    market="market",
    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.services.emr.*;

ConfigurationProperty configurationProperty_;

CfnInstanceGroupConfigProps cfnInstanceGroupConfigProps = CfnInstanceGroupConfigProps.builder()
        .instanceCount(123)
        .instanceRole("instanceRole")
        .instanceType("instanceType")
        .jobFlowId("jobFlowId")

        // 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();
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.AWS.EMR;

ConfigurationProperty configurationProperty_;

var cfnInstanceGroupConfigProps = new CfnInstanceGroupConfigProps {
    InstanceCount = 123,
    InstanceRole = "instanceRole",
    InstanceType = "instanceType",
    JobFlowId = "jobFlowId",

    // 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,
                Throughput = 123
            },

            // the properties below are optional
            VolumesPerInstance = 123
        } },
        EbsOptimized = false
    },
    Market = "market",
    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 "github.com/aws/aws-cdk-go/awscdk"

var configurationProperty_ ConfigurationProperty

cfnInstanceGroupConfigProps := &CfnInstanceGroupConfigProps{
	InstanceCount: jsii.Number(123),
	InstanceRole: jsii.String("instanceRole"),
	InstanceType: jsii.String("instanceType"),
	JobFlowId: jsii.String("jobFlowId"),

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

						// the properties below are optional
						AdjustmentType: jsii.String("adjustmentType"),
						CoolDown: jsii.Number(123),
					},

					// the properties below are optional
					Market: jsii.String("market"),
				},
				Name: jsii.String("name"),
				Trigger: &ScalingTriggerProperty{
					CloudWatchAlarmDefinition: &CloudWatchAlarmDefinitionProperty{
						ComparisonOperator: jsii.String("comparisonOperator"),
						MetricName: jsii.String("metricName"),
						Period: jsii.Number(123),
						Threshold: jsii.Number(123),

						// the properties below are optional
						Dimensions: []interface{}{
							&MetricDimensionProperty{
								Key: jsii.String("key"),
								Value: jsii.String("value"),
							},
						},
						EvaluationPeriods: jsii.Number(123),
						Namespace: jsii.String("namespace"),
						Statistic: jsii.String("statistic"),
						Unit: jsii.String("unit"),
					},
				},

				// the properties below are optional
				Description: jsii.String("description"),
			},
		},
	},
	BidPrice: jsii.String("bidPrice"),
	Configurations: []interface{}{
		&ConfigurationProperty{
			Classification: jsii.String("classification"),
			ConfigurationProperties: map[string]*string{
				"configurationPropertiesKey": jsii.String("configurationProperties"),
			},
			Configurations: []interface{}{
				configurationProperty_,
			},
		},
	},
	CustomAmiId: jsii.String("customAmiId"),
	EbsConfiguration: &EbsConfigurationProperty{
		EbsBlockDeviceConfigs: []interface{}{
			&EbsBlockDeviceConfigProperty{
				VolumeSpecification: &VolumeSpecificationProperty{
					SizeInGb: jsii.Number(123),
					VolumeType: jsii.String("volumeType"),

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

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

Properties ​

autoScalingPolicyoptionalIResolvable | CfnInstanceGroupConfig.AutoScalingPolicyPropertyauto_scaling_policyoptionaltyping.Union[IResolvable, AutoScalingPolicyProperty]autoScalingPolicyoptionalIResolvableAutoScalingPolicyoptionalIResolvableAutoScalingPolicyoptionalinterface{} #
`AutoScalingPolicy` is a subproperty of `InstanceGroupConfig` .
notes

AutoScalingPolicy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. For more information, see Using Automatic Scaling in Amazon EMR in the Amazon EMR Management Guide .

bidPriceoptionalstringbid_priceoptionalstrbidPriceoptionalStringBidPriceoptionalstringBidPriceoptional*string #
If specified, indicates that the instance group uses Spot Instances.

This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.

configurationsoptionalIResolvable | IResolvable | CfnInstanceGroupConfig.ConfigurationProperty[]configurationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ConfigurationProperty]]]configurationsoptionalIResolvableConfigurationsoptionalIResolvableConfigurationsoptionalinterface{} #
> Amazon EMR releases 4.x or later.

The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).

customAmiIdoptionalstringcustom_ami_idoptionalstrcustomAmiIdoptionalStringCustomAmiIdoptionalstringCustomAmiIdoptional*string #
The custom AMI ID to use for the provisioned instance group.
ebsConfigurationoptionalIResolvable | CfnInstanceGroupConfig.EbsConfigurationPropertyebs_configurationoptionaltyping.Union[IResolvable, EbsConfigurationProperty]ebsConfigurationoptionalIResolvableEbsConfigurationoptionalIResolvableEbsConfigurationoptionalinterface{} #
`EbsConfiguration` determines the EBS volumes to attach to EMR cluster instances.
instanceCountnumberinstance_countint | floatinstanceCountNumberInstanceCountdoubleInstanceCount*float64 required #
Target number of instances for the instance group.
instanceRolestringinstance_rolestrinstanceRoleStringInstanceRolestringInstanceRole*string required #
The role of the instance group in the cluster.

Allowed Values : TASK

instanceTypestringinstance_typestrinstanceTypeStringInstanceTypestringInstanceType*string required #
The Amazon EC2 instance type for all instances in the instance group.
jobFlowIdstringjob_flow_idstrjobFlowIdStringJobFlowIdstringJobFlowId*string required #
The ID of an Amazon EMR cluster that you want to associate this instance group with.
marketoptionalstringmarketoptionalstrmarketoptionalStringMarketoptionalstringMarketoptional*string #
Market type of the Amazon EC2 instances used to create a cluster node.
nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string #
Friendly name given to the instance group.