@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-09T19:16:32.388Z") public class CfnInstanceFleetConfig extends CfnResource implements IInspectable
Use InstanceFleetConfig
to define instance fleets for an EMR cluster. A cluster can not use both instance fleets and instance groups. For more information, see Configure Instance Fleets in the Amazon EMR Management Guide .
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. > You can currently only add a task instance fleet to a cluster with this resource. If you use this resource, CloudFormation waits for the cluster launch to complete before adding the task instance fleet to the cluster. In order to add a task instance fleet to the cluster as part of the cluster launch and minimize delays in provisioning task nodes, use the
TaskInstanceFleets
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_; CfnInstanceFleetConfig cfnInstanceFleetConfig = CfnInstanceFleetConfig.Builder.create(this, "MyCfnInstanceFleetConfig") .clusterId("clusterId") .instanceFleetType("instanceFleetType") // the properties below are optional .instanceTypeConfigs(List.of(InstanceTypeConfigProperty.builder() .instanceType("instanceType") // the properties below are optional .bidPrice("bidPrice") .bidPriceAsPercentageOfOnDemandPrice(123) .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()) .weightedCapacity(123) .build())) .launchSpecifications(InstanceFleetProvisioningSpecificationsProperty.builder() .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder() .allocationStrategy("allocationStrategy") .build()) .spotSpecification(SpotProvisioningSpecificationProperty.builder() .timeoutAction("timeoutAction") .timeoutDurationMinutes(123) // the properties below are optional .allocationStrategy("allocationStrategy") .blockDurationMinutes(123) .build()) .build()) .name("name") .targetOnDemandCapacity(123) .targetSpotCapacity(123) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnInstanceFleetConfig.Builder
A fluent builder for
CfnInstanceFleetConfig . |
static interface |
CfnInstanceFleetConfig.ConfigurationProperty
> Used only with Amazon EMR release 4.0 and later.
|
static interface |
CfnInstanceFleetConfig.EbsBlockDeviceConfigProperty
`EbsBlockDeviceConfig` is a subproperty of the `EbsConfiguration` property type.
|
static interface |
CfnInstanceFleetConfig.EbsConfigurationProperty
`EbsConfiguration` determines the EBS volumes to attach to EMR cluster instances.
|
static interface |
CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty
> The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
|
static interface |
CfnInstanceFleetConfig.InstanceTypeConfigProperty
`InstanceType` config is a subproperty of `InstanceFleetConfig` .
|
static interface |
CfnInstanceFleetConfig.OnDemandProvisioningSpecificationProperty
The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.
|
static interface |
CfnInstanceFleetConfig.SpotProvisioningSpecificationProperty
`SpotProvisioningSpecification` is a subproperty of the `InstanceFleetProvisioningSpecifications` property type.
|
static interface |
CfnInstanceFleetConfig.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 |
---|---|
|
CfnInstanceFleetConfig(Construct scope,
java.lang.String id,
CfnInstanceFleetConfigProps props)
Create a new `AWS::EMR::InstanceFleetConfig`.
|
protected |
CfnInstanceFleetConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnInstanceFleetConfig(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getClusterId()
The unique identifier of the EMR cluster.
|
java.lang.String |
getInstanceFleetType()
The node type that the instance fleet hosts.
|
java.lang.Object |
getInstanceTypeConfigs()
`InstanceTypeConfigs` determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
|
java.lang.Object |
getLaunchSpecifications()
The launch specification for the instance fleet.
|
java.lang.String |
getName()
The friendly name of the instance fleet.
|
java.lang.Number |
getTargetOnDemandCapacity()
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
|
java.lang.Number |
getTargetSpotCapacity()
The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
|
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 |
setClusterId(java.lang.String value)
The unique identifier of the EMR cluster.
|
void |
setInstanceFleetType(java.lang.String value)
The node type that the instance fleet hosts.
|
void |
setInstanceTypeConfigs(IResolvable value)
`InstanceTypeConfigs` determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
|
void |
setInstanceTypeConfigs(java.util.List<java.lang.Object> value)
`InstanceTypeConfigs` determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
|
void |
setLaunchSpecifications(CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty value)
The launch specification for the instance fleet.
|
void |
setLaunchSpecifications(IResolvable value)
The launch specification for the instance fleet.
|
void |
setName(java.lang.String value)
The friendly name of the instance fleet.
|
void |
setTargetOnDemandCapacity(java.lang.Number value)
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
|
void |
setTargetSpotCapacity(java.lang.Number value)
The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.
|
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 CfnInstanceFleetConfig(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInstanceFleetConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnInstanceFleetConfig(Construct scope, java.lang.String id, CfnInstanceFleetConfigProps 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.String getClusterId()
public void setClusterId(java.lang.String value)
public java.lang.String getInstanceFleetType()
Allowed Values : TASK
public void setInstanceFleetType(java.lang.String value)
Allowed Values : TASK
public java.lang.Object getInstanceTypeConfigs()
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
public void setInstanceTypeConfigs(IResolvable value)
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
public void setInstanceTypeConfigs(java.util.List<java.lang.Object> value)
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
public java.lang.Object getLaunchSpecifications()
public void setLaunchSpecifications(IResolvable value)
public void setLaunchSpecifications(CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.Number getTargetOnDemandCapacity()
When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig
. Each instance configuration has a specified WeightedCapacity
. When an On-Demand instance is provisioned, the WeightedCapacity
units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity
of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.
If not specified or set to 0, only Spot instances are provisioned for the instance fleet using
TargetSpotCapacity
. At least one ofTargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1.
public void setTargetOnDemandCapacity(java.lang.Number value)
When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig
. Each instance configuration has a specified WeightedCapacity
. When an On-Demand instance is provisioned, the WeightedCapacity
units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity
of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.
If not specified or set to 0, only Spot instances are provisioned for the instance fleet using
TargetSpotCapacity
. At least one ofTargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1.
public java.lang.Number getTargetSpotCapacity()
When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by InstanceTypeConfig
. Each instance configuration has a specified WeightedCapacity
. When a Spot instance is provisioned, the WeightedCapacity
units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity
of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.
If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of
TargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1.
public void setTargetSpotCapacity(java.lang.Number value)
When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by InstanceTypeConfig
. Each instance configuration has a specified WeightedCapacity
. When a Spot instance is provisioned, the WeightedCapacity
units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity
of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.
If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of
TargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1.