CfnInstanceGroupConfigPropsMixin

class aws_cdk.mixins_preview.aws_emr.mixins.CfnInstanceGroupConfigPropsMixin(props, *, strategy=None)

Bases: Mixin

Use InstanceGroupConfig to define instance groups for an EMR cluster.

A cluster can not use both instance groups and instance fleets. For more information, see Create a Cluster with Instance Fleets or Uniform Instance Groups in the Amazon EMR Management Guide . .. epigraph:

You can currently only add task instance groups to a cluster with this resource. If you use this resource, CloudFormation waits for the cluster launch to complete before adding the task instance group to the cluster. In order to add task instance groups to the cluster as part of the cluster launch and minimize delays in provisioning task nodes, use the ``TaskInstanceGroups`` subproperty for the `AWS::EMR::Cluster JobFlowInstancesConfig <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-jobflowinstancesconfig.html>`_ property instead. To use this subproperty, see `AWS::EMR::Cluster <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html>`_ for examples.
See:

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

CloudformationResource:

AWS::EMR::InstanceGroupConfig

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

# configuration_property_: emr_mixins.CfnInstanceGroupConfigPropsMixin.ConfigurationProperty

cfn_instance_group_config_props_mixin = emr_mixins.CfnInstanceGroupConfigPropsMixin(emr_mixins.CfnInstanceGroupConfigMixinProps(
    auto_scaling_policy=emr_mixins.CfnInstanceGroupConfigPropsMixin.AutoScalingPolicyProperty(
        constraints=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingConstraintsProperty(
            max_capacity=123,
            min_capacity=123
        ),
        rules=[emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingRuleProperty(
            action=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingActionProperty(
                market="market",
                simple_scaling_policy_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty(
                    adjustment_type="adjustmentType",
                    cool_down=123,
                    scaling_adjustment=123
                )
            ),
            description="description",
            name="name",
            trigger=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty(
                cloud_watch_alarm_definition=emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty(
                    comparison_operator="comparisonOperator",
                    dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty(
                        key="key",
                        value="value"
                    )],
                    evaluation_periods=123,
                    metric_name="metricName",
                    namespace="namespace",
                    period=123,
                    statistic="statistic",
                    threshold=123,
                    unit="unit"
                )
            )
        )]
    ),
    bid_price="bidPrice",
    configurations=[emr_mixins.CfnInstanceGroupConfigPropsMixin.ConfigurationProperty(
        classification="classification",
        configuration_properties={
            "configuration_properties_key": "configurationProperties"
        },
        configurations=[configuration_property_]
    )],
    custom_ami_id="customAmiId",
    ebs_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsConfigurationProperty(
        ebs_block_device_configs=[emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsBlockDeviceConfigProperty(
            volume_specification=emr_mixins.CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty(
                iops=123,
                size_in_gb=123,
                throughput=123,
                volume_type="volumeType"
            ),
            volumes_per_instance=123
        )],
        ebs_optimized=False
    ),
    instance_count=123,
    instance_role="instanceRole",
    instance_type="instanceType",
    job_flow_id="jobFlowId",
    market="market",
    name="name"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::EMR::InstanceGroupConfig.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['autoScalingPolicy', 'bidPrice', 'configurations', 'customAmiId', 'ebsConfiguration', 'instanceCount', 'instanceRole', 'instanceType', 'jobFlowId', 'market', 'name']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

AutoScalingPolicyProperty

class CfnInstanceGroupConfigPropsMixin.AutoScalingPolicyProperty(*, constraints=None, rules=None)

Bases: object

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 .

Parameters:
  • constraints (Union[IResolvable, ScalingConstraintsProperty, Dict[str, Any], None]) – The upper and lower Amazon EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.

  • rules (Union[IResolvable, Sequence[Union[IResolvable, ScalingRuleProperty, Dict[str, Any]]], None]) – The scale-in and scale-out rules that comprise the automatic scaling policy.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

auto_scaling_policy_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.AutoScalingPolicyProperty(
    constraints=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingConstraintsProperty(
        max_capacity=123,
        min_capacity=123
    ),
    rules=[emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingRuleProperty(
        action=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingActionProperty(
            market="market",
            simple_scaling_policy_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty(
                adjustment_type="adjustmentType",
                cool_down=123,
                scaling_adjustment=123
            )
        ),
        description="description",
        name="name",
        trigger=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty(
            cloud_watch_alarm_definition=emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty(
                comparison_operator="comparisonOperator",
                dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty(
                    key="key",
                    value="value"
                )],
                evaluation_periods=123,
                metric_name="metricName",
                namespace="namespace",
                period=123,
                statistic="statistic",
                threshold=123,
                unit="unit"
            )
        )
    )]
)

