@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.216Z") @Stability(value=Stable) 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
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();
| 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 will be 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnInstanceGroupConfig(software.constructs.Construct scope,
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 |
|---|---|
Object |
getAutoScalingPolicy()
`AutoScalingPolicy` is a subproperty of `InstanceGroupConfig` .
|
String |
getBidPrice()
If specified, indicates that the instance group uses Spot Instances.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getConfigurations()
> Amazon EMR releases 4.x or later.
|
String |
getCustomAmiId()
The custom AMI ID to use for the provisioned instance group.
|
Object |
getEbsConfiguration()
`EbsConfiguration` determines the EBS volumes to attach to EMR cluster instances.
|
Number |
getInstanceCount()
Target number of instances for the instance group.
|
String |
getInstanceRole()
The role of the instance group in the cluster.
|
String |
getInstanceType()
The EC2 instance type for all instances in the instance group.
|
String |
getJobFlowId()
The ID of an Amazon EMR cluster that you want to associate this instance group with.
|
String |
getMarket()
Market type of the EC2 instances used to create a cluster node.
|
String |
getName()
Friendly name given to the instance group.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,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(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(List<Object> value)
> Amazon EMR releases 4.x or later.
|
void |
setCustomAmiId(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(Number value)
Target number of instances for the instance group.
|
void |
setInstanceRole(String value)
The role of the instance group in the cluster.
|
void |
setInstanceType(String value)
The EC2 instance type for all instances in the instance group.
|
void |
setJobFlowId(String value)
The ID of an Amazon EMR cluster that you want to associate this instance group with.
|
void |
setMarket(String value)
Market type of the EC2 instances used to create a cluster node.
|
void |
setName(String value)
Friendly name given to the instance group.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnInstanceGroupConfig(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInstanceGroupConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnInstanceGroupConfig(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public Number getInstanceCount()
@Stability(value=Stable)
public void setInstanceCount(@NotNull
Number value)
@Stability(value=Stable) @NotNull public String getInstanceRole()
Allowed Values : TASK
@Stability(value=Stable)
public void setInstanceRole(@NotNull
String value)
Allowed Values : TASK
@Stability(value=Stable) @NotNull public String getInstanceType()
@Stability(value=Stable)
public void setInstanceType(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getJobFlowId()
@Stability(value=Stable)
public void setJobFlowId(@NotNull
String value)
@Stability(value=Stable) @Nullable public 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 .
@Stability(value=Stable)
public void setAutoScalingPolicy(@Nullable
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 .
@Stability(value=Stable)
public void setAutoScalingPolicy(@Nullable
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 .
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setBidPrice(@Nullable
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.
@Stability(value=Stable) @Nullable public 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).
@Stability(value=Stable)
public void setConfigurations(@Nullable
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).
@Stability(value=Stable)
public void setConfigurations(@Nullable
List<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).
@Stability(value=Stable) @Nullable public String getCustomAmiId()
@Stability(value=Stable)
public void setCustomAmiId(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getEbsConfiguration()
@Stability(value=Stable)
public void setEbsConfiguration(@Nullable
CfnInstanceGroupConfig.EbsConfigurationProperty value)
@Stability(value=Stable)
public void setEbsConfiguration(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getMarket()
@Stability(value=Stable)
public void setMarket(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getName()
@Stability(value=Stable)
public void setName(@Nullable
String value)
Copyright © 2022. All rights reserved.