Class CfnInstanceGroupConfig
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
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 .
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
TaskInstanceGroupssubproperty for the AWS::EMR::Cluster JobFlowInstancesConfig property instead. To use this subproperty, see AWS::EMR::Cluster for examples.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.emr.*;
ConfigurationProperty configurationProperty_;
CfnInstanceGroupConfig cfnInstanceGroupConfig = CfnInstanceGroupConfig.Builder.create(this, "MyCfnInstanceGroupConfig")
.instanceCount(123)
.instanceRole("instanceRole")
.instanceType("instanceType")
.jobFlowId("jobFlowId")
// the properties below are optional
.autoScalingPolicy(AutoScalingPolicyProperty.builder()
.constraints(ScalingConstraintsProperty.builder()
.maxCapacity(123)
.minCapacity(123)
.build())
.rules(List.of(ScalingRuleProperty.builder()
.action(ScalingActionProperty.builder()
.simpleScalingPolicyConfiguration(SimpleScalingPolicyConfigurationProperty.builder()
.scalingAdjustment(123)
// the properties below are optional
.adjustmentType("adjustmentType")
.coolDown(123)
.build())
// the properties below are optional
.market("market")
.build())
.name("name")
.trigger(ScalingTriggerProperty.builder()
.cloudWatchAlarmDefinition(CloudWatchAlarmDefinitionProperty.builder()
.comparisonOperator("comparisonOperator")
.metricName("metricName")
.period(123)
.threshold(123)
// the properties below are optional
.dimensions(List.of(MetricDimensionProperty.builder()
.key("key")
.value("value")
.build()))
.evaluationPeriods(123)
.namespace("namespace")
.statistic("statistic")
.unit("unit")
.build())
.build())
// the properties below are optional
.description("description")
.build()))
.build())
.bidPrice("bidPrice")
.configurations(List.of(ConfigurationProperty.builder()
.classification("classification")
.configurationProperties(Map.of(
"configurationPropertiesKey", "configurationProperties"))
.configurations(List.of(configurationProperty_))
.build()))
.customAmiId("customAmiId")
.ebsConfiguration(EbsConfigurationProperty.builder()
.ebsBlockDeviceConfigs(List.of(EbsBlockDeviceConfigProperty.builder()
.volumeSpecification(VolumeSpecificationProperty.builder()
.sizeInGb(123)
.volumeType("volumeType")
// the properties below are optional
.iops(123)
.build())
// the properties below are optional
.volumesPerInstance(123)
.build()))
.ebsOptimized(false)
.build())
.market("market")
.name("name")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAutoScalingPolicydefines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.static final classA fluent builder forCfnInstanceGroupConfig.static interfaceCloudWatchAlarmDefinitionis a subproperty of theScalingTriggerproperty, which determines when to trigger an automatic scaling activity.static interfaceConfigurationsis a property of theAWS::EMR::Clusterresource that specifies the configuration of applications on an Amazon EMR cluster.static interfaceConfiguration of requested EBS block device associated with the instance group with count of volumes that are associated to every instance.static interfaceThe Amazon EBS configuration of a cluster instance.static interfaceMetricDimensionis a subproperty of theCloudWatchAlarmDefinitionproperty type.static interfaceScalingActionis a subproperty of theScalingRuleproperty type.static interfaceScalingConstraintsis a subproperty of theAutoScalingPolicyproperty type.static interfaceScalingRuleis a subproperty of theAutoScalingPolicyproperty type.static interfaceScalingTriggeris a subproperty of theScalingRuleproperty type.static interfaceSimpleScalingPolicyConfigurationis a subproperty of theScalingActionproperty type.static interfaceVolumeSpecificationis a subproperty of theEbsBlockDeviceConfigproperty type.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnInstanceGroupConfig(Construct scope, String id, CfnInstanceGroupConfigProps props) Create a newAWS::EMR::InstanceGroupConfig.protectedCfnInstanceGroupConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnInstanceGroupConfig(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionAutoScalingPolicyis a subproperty ofInstanceGroupConfig.If specified, indicates that the instance group uses Spot Instances.The custom AMI ID to use for the provisioned instance group.EbsConfigurationdetermines the EBS volumes to attach to EMR cluster instances.Target number of instances for the instance group.The role of the instance group in the cluster.The Amazon EC2 instance type for all instances in the instance group.The ID of an Amazon EMR cluster that you want to associate this instance group with.Market type of the Amazon EC2 instances used to create a cluster node.getName()Friendly name given to the instance group.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAutoScalingPolicy(IResolvable value) AutoScalingPolicyis a subproperty ofInstanceGroupConfig.voidAutoScalingPolicyis a subproperty ofInstanceGroupConfig.voidsetBidPrice(String value) If specified, indicates that the instance group uses Spot Instances.voidsetConfigurations(List<Object> value) voidsetConfigurations(IResolvable value) voidsetCustomAmiId(String value) The custom AMI ID to use for the provisioned instance group.voidsetEbsConfiguration(IResolvable value) EbsConfigurationdetermines the EBS volumes to attach to EMR cluster instances.voidEbsConfigurationdetermines the EBS volumes to attach to EMR cluster instances.voidsetInstanceCount(Number value) Target number of instances for the instance group.voidsetInstanceRole(String value) The role of the instance group in the cluster.voidsetInstanceType(String value) The Amazon EC2 instance type for all instances in the instance group.voidsetJobFlowId(String value) The ID of an Amazon EMR cluster that you want to associate this instance group with.voidMarket type of the Amazon EC2 instances used to create a cluster node.voidFriendly name given to the instance group.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnInstanceGroupConfig
protected CfnInstanceGroupConfig(software.amazon.jsii.JsiiObjectRef objRef) -
CfnInstanceGroupConfig
protected CfnInstanceGroupConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnInstanceGroupConfig
@Stability(Stable) public CfnInstanceGroupConfig(@NotNull Construct scope, @NotNull String id, @NotNull CfnInstanceGroupConfigProps props) Create a newAWS::EMR::InstanceGroupConfig.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getInstanceCount
Target number of instances for the instance group. -
setInstanceCount
Target number of instances for the instance group. -
getInstanceRole
The role of the instance group in the cluster.Allowed Values : TASK
-
setInstanceRole
The role of the instance group in the cluster.Allowed Values : TASK
-
getInstanceType
The Amazon EC2 instance type for all instances in the instance group. -
setInstanceType
The Amazon EC2 instance type for all instances in the instance group. -
getJobFlowId
The ID of an Amazon EMR cluster that you want to associate this instance group with. -
setJobFlowId
The ID of an Amazon EMR cluster that you want to associate this instance group with. -
getAutoScalingPolicy
AutoScalingPolicyis a subproperty ofInstanceGroupConfig.AutoScalingPolicydefines 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 . -
setAutoScalingPolicy
AutoScalingPolicyis a subproperty ofInstanceGroupConfig.AutoScalingPolicydefines 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 . -
setAutoScalingPolicy
@Stability(Stable) public void setAutoScalingPolicy(@Nullable CfnInstanceGroupConfig.AutoScalingPolicyProperty value) AutoScalingPolicyis a subproperty ofInstanceGroupConfig.AutoScalingPolicydefines 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 . -
getBidPrice
If specified, indicates that the instance group uses Spot Instances.This is the maximum price you are willing to pay for Spot Instances. Specify
OnDemandPriceto set the amount equal to the On-Demand price, or specify an amount in USD. -
setBidPrice
If specified, indicates that the instance group uses Spot Instances.This is the maximum price you are willing to pay for Spot Instances. Specify
OnDemandPriceto set the amount equal to the On-Demand price, or specify an amount in USD. -
getConfigurations
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).
-
setConfigurations
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).
-
setConfigurations
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).
-
getCustomAmiId
The custom AMI ID to use for the provisioned instance group. -
setCustomAmiId
The custom AMI ID to use for the provisioned instance group. -
getEbsConfiguration
EbsConfigurationdetermines the EBS volumes to attach to EMR cluster instances. -
setEbsConfiguration
EbsConfigurationdetermines the EBS volumes to attach to EMR cluster instances. -
setEbsConfiguration
@Stability(Stable) public void setEbsConfiguration(@Nullable CfnInstanceGroupConfig.EbsConfigurationProperty value) EbsConfigurationdetermines the EBS volumes to attach to EMR cluster instances. -
getMarket
Market type of the Amazon EC2 instances used to create a cluster node. -
setMarket
Market type of the Amazon EC2 instances used to create a cluster node. -
getName
Friendly name given to the instance group. -
setName
Friendly name given to the instance group.
-