Attributes

constraints

The upper and lower Amazon EC2 instance limits for an automatic scaling policy.

Automatic scaling activity will not cause an instance group to grow above or below these limits.

See:

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

rules

The scale-in and scale-out rules that comprise the automatic scaling policy.

See:

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

CloudWatchAlarmDefinitionProperty

class CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty(*, comparison_operator=None, dimensions=None, evaluation_periods=None, metric_name=None, namespace=None, period=None, statistic=None, threshold=None, unit=None)

Bases: object

CloudWatchAlarmDefinition is a subproperty of the ScalingTrigger property, which determines when to trigger an automatic scaling activity.

Scaling activity begins when you satisfy the defined alarm conditions.

Parameters:
  • comparison_operator (Optional[str]) – Determines how the metric specified by MetricName is compared to the value specified by Threshold .

  • dimensions (Union[IResolvable, Sequence[Union[IResolvable, MetricDimensionProperty, Dict[str, Any]]], None]) – A CloudWatch metric dimension.

  • evaluation_periods (Union[int, float, None]) – The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1 .

  • metric_name (Optional[str]) – The name of the CloudWatch metric that is watched to determine an alarm condition.

  • namespace (Optional[str]) – The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce .

  • period (Union[int, float, None]) – The period, in seconds, over which the statistic is applied. CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify 300 .

  • statistic (Optional[str]) – The statistic to apply to the metric associated with the alarm. The default is AVERAGE .

  • threshold (Union[int, float, None]) – The value against which the specified statistic is compared.

  • unit (Optional[str]) – The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

cloud_watch_alarm_definition_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty(
    comparison_operator="comparisonOperator",
    dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty(
        key="key",
        value="value"
    )],
    evaluation_periods=123,
    metric_name="metricName",
    namespace="namespace",
    period=123,
    statistic="statistic",
    threshold=123,
    unit="unit"
)

Attributes

comparison_operator

Determines how the metric specified by MetricName is compared to the value specified by Threshold .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-cloudwatchalarmdefinition.html#cfn-emr-instancegroupconfig-cloudwatchalarmdefinition-comparisonoperator

dimensions

A CloudWatch metric dimension.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-cloudwatchalarmdefinition.html#cfn-emr-instancegroupconfig-cloudwatchalarmdefinition-dimensions

evaluation_periods

The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity.

The default value is 1 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-cloudwatchalarmdefinition.html#cfn-emr-instancegroupconfig-cloudwatchalarmdefinition-evaluationperiods

metric_name

The name of the CloudWatch metric that is watched to determine an alarm condition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-cloudwatchalarmdefinition.html#cfn-emr-instancegroupconfig-cloudwatchalarmdefinition-metricname

namespace

The namespace for the CloudWatch metric.

The default is AWS/ElasticMapReduce .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-cloudwatchalarmdefinition.html#cfn-emr-instancegroupconfig-cloudwatchalarmdefinition-namespace

period

The period, in seconds, over which the statistic is applied.

CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify 300 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-cloudwatchalarmdefinition.html#cfn-emr-instancegroupconfig-cloudwatchalarmdefinition-period

statistic

The statistic to apply to the metric associated with the alarm.

The default is AVERAGE .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-cloudwatchalarmdefinition.html#cfn-emr-instancegroupconfig-cloudwatchalarmdefinition-statistic

threshold

The value against which the specified statistic is compared.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-cloudwatchalarmdefinition.html#cfn-emr-instancegroupconfig-cloudwatchalarmdefinition-threshold

unit

The unit of measure associated with the CloudWatch metric being watched.

The value specified for Unit must correspond to the units specified in the CloudWatch metric.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-cloudwatchalarmdefinition.html#cfn-emr-instancegroupconfig-cloudwatchalarmdefinition-unit

ConfigurationProperty

class CfnInstanceGroupConfigPropsMixin.ConfigurationProperty(*, classification=None, configuration_properties=None, configurations=None)

Bases: object

Configurations is a property of the AWS::EMR::Cluster resource that specifies the configuration of applications on an Amazon EMR cluster.

Configurations are optional. You can use them to have EMR customize applications and software bundled with Amazon EMR when a cluster is created. 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 . .. epigraph:

