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: aws_cdk.core.CfnResource

A CloudFormation AWS::EMR::InstanceGroupConfig.

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

AWS::EMR::InstanceGroupConfig

Link

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

ExampleMetadata

fixture=_generated

Example:

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

# configuration_property_: emr.CfnInstanceGroupConfig.ConfigurationProperty

cfn_instance_group_config = 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
            ),

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

Create a new AWS::EMR::InstanceGroupConfig.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

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

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

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

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

  • auto_scaling_policy (Union[IResolvable, AutoScalingPolicyProperty, Dict[str, Any], None]) – AutoScalingPolicy is a subproperty of InstanceGroupConfig . AutoScalingPolicy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. For more information, see Using Automatic Scaling in Amazon EMR in the Amazon EMR Management Guide .

  • bid_price (Optional[str]) – If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.

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

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

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

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

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

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

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_depends_on(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_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

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.

Return type

None

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 intermdediate 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).

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 resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

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.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

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.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

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

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'
auto_scaling_policy

AutoScalingPolicy is a subproperty of InstanceGroupConfig .

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

Link

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

Return type

Union[IResolvable, AutoScalingPolicyProperty, None]

bid_price

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

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

Link

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

Return type

Optional[str]

cfn_options

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

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

configurations

Amazon EMR releases 4.x or later.

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

link

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

Return type

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

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.

Return type

List[str]

custom_ami_id

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

Link

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

Return type

Optional[str]

ebs_configuration

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

Link

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

Return type

Union[IResolvable, EbsConfigurationProperty, None]

instance_count

Target number of instances for the instance group.

Link

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

Return type

Union[int, float]

instance_role

The role of the instance group in the cluster.

Allowed Values : TASK

Link

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

Return type

str

instance_type

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

Link

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

Return type

str

job_flow_id

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

Link

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

Return type

str

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

Return type

str

Returns

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

market

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

Link

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

Return type

Optional[str]

name

Friendly name given to the instance group.

Link

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

Return type

Optional[str]

node

The construct tree node associated with this construct.

Return type

ConstructNode

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 }).

Return type

str

stack

The stack in which this element is defined.

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

Return type

Stack

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(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-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.
import aws_cdk.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 EC2 instance limits for an automatic scaling policy.

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

Link

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

Return type

Union[IResolvable, ScalingConstraintsProperty]

rules

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

Link

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

Return type

Union[IResolvable, List[Union[IResolvable, ScalingRuleProperty]]]

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. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, 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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-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.
import aws_cdk.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 .

Link

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

Return type

str

dimensions

A CloudWatch metric dimension.

Link

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

Return type

Union[IResolvable, List[Union[IResolvable, MetricDimensionProperty]], None]

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 .

Link

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

Return type

Union[int, float, None]

metric_name

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

Link

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

Return type

str

namespace

The namespace for the CloudWatch metric.

The default is AWS/ElasticMapReduce .

Link

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

Return type

Optional[str]

period

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

EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300 .

Link

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

Return type

Union[int, float]

statistic

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

The default is AVERAGE .

Link

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

Return type

Optional[str]

threshold

The value against which the specified statistic is compared.

Link

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

Return type

Union[int, float]

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.

Link

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

Return type

Optional[str]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-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.
import aws_cdk.aws_emr as emr

# configuration_property_: emr.CfnInstanceGroupConfig.ConfigurationProperty

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

Attributes

classification

The classification within a configuration.

Link

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

Return type

Optional[str]

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.

Link

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

Return type

Union[IResolvable, Mapping[str, str], None]

configurations

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

Link

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

Return type

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

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 will be associated to every instance.

Parameters
  • volume_specification (Union[IResolvable, VolumeSpecificationProperty, Dict[str, Any]]) – EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-ebsconfiguration-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.
import aws_cdk.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
    ),

    # the properties below are optional
    volumes_per_instance=123
)

Attributes

volume_specification

EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster.

Link

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

Return type

Union[IResolvable, VolumeSpecificationProperty]

volumes_per_instance

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

Link

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

Return type

Union[int, float, None]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-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.
import aws_cdk.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
        ),

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

Link

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

Return type

Union[IResolvable, List[Union[IResolvable, EbsBlockDeviceConfigProperty]], None]

ebs_optimized

Indicates whether an Amazon EBS volume is EBS-optimized.

Link

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

Return type

Union[bool, IResolvable, None]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-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.
import aws_cdk.aws_emr as emr

metric_dimension_property = emr.CfnInstanceGroupConfig.MetricDimensionProperty(
    key="key",
    value="value"
)

Attributes

key

The dimension name.

Link

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

Return type

str

value

The dimension value.

Link

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

Return type

str

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-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.
import aws_cdk.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.

Link

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

Return type

Optional[str]

simple_scaling_policy_configuration

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

Link

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

Return type

Union[IResolvable, SimpleScalingPolicyConfigurationProperty]

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-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.
import aws_cdk.aws_emr as emr

scaling_constraints_property = emr.CfnInstanceGroupConfig.ScalingConstraintsProperty(
    max_capacity=123,
    min_capacity=123
)

Attributes

max_capacity

The upper boundary of 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.

Link

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

Return type

Union[int, float]

min_capacity

The lower boundary of 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.

Link

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

Return type

Union[int, float]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-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.
import aws_cdk.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.

Link

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

Return type

Union[IResolvable, ScalingActionProperty]

description

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

Link

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

Return type

Optional[str]

name

The name used to identify an automatic scaling rule.

Rule names must be unique within a scaling policy.

Link

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

Return type

str

trigger

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

Link

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

Return type

Union[IResolvable, ScalingTriggerProperty]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-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.
import aws_cdk.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.

Link

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

Return type

Union[IResolvable, CloudWatchAlarmDefinitionProperty]

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-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.
import aws_cdk.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 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 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 EC2 instances specified by ScalingAdjustment , which should be expressed as a positive integer.

Link

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

Return type

Optional[str]

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.

Link

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

Return type

Union[int, float, None]

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

Link

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

Return type

Union[int, float]

VolumeSpecificationProperty

class CfnInstanceGroupConfig.VolumeSpecificationProperty(*, size_in_gb, volume_type, iops=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 gp2, io1, and standard.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-ebsconfiguration-ebsblockdeviceconfig-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.
import aws_cdk.aws_emr as emr

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

    # the properties below are optional
    iops=123
)

Attributes

iops

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

Link

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

Return type

Union[int, float, None]

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.

Link

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

Return type

Union[int, float]

volume_type

The volume type.

Volume types supported are gp2, io1, and standard.

Link

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

Return type

str