@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.209Z") @Stability(value=Stable) 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
TaskInstanceFleetssubproperty 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.
|
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 |
|---|---|
|
CfnInstanceFleetConfig(software.constructs.Construct scope,
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 Map<String,Object> |
getCfnProperties() |
String |
getClusterId()
The unique identifier of the EMR cluster.
|
String |
getInstanceFleetType()
The node type that the instance fleet hosts.
|
Object |
getInstanceTypeConfigs()
`InstanceTypeConfigs` determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.
|
Object |
getLaunchSpecifications()
The launch specification for the instance fleet.
|
String |
getName()
The friendly name of the instance fleet.
|
Number |
getTargetOnDemandCapacity()
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
|
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 Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setClusterId(String value)
The unique identifier of the EMR cluster.
|
void |
setInstanceFleetType(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(List<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(String value)
The friendly name of the instance fleet.
|
void |
setTargetOnDemandCapacity(Number value)
The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.
|
void |
setTargetSpotCapacity(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, 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 CfnInstanceFleetConfig(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInstanceFleetConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnInstanceFleetConfig(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@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 String getClusterId()
@Stability(value=Stable)
public void setClusterId(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getInstanceFleetType()
Allowed Values : TASK
@Stability(value=Stable)
public void setInstanceFleetType(@NotNull
String value)
Allowed Values : TASK
@Stability(value=Stable) @Nullable public Object getInstanceTypeConfigs()
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
@Stability(value=Stable)
public void setInstanceTypeConfigs(@Nullable
IResolvable value)
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
@Stability(value=Stable)
public void setInstanceTypeConfigs(@Nullable
List<Object> value)
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
@Stability(value=Stable) @Nullable public Object getLaunchSpecifications()
@Stability(value=Stable)
public void setLaunchSpecifications(@Nullable
CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty value)
@Stability(value=Stable)
public void setLaunchSpecifications(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getName()
@Stability(value=Stable)
public void setName(@Nullable
String value)
@Stability(value=Stable) @Nullable public 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 ofTargetSpotCapacityandTargetOnDemandCapacityshould be greater than 0. For a master instance fleet, only one ofTargetSpotCapacityandTargetOnDemandCapacitycan be specified, and its value must be 1.
@Stability(value=Stable)
public void setTargetOnDemandCapacity(@Nullable
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 ofTargetSpotCapacityandTargetOnDemandCapacityshould be greater than 0. For a master instance fleet, only one ofTargetSpotCapacityandTargetOnDemandCapacitycan be specified, and its value must be 1.
@Stability(value=Stable) @Nullable public 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
TargetSpotCapacityandTargetOnDemandCapacityshould be greater than 0. For a master instance fleet, only one ofTargetSpotCapacityandTargetOnDemandCapacitycan be specified, and its value must be 1.
@Stability(value=Stable)
public void setTargetSpotCapacity(@Nullable
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
TargetSpotCapacityandTargetOnDemandCapacityshould be greater than 0. For a master instance fleet, only one ofTargetSpotCapacityandTargetOnDemandCapacitycan be specified, and its value must be 1.
Copyright © 2022. All rights reserved.