Applies only to Amazon EMR releases 4.0 and later.
Parameters:
  • classification (Optional[str]) – The classification within a configuration.

  • configuration_properties (Union[Mapping[str, str], IResolvable, None]) – Within a configuration classification, a set of properties that represent the settings that you want to change in the configuration file. Duplicates not allowed.

  • configurations (Union[IResolvable, Sequence[Union[IResolvable, ConfigurationProperty, Dict[str, Any]]], None]) – A list of additional configurations to apply within a configuration object.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

# configuration_property_: emr_mixins.CfnInstanceGroupConfigPropsMixin.ConfigurationProperty

configuration_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ConfigurationProperty(
    classification="classification",
    configuration_properties={
        "configuration_properties_key": "configurationProperties"
    },
    configurations=[configuration_property_]
)

Attributes

classification

The classification within a configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-configuration.html#cfn-emr-instancegroupconfig-configuration-classification

configuration_properties

Within a configuration classification, a set of properties that represent the settings that you want to change in the configuration file.

Duplicates not allowed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-configuration.html#cfn-emr-instancegroupconfig-configuration-configurationproperties

configurations

A list of additional configurations to apply within a configuration object.

See:

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

EbsBlockDeviceConfigProperty

class CfnInstanceGroupConfigPropsMixin.EbsBlockDeviceConfigProperty(*, volume_specification=None, volumes_per_instance=None)

Bases: object

Configuration of requested EBS block device associated with the instance group with count of volumes that are associated to every instance.

Parameters:
  • volume_specification (Union[IResolvable, VolumeSpecificationProperty, Dict[str, Any], None]) – EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster.

  • volumes_per_instance (Union[int, float, None]) – Number of EBS volumes with a specific volume configuration that are associated with every instance in the instance group.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

ebs_block_device_config_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsBlockDeviceConfigProperty(
    volume_specification=emr_mixins.CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty(
        iops=123,
        size_in_gb=123,
        throughput=123,
        volume_type="volumeType"
    ),
    volumes_per_instance=123
)

Attributes

volume_specification

EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-ebsblockdeviceconfig.html#cfn-emr-instancegroupconfig-ebsblockdeviceconfig-volumespecification

volumes_per_instance

Number of EBS volumes with a specific volume configuration that are associated with every instance in the instance group.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-ebsblockdeviceconfig.html#cfn-emr-instancegroupconfig-ebsblockdeviceconfig-volumesperinstance

EbsConfigurationProperty

class CfnInstanceGroupConfigPropsMixin.EbsConfigurationProperty(*, ebs_block_device_configs=None, ebs_optimized=None)

Bases: object

The Amazon EBS configuration of a cluster instance.

Parameters:
  • ebs_block_device_configs (Union[IResolvable, Sequence[Union[IResolvable, EbsBlockDeviceConfigProperty, Dict[str, Any]]], None]) – An array of Amazon EBS volume specifications attached to a cluster instance.

  • ebs_optimized (Union[bool, IResolvable, None]) – Indicates whether an Amazon EBS volume is EBS-optimized. The default is false. You should explicitly set this value to true to enable the Amazon EBS-optimized setting for an EC2 instance.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

ebs_configuration_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsConfigurationProperty(
    ebs_block_device_configs=[emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsBlockDeviceConfigProperty(
        volume_specification=emr_mixins.CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty(
            iops=123,
            size_in_gb=123,
            throughput=123,
            volume_type="volumeType"
        ),
        volumes_per_instance=123
    )],
    ebs_optimized=False
)

Attributes

ebs_block_device_configs

An array of Amazon EBS volume specifications attached to a cluster instance.

See:

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

ebs_optimized

Indicates whether an Amazon EBS volume is EBS-optimized.

The default is false. You should explicitly set this value to true to enable the Amazon EBS-optimized setting for an EC2 instance.

See:

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

MetricDimensionProperty

class CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty(*, key=None, value=None)

Bases: object

MetricDimension is a subproperty of the CloudWatchAlarmDefinition property type.

MetricDimension specifies a CloudWatch dimension, which is specified with a Key Value pair. The key is known as a Name in CloudWatch. By default, Amazon EMR uses one dimension whose Key is JobFlowID and Value is a variable representing the cluster ID, which is ${emr.clusterId} . This enables the automatic scaling rule for EMR to bootstrap when the cluster ID becomes available during cluster creation.

Parameters:
  • key (Optional[str]) – The dimension name.

  • value (Optional[str]) – The dimension value.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

metric_dimension_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty(
    key="key",
    value="value"
)

