Skip to content
v2.278.0

InstanceTypeConfigProperty Struct ​

InstanceType config is a subproperty of InstanceFleetConfig .

An instance type configuration specifies each instance type in an instance fleet. The configuration determines the EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.

The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

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.CfnInstanceFleetConfig.ConfigurationProperty;
const instanceTypeConfigProperty: emr.CfnInstanceFleetConfig.InstanceTypeConfigProperty = {
  instanceType: 'instanceType',

  // the properties below are optional
  bidPrice: 'bidPrice',
  bidPriceAsPercentageOfOnDemandPrice: 123,
  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,
  },
  priority: 123,
  weightedCapacity: 123,
};
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.CfnInstanceFleetConfig.ConfigurationProperty

instance_type_config_property = emr.CfnInstanceFleetConfig.InstanceTypeConfigProperty(
    instance_type="instanceType",

    # the properties below are optional
    bid_price="bidPrice",
    bid_price_as_percentage_of_on_demand_price=123,
    configurations=[emr.CfnInstanceFleetConfig.ConfigurationProperty(
        classification="classification",
        configuration_properties={
            "configuration_properties_key": "configurationProperties"
        },
        configurations=[configuration_property_]
    )],
    custom_ami_id="customAmiId",
    ebs_configuration=emr.CfnInstanceFleetConfig.EbsConfigurationProperty(
        ebs_block_device_configs=[emr.CfnInstanceFleetConfig.EbsBlockDeviceConfigProperty(
            volume_specification=emr.CfnInstanceFleetConfig.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
    ),
    priority=123,
    weighted_capacity=123
)
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_;

InstanceTypeConfigProperty instanceTypeConfigProperty = 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();
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 instanceTypeConfigProperty = 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,
                Throughput = 123
            },

            // the properties below are optional
            VolumesPerInstance = 123
        } },
        EbsOptimized = false
    },
    Priority = 123,
    WeightedCapacity = 123
};
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

instanceTypeConfigProperty := &InstanceTypeConfigProperty{
	InstanceType: jsii.String("instanceType"),

	// the properties below are optional
	BidPrice: jsii.String("bidPrice"),
	BidPriceAsPercentageOfOnDemandPrice: jsii.Number(123),
	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),
	},
	Priority: jsii.Number(123),
	WeightedCapacity: jsii.Number(123),
}

Properties ​

bidPriceoptionalstringbid_priceoptionalstrbidPriceoptionalStringBidPriceoptionalstringBidPriceoptional*string #
The bid price for each Amazon EC2 Spot Instance type as defined by `InstanceType` .

Expressed in USD. If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.

bidPriceAsPercentageOfOnDemandPriceoptionalnumberbid_price_as_percentage_of_on_demand_priceoptionalint | floatbidPriceAsPercentageOfOnDemandPriceoptionalNumberBidPriceAsPercentageOfOnDemandPriceoptionaldoubleBidPriceAsPercentageOfOnDemandPriceoptional*float64 #
The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by `InstanceType` .

Expressed as a number (for example, 20 specifies 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.

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

An optional configuration specification to be used when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file. For more information, see Configuring Applications .

customAmiIdoptionalstringcustom_ami_idoptionalstrcustomAmiIdoptionalStringCustomAmiIdoptionalstringCustomAmiIdoptional*string #
The custom AMI ID to use for the instance type.
ebsConfigurationoptionalIResolvable | CfnInstanceFleetConfig.EbsConfigurationPropertyebs_configurationoptionaltyping.Union[IResolvable, EbsConfigurationProperty]ebsConfigurationoptionalIResolvableEbsConfigurationoptionalIResolvableEbsConfigurationoptionalinterface{} #
The configuration of Amazon Elastic Block Store (Amazon EBS) attached to each instance as defined by `InstanceType` .
instanceTypestringinstance_typestrinstanceTypeStringInstanceTypestringInstanceType*string required #
An Amazon EC2 instance type, such as `m3.xlarge` .
priorityoptionalnumberpriorityoptionalint | floatpriorityoptionalNumberPriorityoptionaldoublePriorityoptional*float64 #
The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type.

Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.

weightedCapacityoptionalnumberweighted_capacityoptionalint | floatweightedCapacityoptionalNumberWeightedCapacityoptionaldoubleWeightedCapacityoptional*float64 #
The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in `InstanceFleetConfig` .

This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified.