CfnInstanceGroupConfig

class aws_cdk.aws_emr.CfnInstanceGroupConfig(scope, id, *, 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: CfnResource

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

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 import aws_emr as emr

# configuration_property_: emr.CfnInstanceGroupConfig.ConfigurationProperty

cfn_instance_group_config = emr.CfnInstanceGroupConfig(self, "MyCfnInstanceGroupConfig",
    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"
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • 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 Amazon 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 Amazon 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 Amazon EC2 instances used to create a cluster node.

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

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::EMR::InstanceGroupConfig'
attr_id

Id

Type:

cloudformationAttribute

auto_scaling_policy

AutoScalingPolicy is a subproperty of InstanceGroupConfig .

bid_price

If specified, indicates that the instance group uses Spot Instances.

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

configurations

Amazon EMR releases 4.x or later.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

custom_ami_id

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

ebs_configuration

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

instance_count

Target number of instances for the instance group.

instance_role

The role of the instance group in the cluster.

instance_type

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

job_flow_id

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

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

market

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

name

Friendly name given to the instance group.

node

The tree node.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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

AutoScalingPolicyProperty

class CfnInstanceGroupConfig.AutoScalingPolicyProperty(*, constraints, rules)

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]]) – 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]]]]) – 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 import aws_emr as emr

auto_scaling_policy_property = 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"
    )]
)

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 CfnInstanceGroupConfig.CloudWatchAlarmDefinitionProperty(*, comparison_operator, metric_name, period, threshold, dimensions=None, evaluation_periods=None, namespace=None, statistic=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 (str) – Determines how the metric specified by MetricName is compared to the value specified by Threshold .

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

  • period (Union[int, float]) – 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 .

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

  • 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 .

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

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

  • 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 import aws_emr as emr

cloud_watch_alarm_definition_property = 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"
)

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 CfnInstanceGroupConfig.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[IResolvable, Mapping[str, str], 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 import aws_emr as emr

# configuration_property_: emr.CfnInstanceGroupConfig.ConfigurationProperty

configuration_property = emr.CfnInstanceGroupConfig.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 CfnInstanceGroupConfig.EbsBlockDeviceConfigProperty(*, volume_specification, 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]]) – 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 import aws_emr as emr

ebs_block_device_config_property = 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
)

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 CfnInstanceGroupConfig.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.

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 import aws_emr as emr

ebs_configuration_property = 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
)

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.

See:

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

MetricDimensionProperty

class CfnInstanceGroupConfig.MetricDimensionProperty(*, key, value)

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 (str) – The dimension name.

  • value (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 import aws_emr as emr

metric_dimension_property = emr.CfnInstanceGroupConfig.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 CfnInstanceGroupConfig.ScalingActionProperty(*, simple_scaling_policy_configuration, market=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:
  • simple_scaling_policy_configuration (Union[IResolvable, SimpleScalingPolicyConfigurationProperty, Dict[str, Any]]) – The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.

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

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 import aws_emr as emr

scaling_action_property = 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"
)

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 CfnInstanceGroupConfig.ScalingConstraintsProperty(*, max_capacity, min_capacity)

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]) – 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]) – 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 import aws_emr as emr

scaling_constraints_property = emr.CfnInstanceGroupConfig.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 CfnInstanceGroupConfig.ScalingRuleProperty(*, action, name, trigger, description=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]]) – The conditions that trigger an automatic scaling activity.

  • name (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]]) – The CloudWatch alarm definition that determines when automatic scaling activity is triggered.

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

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 import aws_emr as emr

scaling_rule_property = 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"
)

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 CfnInstanceGroupConfig.ScalingTriggerProperty(*, cloud_watch_alarm_definition)

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]]) – 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 import aws_emr as emr

scaling_trigger_property = 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"
    )
)

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 CfnInstanceGroupConfig.SimpleScalingPolicyConfigurationProperty(*, scaling_adjustment, adjustment_type=None, cool_down=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:
  • scaling_adjustment (Union[int, float]) – 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.

  • 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.

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 import aws_emr as emr

simple_scaling_policy_configuration_property = emr.CfnInstanceGroupConfig.SimpleScalingPolicyConfigurationProperty(
    scaling_adjustment=123,

    # the properties below are optional
    adjustment_type="adjustmentType",
    cool_down=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 CfnInstanceGroupConfig.VolumeSpecificationProperty(*, size_in_gb, volume_type, iops=None, throughput=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:
  • size_in_gb (Union[int, float]) – 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.

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

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

  • 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.

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 import aws_emr as emr

volume_specification_property = emr.CfnInstanceGroupConfig.VolumeSpecificationProperty(
    size_in_gb=123,
    volume_type="volumeType",

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

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