Attributes

key

The dimension name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-metricdimension.html#cfn-emr-instancegroupconfig-metricdimension-key

value

The dimension value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-metricdimension.html#cfn-emr-instancegroupconfig-metricdimension-value

ScalingActionProperty

class CfnInstanceGroupConfigPropsMixin.ScalingActionProperty(*, market=None, simple_scaling_policy_configuration=None)

Bases: object

ScalingAction is a subproperty of the ScalingRule property type.

ScalingAction determines the type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.

Parameters:
  • market (Optional[str]) – Not available for instance groups. Instance groups use the market type specified for the group.

  • simple_scaling_policy_configuration (Union[IResolvable, SimpleScalingPolicyConfigurationProperty, Dict[str, Any], None]) – The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

scaling_action_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingActionProperty(
    market="market",
    simple_scaling_policy_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty(
        adjustment_type="adjustmentType",
        cool_down=123,
        scaling_adjustment=123
    )
)

Attributes

market

Not available for instance groups.

Instance groups use the market type specified for the group.

See:

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

simple_scaling_policy_configuration

The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-scalingaction.html#cfn-emr-instancegroupconfig-scalingaction-simplescalingpolicyconfiguration

ScalingConstraintsProperty

class CfnInstanceGroupConfigPropsMixin.ScalingConstraintsProperty(*, max_capacity=None, min_capacity=None)

Bases: object

ScalingConstraints is a subproperty of the AutoScalingPolicy property type.

ScalingConstraints defines the upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activities triggered by automatic scaling rules will not cause an instance group to grow above or shrink below these limits.

Parameters:
  • max_capacity (Union[int, float, None]) – The upper boundary of Amazon EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary.

  • min_capacity (Union[int, float, None]) – The lower boundary of Amazon EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

scaling_constraints_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingConstraintsProperty(
    max_capacity=123,
    min_capacity=123
)

Attributes

max_capacity

The upper boundary of Amazon EC2 instances in an instance group beyond which scaling activities are not allowed to grow.

Scale-out activities will not add instances beyond this boundary.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-scalingconstraints.html#cfn-emr-instancegroupconfig-scalingconstraints-maxcapacity

min_capacity

The lower boundary of Amazon EC2 instances in an instance group below which scaling activities are not allowed to shrink.

Scale-in activities will not terminate instances below this boundary.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-scalingconstraints.html#cfn-emr-instancegroupconfig-scalingconstraints-mincapacity

ScalingRuleProperty

class CfnInstanceGroupConfigPropsMixin.ScalingRuleProperty(*, action=None, description=None, name=None, trigger=None)

Bases: object

ScalingRule is a subproperty of the AutoScalingPolicy property type.

ScalingRule defines the scale-in or scale-out rules for scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments. The automatic scaling policy for an instance group can comprise one or more automatic scaling rules.

Parameters:
  • action (Union[IResolvable, ScalingActionProperty, Dict[str, Any], None]) – The conditions that trigger an automatic scaling activity.

  • description (Optional[str]) – A friendly, more verbose description of the automatic scaling rule.

  • name (Optional[str]) – The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy.

  • trigger (Union[IResolvable, ScalingTriggerProperty, Dict[str, Any], None]) – The CloudWatch alarm definition that determines when automatic scaling activity is triggered.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

scaling_rule_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingRuleProperty(
    action=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingActionProperty(
        market="market",
        simple_scaling_policy_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty(
            adjustment_type="adjustmentType",
            cool_down=123,
            scaling_adjustment=123
        )
    ),
    description="description",
    name="name",
    trigger=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty(
        cloud_watch_alarm_definition=emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty(
            comparison_operator="comparisonOperator",
            dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty(
                key="key",
                value="value"
            )],
            evaluation_periods=123,
            metric_name="metricName",
            namespace="namespace",
            period=123,
            statistic="statistic",
            threshold=123,
            unit="unit"
        )
    )
)

Attributes

action

The conditions that trigger an automatic scaling activity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-scalingrule.html#cfn-emr-instancegroupconfig-scalingrule-action

description

A friendly, more verbose description of the automatic scaling rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-scalingrule.html#cfn-emr-instancegroupconfig-scalingrule-description

name

The name used to identify an automatic scaling rule.

Rule names must be unique within a scaling policy.

See:

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

trigger

The CloudWatch alarm definition that determines when automatic scaling activity is triggered.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-scalingrule.html#cfn-emr-instancegroupconfig-scalingrule-trigger

