@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:36.084Z") public class CfnInstanceGroupConfig extends CfnResource implements IInspectable
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
TaskInstanceGroups
subproperty 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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnInstanceGroupConfig.AutoScalingPolicyProperty
`AutoScalingPolicy` defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.
|
static class |
CfnInstanceGroupConfig.Builder
A fluent builder for
CfnInstanceGroupConfig . |
static interface |
CfnInstanceGroupConfig.CloudWatchAlarmDefinitionProperty
`CloudWatchAlarmDefinition` is a subproperty of the `ScalingTrigger` property, which determines when to trigger an automatic scaling activity.
|
static interface |
CfnInstanceGroupConfig.ConfigurationProperty
`Configurations` is a property of the `AWS::EMR::Cluster` resource that specifies the configuration of applications on an Amazon EMR cluster.
|
static interface |
CfnInstanceGroupConfig.EbsBlockDeviceConfigProperty
Configuration of requested EBS block device associated with the instance group with count of volumes that are associated to every instance.
|
static interface |
CfnInstanceGroupConfig.EbsConfigurationProperty
The Amazon EBS configuration of a cluster instance.
|
static interface |
CfnInstanceGroupConfig.MetricDimensionProperty
`MetricDimension` is a subproperty of the `CloudWatchAlarmDefinition` property type.
|
static interface |
CfnInstanceGroupConfig.ScalingActionProperty
`ScalingAction` is a subproperty of the `ScalingRule` property type.
|
static interface |
CfnInstanceGroupConfig.ScalingConstraintsProperty
`ScalingConstraints` is a subproperty of the `AutoScalingPolicy` property type.
|
static interface |
CfnInstanceGroupConfig.ScalingRuleProperty
`ScalingRule` is a subproperty of the `AutoScalingPolicy` property type.
|
static interface |
CfnInstanceGroupConfig.ScalingTriggerProperty
`ScalingTrigger` is a subproperty of the `ScalingRule` property type.
|
static interface |
CfnInstanceGroupConfig.SimpleScalingPolicyConfigurationProperty
`SimpleScalingPolicyConfiguration` is a subproperty of the `ScalingAction` property type.
|
static interface |
CfnInstanceGroupConfig.VolumeSpecificationProperty
`VolumeSpecification` is a subproperty of the `EbsBlockDeviceConfig` property type.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnInstanceGroupConfig(Construct scope,
java.lang.String id,
CfnInstanceGroupConfigProps props)
Create a new `AWS::EMR::InstanceGroupConfig`.
|
protected |
CfnInstanceGroupConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnInstanceGroupConfig(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAutoScalingPolicy()
`AutoScalingPolicy` is a subproperty of `InstanceGroupConfig` .
|
java.lang.String |
getBidPrice()
If specified, indicates that the instance group uses Spot Instances.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getConfigurations()
> Amazon EMR releases 4.x or later.
|
java.lang.String |
getCustomAmiId()
The custom AMI ID to use for the provisioned instance group.
|
java.lang.Object |
getEbsConfiguration()
`EbsConfiguration` determines the EBS volumes to attach to EMR cluster instances.
|
java.lang.Number |
getInstanceCount()
Target number of instances for the instance group.
|
java.lang.String |
getInstanceRole()
The role of the instance group in the cluster.
|
java.lang.String |
getInstanceType()
The EC2 instance type for all instances in the instance group.
|
java.lang.String |
getJobFlowId()
The ID of an Amazon EMR cluster that you want to associate this instance group with.
|
java.lang.String |
getMarket()
Market type of the EC2 instances used to create a cluster node.
|
java.lang.String |
getName()
Friendly name given to the instance group.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAutoScalingPolicy(CfnInstanceGroupConfig.AutoScalingPolicyProperty value)
`AutoScalingPolicy` is a subproperty of `InstanceGroupConfig` .
|
void |
setAutoScalingPolicy(IResolvable value)
`AutoScalingPolicy` is a subproperty of `InstanceGroupConfig` .
|
void |
setBidPrice(java.lang.String value)
If specified, indicates that the instance group uses Spot Instances.
|
void |
setConfigurations(IResolvable value)
> Amazon EMR releases 4.x or later.
|
void |
setConfigurations(java.util.List<java.lang.Object> value)
> Amazon EMR releases 4.x or later.
|
void |
setCustomAmiId(java.lang.String value)
The custom AMI ID to use for the provisioned instance group.
|
void |
setEbsConfiguration(CfnInstanceGroupConfig.EbsConfigurationProperty value)
`EbsConfiguration` determines the EBS volumes to attach to EMR cluster instances.
|
void |
setEbsConfiguration(IResolvable value)
`EbsConfiguration` determines the EBS volumes to attach to EMR cluster instances.
|
void |
setInstanceCount(java.lang.Number value)
Target number of instances for the instance group.
|
void |
setInstanceRole(java.lang.String value)
The role of the instance group in the cluster.
|
void |
setInstanceType(java.lang.String value)
The EC2 instance type for all instances in the instance group.
|
void |
setJobFlowId(java.lang.String value)
The ID of an Amazon EMR cluster that you want to associate this instance group with.
|
void |
setMarket(java.lang.String value)
Market type of the EC2 instances used to create a cluster node.
|
void |
setName(java.lang.String value)
Friendly name given to the instance group.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnInstanceGroupConfig(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInstanceGroupConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnInstanceGroupConfig(Construct scope, java.lang.String id, CfnInstanceGroupConfigProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.Number getInstanceCount()
public void setInstanceCount(java.lang.Number value)
public java.lang.String getInstanceRole()
Allowed Values : TASK
public void setInstanceRole(java.lang.String value)
Allowed Values : TASK
public java.lang.String getInstanceType()
public void setInstanceType(java.lang.String value)
public java.lang.String getJobFlowId()
public void setJobFlowId(java.lang.String value)
public java.lang.Object getAutoScalingPolicy()
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 .
public void setAutoScalingPolicy(IResolvable value)
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 .
public void setAutoScalingPolicy(CfnInstanceGroupConfig.AutoScalingPolicyProperty value)
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 .
public java.lang.String getBidPrice()
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.
public void setBidPrice(java.lang.String value)
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.
public java.lang.Object getConfigurations()
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).
public void setConfigurations(IResolvable value)
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).
public void setConfigurations(java.util.List<java.lang.Object> value)
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).
public java.lang.String getCustomAmiId()
public void setCustomAmiId(java.lang.String value)
public java.lang.Object getEbsConfiguration()
public void setEbsConfiguration(IResolvable value)
public void setEbsConfiguration(CfnInstanceGroupConfig.EbsConfigurationProperty value)
public java.lang.String getMarket()
public void setMarket(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)