CfnInstanceGroupConfigProps

class aws_cdk.aws_emr.CfnInstanceGroupConfigProps(*, instance_count, instance_role, instance_type, job_flow_id, auto_scaling_policy=None, bid_price=None, configurations=None, custom_ami_id=None, ebs_configuration=None, market=None, name=None)

Bases: object

Properties for defining a CfnInstanceGroupConfig.

Parameters
  • instance_count (Union[int, float]) – Target number of instances for the instance group.

  • instance_role (str) – The role of the instance group in the cluster. Allowed Values : TASK

  • instance_type (str) – The EC2 instance type for all instances in the instance group.

  • job_flow_id (str) – The ID of an Amazon EMR cluster that you want to associate this instance group with.

  • auto_scaling_policy (Union[IResolvable, AutoScalingPolicyProperty, Dict[str, Any], None]) – AutoScalingPolicy is a subproperty of InstanceGroupConfig . 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 .

  • bid_price (Optional[str]) – 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.

  • configurations (Union[IResolvable, Sequence[Union[IResolvable, ConfigurationProperty, Dict[str, Any]]], None]) –

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

  • custom_ami_id (Optional[str]) – The custom AMI ID to use for the provisioned instance group.

  • ebs_configuration (Union[IResolvable, EbsConfigurationProperty, Dict[str, Any], None]) – EbsConfiguration determines the EBS volumes to attach to EMR cluster instances.

  • market (Optional[str]) – Market type of the EC2 instances used to create a cluster node.

  • name (Optional[str]) – Friendly name given to the instance group.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.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
            ),

            # the properties below are optional
            volumes_per_instance=123
        )],
        ebs_optimized=False
    ),
    market="market",
    name="name"
)

Attributes

auto_scaling_policy

AutoScalingPolicy is a subproperty of InstanceGroupConfig .

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-elasticmapreduce-instancegroupconfig-autoscalingpolicy

Return type

Union[IResolvable, AutoScalingPolicyProperty, None]

bid_price

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-bidprice

Return type

Optional[str]

configurations

Amazon EMR releases 4.x or later.

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

link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-configurations

Return type

Union[IResolvable, List[Union[IResolvable, ConfigurationProperty]], None]

custom_ami_id

The custom AMI ID to use for the provisioned instance group.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-customamiid

Return type

Optional[str]

ebs_configuration

EbsConfiguration determines the EBS volumes to attach to EMR cluster instances.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-ebsconfiguration

Return type

Union[IResolvable, EbsConfigurationProperty, None]

instance_count

Target number of instances for the instance group.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfiginstancecount-

Return type

Union[int, float]

instance_role

The role of the instance group in the cluster.

Allowed Values : TASK

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-instancerole

Return type

str

instance_type

The EC2 instance type for all instances in the instance group.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-instancetype

Return type

str

job_flow_id

The ID of an Amazon EMR cluster that you want to associate this instance group with.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-jobflowid

Return type

str

market

Market type of the EC2 instances used to create a cluster node.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-market

Return type

Optional[str]

name

Friendly name given to the instance group.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-instancegroupconfig.html#cfn-emr-instancegroupconfig-name

Return type

Optional[str]