ScalingTriggerProperty

class CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty(*, cloud_watch_alarm_definition=None)

Bases: object

ScalingTrigger is a subproperty of the ScalingRule property type.

ScalingTrigger determines the conditions that trigger an automatic scaling activity.

Parameters:

cloud_watch_alarm_definition (Union[IResolvable, CloudWatchAlarmDefinitionProperty, Dict[str, Any], None]) – The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

scaling_trigger_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty(
    cloud_watch_alarm_definition=emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty(
        comparison_operator="comparisonOperator",
        dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty(
            key="key",
            value="value"
        )],
        evaluation_periods=123,
        metric_name="metricName",
        namespace="namespace",
        period=123,
        statistic="statistic",
        threshold=123,
        unit="unit"
    )
)

Attributes

cloud_watch_alarm_definition

The definition of a CloudWatch metric alarm.

When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-scalingtrigger.html#cfn-emr-instancegroupconfig-scalingtrigger-cloudwatchalarmdefinition

SimpleScalingPolicyConfigurationProperty

class CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty(*, adjustment_type=None, cool_down=None, scaling_adjustment=None)

Bases: object

SimpleScalingPolicyConfiguration is a subproperty of the ScalingAction property type.

SimpleScalingPolicyConfiguration determines how an automatic scaling action adds or removes instances, the cooldown period, and the number of EC2 instances that are added each time the CloudWatch metric alarm condition is satisfied.

Parameters:
  • adjustment_type (Optional[str]) – The way in which Amazon EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count increments or decrements by ScalingAdjustment , which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment , which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified by ScalingAdjustment , which should be expressed as a positive integer.

  • cool_down (Union[int, float, None]) – The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.

  • scaling_adjustment (Union[int, float, None]) – The amount by which to scale in or scale out, based on the specified AdjustmentType . A positive value adds to the instance group’s Amazon EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY , the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY , the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

simple_scaling_policy_configuration_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty(
    adjustment_type="adjustmentType",
    cool_down=123,
    scaling_adjustment=123
)

Attributes

adjustment_type

The way in which Amazon EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered.

CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the Amazon EC2 instance count increments or decrements by ScalingAdjustment , which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment , which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified by ScalingAdjustment , which should be expressed as a positive integer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-simplescalingpolicyconfiguration.html#cfn-emr-instancegroupconfig-simplescalingpolicyconfiguration-adjustmenttype

cool_down

The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.

The default value is 0.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-simplescalingpolicyconfiguration.html#cfn-emr-instancegroupconfig-simplescalingpolicyconfiguration-cooldown

scaling_adjustment

The amount by which to scale in or scale out, based on the specified AdjustmentType .

A positive value adds to the instance group’s Amazon EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY , the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY , the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-simplescalingpolicyconfiguration.html#cfn-emr-instancegroupconfig-simplescalingpolicyconfiguration-scalingadjustment

VolumeSpecificationProperty

class CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty(*, iops=None, size_in_gb=None, throughput=None, volume_type=None)

Bases: object

VolumeSpecification is a subproperty of the EbsBlockDeviceConfig property type.

VolumeSecification determines the volume type, IOPS, and size (GiB) for EBS volumes attached to EC2 instances.

Parameters:
  • iops (Union[int, float, None]) – The number of I/O operations per second (IOPS) that the volume supports.

  • size_in_gb (Union[int, float, None]) – The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.

  • throughput (Union[int, float, None]) – The throughput, in mebibyte per second (MiB/s). This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes.

  • volume_type (Optional[str]) – The volume type. Volume types supported are gp3, gp2, io1, st1, sc1, and standard.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins

volume_specification_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty(
    iops=123,
    size_in_gb=123,
    throughput=123,
    volume_type="volumeType"
)

Attributes

iops

The number of I/O operations per second (IOPS) that the volume supports.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-volumespecification.html#cfn-emr-instancegroupconfig-volumespecification-iops

size_in_gb

The volume size, in gibibytes (GiB).

This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-volumespecification.html#cfn-emr-instancegroupconfig-volumespecification-sizeingb

throughput

The throughput, in mebibyte per second (MiB/s).

This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-volumespecification.html#cfn-emr-instancegroupconfig-volumespecification-throughput

volume_type

The volume type.

Volume types supported are gp3, gp2, io1, st1, sc1, and standard.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-instancegroupconfig-volumespecification.html#cfn-emr-instancegroupconfig-volumespecification-volumetype