CfnInstanceGroupConfigPropsMixin
- class aws_cdk.mixins_preview.aws_emr.mixins.CfnInstanceGroupConfigPropsMixin(props, *, strategy=None)
Bases:
MixinUse
InstanceGroupConfigto 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:
- CloudformationResource:
AWS::EMR::InstanceGroupConfig
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins # configuration_property_: emr_mixins.CfnInstanceGroupConfigPropsMixin.ConfigurationProperty cfn_instance_group_config_props_mixin = emr_mixins.CfnInstanceGroupConfigPropsMixin(emr_mixins.CfnInstanceGroupConfigMixinProps( auto_scaling_policy=emr_mixins.CfnInstanceGroupConfigPropsMixin.AutoScalingPolicyProperty( constraints=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingConstraintsProperty( max_capacity=123, min_capacity=123 ), rules=[emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingRuleProperty( action=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingActionProperty( market="market", simple_scaling_policy_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty( adjustment_type="adjustmentType", cool_down=123, scaling_adjustment=123 ) ), description="description", name="name", trigger=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty( cloud_watch_alarm_definition=emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty( comparison_operator="comparisonOperator", dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty( key="key", value="value" )], evaluation_periods=123, metric_name="metricName", namespace="namespace", period=123, statistic="statistic", threshold=123, unit="unit" ) ) )] ), bid_price="bidPrice", configurations=[emr_mixins.CfnInstanceGroupConfigPropsMixin.ConfigurationProperty( classification="classification", configuration_properties={ "configuration_properties_key": "configurationProperties" }, configurations=[configuration_property_] )], custom_ami_id="customAmiId", ebs_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsConfigurationProperty( ebs_block_device_configs=[emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsBlockDeviceConfigProperty( volume_specification=emr_mixins.CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty( iops=123, size_in_gb=123, throughput=123, volume_type="volumeType" ), volumes_per_instance=123 )], ebs_optimized=False ), instance_count=123, instance_role="instanceRole", instance_type="instanceType", job_flow_id="jobFlowId", market="market", name="name" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::EMR::InstanceGroupConfig.- Parameters:
props (
Union[CfnInstanceGroupConfigMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['autoScalingPolicy', 'bidPrice', 'configurations', 'customAmiId', 'ebsConfiguration', 'instanceCount', 'instanceRole', 'instanceType', 'jobFlowId', 'market', 'name']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AutoScalingPolicyProperty
- class CfnInstanceGroupConfigPropsMixin.AutoScalingPolicyProperty(*, constraints=None, rules=None)
Bases:
objectAutoScalingPolicydefines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.For more information, see Using Automatic Scaling in Amazon EMR in the Amazon EMR Management Guide .
- Parameters:
constraints (
Union[IResolvable,ScalingConstraintsProperty,Dict[str,Any],None]) – The upper and lower Amazon EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.rules (
Union[IResolvable,Sequence[Union[IResolvable,ScalingRuleProperty,Dict[str,Any]]],None]) – The scale-in and scale-out rules that comprise the automatic scaling policy.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins auto_scaling_policy_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.AutoScalingPolicyProperty( constraints=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingConstraintsProperty( max_capacity=123, min_capacity=123 ), rules=[emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingRuleProperty( action=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingActionProperty( market="market", simple_scaling_policy_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty( adjustment_type="adjustmentType", cool_down=123, scaling_adjustment=123 ) ), description="description", name="name", trigger=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty( cloud_watch_alarm_definition=emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty( comparison_operator="comparisonOperator", dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty( key="key", value="value" )], evaluation_periods=123, metric_name="metricName", namespace="namespace", period=123, statistic="statistic", threshold=123, unit="unit" ) ) )] )
Attributes
- constraints
The upper and lower Amazon EC2 instance limits for an automatic scaling policy.
Automatic scaling activity will not cause an instance group to grow above or below these limits.
- rules
The scale-in and scale-out rules that comprise the automatic scaling policy.
CloudWatchAlarmDefinitionProperty
- class CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty(*, comparison_operator=None, dimensions=None, evaluation_periods=None, metric_name=None, namespace=None, period=None, statistic=None, threshold=None, unit=None)
Bases:
objectCloudWatchAlarmDefinitionis a subproperty of theScalingTriggerproperty, which determines when to trigger an automatic scaling activity.Scaling activity begins when you satisfy the defined alarm conditions.
- Parameters:
comparison_operator (
Optional[str]) – Determines how the metric specified byMetricNameis compared to the value specified byThreshold.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 is1.metric_name (
Optional[str]) – The name of the CloudWatch metric that is watched to determine an alarm condition.namespace (
Optional[str]) – The namespace for the CloudWatch metric. The default isAWS/ElasticMapReduce.period (
Union[int,float,None]) – The period, in seconds, over which the statistic is applied. CloudWatch metrics for Amazon EMR are emitted every five minutes (300 seconds), so if you specify a CloudWatch metric, specify300.statistic (
Optional[str]) – The statistic to apply to the metric associated with the alarm. The default isAVERAGE.threshold (
Union[int,float,None]) – The value against which the specified statistic is compared.unit (
Optional[str]) – The unit of measure associated with the CloudWatch metric being watched. The value specified forUnitmust correspond to the units specified in the CloudWatch metric.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins cloud_watch_alarm_definition_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty( comparison_operator="comparisonOperator", dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty( key="key", value="value" )], evaluation_periods=123, metric_name="metricName", namespace="namespace", period=123, statistic="statistic", threshold=123, unit="unit" )
Attributes
- comparison_operator
Determines how the metric specified by
MetricNameis compared to the value specified byThreshold.
- dimensions
A CloudWatch metric dimension.
- 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.
- metric_name
The name of the CloudWatch metric that is watched to determine an alarm condition.
- namespace
The namespace for the CloudWatch metric.
The default is
AWS/ElasticMapReduce.
- 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.
- statistic
The statistic to apply to the metric associated with the alarm.
The default is
AVERAGE.
- threshold
The value against which the specified statistic is compared.
- unit
The unit of measure associated with the CloudWatch metric being watched.
The value specified for
Unitmust correspond to the units specified in the CloudWatch metric.
ConfigurationProperty
- class CfnInstanceGroupConfigPropsMixin.ConfigurationProperty(*, classification=None, configuration_properties=None, configurations=None)
Bases:
objectConfigurationsis a property of theAWS::EMR::Clusterresource that specifies the configuration of applications on an Amazon EMR cluster.Configurations are optional. You can use them to have EMR customize applications and software bundled with Amazon EMR when a cluster is created. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file. For more information, see Configuring Applications . .. epigraph:
Applies only to Amazon EMR releases 4.0 and later.
- Parameters:
classification (
Optional[str]) – The classification within a configuration.configuration_properties (
Union[Mapping[str,str],IResolvable,None]) – Within a configuration classification, a set of properties that represent the settings that you want to change in the configuration file. Duplicates not allowed.configurations (
Union[IResolvable,Sequence[Union[IResolvable,ConfigurationProperty,Dict[str,Any]]],None]) – A list of additional configurations to apply within a configuration object.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins # configuration_property_: emr_mixins.CfnInstanceGroupConfigPropsMixin.ConfigurationProperty configuration_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ConfigurationProperty( classification="classification", configuration_properties={ "configuration_properties_key": "configurationProperties" }, configurations=[configuration_property_] )
Attributes
- classification
The classification within a configuration.
- 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.
- configurations
A list of additional configurations to apply within a configuration object.
EbsBlockDeviceConfigProperty
- class CfnInstanceGroupConfigPropsMixin.EbsBlockDeviceConfigProperty(*, volume_specification=None, volumes_per_instance=None)
Bases:
objectConfiguration of requested EBS block device associated with the instance group with count of volumes that are associated to every instance.
- Parameters:
volume_specification (
Union[IResolvable,VolumeSpecificationProperty,Dict[str,Any],None]) – EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster.volumes_per_instance (
Union[int,float,None]) – Number of EBS volumes with a specific volume configuration that are associated with every instance in the instance group.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins ebs_block_device_config_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsBlockDeviceConfigProperty( volume_specification=emr_mixins.CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty( iops=123, size_in_gb=123, throughput=123, volume_type="volumeType" ), volumes_per_instance=123 )
Attributes
- volume_specification
EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster.
- volumes_per_instance
Number of EBS volumes with a specific volume configuration that are associated with every instance in the instance group.
EbsConfigurationProperty
- class CfnInstanceGroupConfigPropsMixin.EbsConfigurationProperty(*, ebs_block_device_configs=None, ebs_optimized=None)
Bases:
objectThe Amazon EBS configuration of a cluster instance.
- Parameters:
ebs_block_device_configs (
Union[IResolvable,Sequence[Union[IResolvable,EbsBlockDeviceConfigProperty,Dict[str,Any]]],None]) – An array of Amazon EBS volume specifications attached to a cluster instance.ebs_optimized (
Union[bool,IResolvable,None]) – Indicates whether an Amazon EBS volume is EBS-optimized. The default is false. You should explicitly set this value to true to enable the Amazon EBS-optimized setting for an EC2 instance.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins ebs_configuration_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsConfigurationProperty( ebs_block_device_configs=[emr_mixins.CfnInstanceGroupConfigPropsMixin.EbsBlockDeviceConfigProperty( volume_specification=emr_mixins.CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty( iops=123, size_in_gb=123, throughput=123, volume_type="volumeType" ), volumes_per_instance=123 )], ebs_optimized=False )
Attributes
- ebs_block_device_configs
An array of Amazon EBS volume specifications attached to a cluster instance.
- ebs_optimized
Indicates whether an Amazon EBS volume is EBS-optimized.
The default is false. You should explicitly set this value to true to enable the Amazon EBS-optimized setting for an EC2 instance.
MetricDimensionProperty
- class CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty(*, key=None, value=None)
Bases:
objectMetricDimensionis a subproperty of theCloudWatchAlarmDefinitionproperty type.MetricDimensionspecifies a CloudWatch dimension, which is specified with aKeyValuepair. The key is known as aNamein CloudWatch. By default, Amazon EMR uses one dimension whoseKeyisJobFlowIDandValueis a variable representing the cluster ID, which is${emr.clusterId}. This enables the automatic scaling rule for EMR to bootstrap when the cluster ID becomes available during cluster creation.- Parameters:
key (
Optional[str]) – The dimension name.value (
Optional[str]) – The dimension value.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins metric_dimension_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty( key="key", value="value" )
Attributes
- key
The dimension name.
ScalingActionProperty
- class CfnInstanceGroupConfigPropsMixin.ScalingActionProperty(*, market=None, simple_scaling_policy_configuration=None)
Bases:
objectScalingActionis a subproperty of theScalingRuleproperty type.ScalingActiondetermines the type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.- Parameters:
market (
Optional[str]) – Not available for instance groups. Instance groups use the market type specified for the group.simple_scaling_policy_configuration (
Union[IResolvable,SimpleScalingPolicyConfigurationProperty,Dict[str,Any],None]) – The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins scaling_action_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingActionProperty( market="market", simple_scaling_policy_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty( adjustment_type="adjustmentType", cool_down=123, scaling_adjustment=123 ) )
Attributes
- market
Not available for instance groups.
Instance groups use the market type specified for the group.
- simple_scaling_policy_configuration
The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.
ScalingConstraintsProperty
- class CfnInstanceGroupConfigPropsMixin.ScalingConstraintsProperty(*, max_capacity=None, min_capacity=None)
Bases:
objectScalingConstraintsis a subproperty of theAutoScalingPolicyproperty type.ScalingConstraintsdefines the upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activities triggered by automatic scaling rules will not cause an instance group to grow above or shrink below these limits.- Parameters:
max_capacity (
Union[int,float,None]) – The upper boundary of Amazon EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary.min_capacity (
Union[int,float,None]) – The lower boundary of Amazon EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins scaling_constraints_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingConstraintsProperty( max_capacity=123, min_capacity=123 )
Attributes
- max_capacity
The upper boundary of Amazon EC2 instances in an instance group beyond which scaling activities are not allowed to grow.
Scale-out activities will not add instances beyond this boundary.
- 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.
ScalingRuleProperty
- class CfnInstanceGroupConfigPropsMixin.ScalingRuleProperty(*, action=None, description=None, name=None, trigger=None)
Bases:
objectScalingRuleis a subproperty of theAutoScalingPolicyproperty type.ScalingRuledefines the scale-in or scale-out rules for scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments. The automatic scaling policy for an instance group can comprise one or more automatic scaling rules.- Parameters:
action (
Union[IResolvable,ScalingActionProperty,Dict[str,Any],None]) – The conditions that trigger an automatic scaling activity.description (
Optional[str]) – A friendly, more verbose description of the automatic scaling rule.name (
Optional[str]) – The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy.trigger (
Union[IResolvable,ScalingTriggerProperty,Dict[str,Any],None]) – The CloudWatch alarm definition that determines when automatic scaling activity is triggered.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins scaling_rule_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingRuleProperty( action=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingActionProperty( market="market", simple_scaling_policy_configuration=emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty( adjustment_type="adjustmentType", cool_down=123, scaling_adjustment=123 ) ), description="description", name="name", trigger=emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty( cloud_watch_alarm_definition=emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty( comparison_operator="comparisonOperator", dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty( key="key", value="value" )], evaluation_periods=123, metric_name="metricName", namespace="namespace", period=123, statistic="statistic", threshold=123, unit="unit" ) ) )
Attributes
- action
The conditions that trigger an automatic scaling activity.
- description
A friendly, more verbose description of the automatic scaling rule.
- name
The name used to identify an automatic scaling rule.
Rule names must be unique within a scaling policy.
- trigger
The CloudWatch alarm definition that determines when automatic scaling activity is triggered.
ScalingTriggerProperty
- class CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty(*, cloud_watch_alarm_definition=None)
Bases:
objectScalingTriggeris a subproperty of theScalingRuleproperty type.ScalingTriggerdetermines the conditions that trigger an automatic scaling activity.- Parameters:
cloud_watch_alarm_definition (
Union[IResolvable,CloudWatchAlarmDefinitionProperty,Dict[str,Any],None]) – The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins scaling_trigger_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.ScalingTriggerProperty( cloud_watch_alarm_definition=emr_mixins.CfnInstanceGroupConfigPropsMixin.CloudWatchAlarmDefinitionProperty( comparison_operator="comparisonOperator", dimensions=[emr_mixins.CfnInstanceGroupConfigPropsMixin.MetricDimensionProperty( key="key", value="value" )], evaluation_periods=123, metric_name="metricName", namespace="namespace", period=123, statistic="statistic", threshold=123, unit="unit" ) )
Attributes
- cloud_watch_alarm_definition
The definition of a CloudWatch metric alarm.
When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.
SimpleScalingPolicyConfigurationProperty
- class CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty(*, adjustment_type=None, cool_down=None, scaling_adjustment=None)
Bases:
objectSimpleScalingPolicyConfigurationis a subproperty of theScalingActionproperty type.SimpleScalingPolicyConfigurationdetermines how an automatic scaling action adds or removes instances, the cooldown period, and the number of EC2 instances that are added each time the CloudWatch metric alarm condition is satisfied.- Parameters:
adjustment_type (
Optional[str]) – The way in which Amazon EC2 instances are added (ifScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITYis the default.CHANGE_IN_CAPACITYindicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITYindicates the instance count increments or decrements by the percentage specified byScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity.EXACT_CAPACITYindicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified byScalingAdjustment, which should be expressed as a positive integer.cool_down (
Union[int,float,None]) – The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.scaling_adjustment (
Union[int,float,None]) – The amount by which to scale in or scale out, based on the specifiedAdjustmentType. A positive value adds to the instance group’s Amazon EC2 instance count while a negative number removes instances. IfAdjustmentTypeis set toEXACT_CAPACITY, the number should only be a positive integer. IfAdjustmentTypeis set toPERCENT_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:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins simple_scaling_policy_configuration_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.SimpleScalingPolicyConfigurationProperty( adjustment_type="adjustmentType", cool_down=123, scaling_adjustment=123 )
Attributes
- adjustment_type
The way in which Amazon EC2 instances are added (if
ScalingAdjustmentis a positive number) or terminated (ifScalingAdjustmentis a negative number) each time the scaling activity is triggered.CHANGE_IN_CAPACITYis the default.CHANGE_IN_CAPACITYindicates that the Amazon EC2 instance count increments or decrements byScalingAdjustment, which should be expressed as an integer.PERCENT_CHANGE_IN_CAPACITYindicates the instance count increments or decrements by the percentage specified byScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity.EXACT_CAPACITYindicates the scaling activity results in an instance group with the number of Amazon EC2 instances specified byScalingAdjustment, which should be expressed as a positive integer.
- 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.
- 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
AdjustmentTypeis set toEXACT_CAPACITY, the number should only be a positive integer. IfAdjustmentTypeis set toPERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.
VolumeSpecificationProperty
- class CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty(*, iops=None, size_in_gb=None, throughput=None, volume_type=None)
Bases:
objectVolumeSpecificationis a subproperty of theEbsBlockDeviceConfigproperty type.VolumeSecificationdetermines the volume type, IOPS, and size (GiB) for EBS volumes attached to EC2 instances.- Parameters:
iops (
Union[int,float,None]) – The number of I/O operations per second (IOPS) that the volume supports.size_in_gb (
Union[int,float,None]) – The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.throughput (
Union[int,float,None]) – The throughput, in mebibyte per second (MiB/s). This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes.volume_type (
Optional[str]) – The volume type. Volume types supported are gp3, gp2, io1, st1, sc1, and standard.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_emr import mixins as emr_mixins volume_specification_property = emr_mixins.CfnInstanceGroupConfigPropsMixin.VolumeSpecificationProperty( iops=123, size_in_gb=123, throughput=123, volume_type="volumeType" )
Attributes
- iops
The number of I/O operations per second (IOPS) that the volume supports.
- 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.
- 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.
- volume_type
The volume type.
Volume types supported are gp3, gp2, io1, st1, sc1, and standard.