# InstanceFleetConfigProperty

The configuration that defines an instance fleet.

- Source: [`aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts#L953)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';

declare const configurationProperty_: stepfunctions_tasks.EmrCreateCluster.ConfigurationProperty;
declare const size: cdk.Size;
const instanceFleetConfigProperty: stepfunctions_tasks.EmrCreateCluster.InstanceFleetConfigProperty = {
  instanceFleetType: stepfunctions_tasks.EmrCreateCluster.InstanceRoleType.MASTER,

  // the properties below are optional
  instanceTypeConfigs: [{
    instanceType: 'instanceType',

    // the properties below are optional
    bidPrice: 'bidPrice',
    bidPriceAsPercentageOfOnDemandPrice: 123,
    configurations: [{
      classification: 'classification',
      configurations: [configurationProperty_],
      properties: {
        propertiesKey: 'properties',
      },
    }],
    ebsConfiguration: {
      ebsBlockDeviceConfigs: [{
        volumeSpecification: {
          volumeSize: size,
          volumeType: stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType.GP3,

          // the properties below are optional
          iops: 123,
        },

        // the properties below are optional
        volumesPerInstance: 123,
      }],
      ebsOptimized: false,
    },
    priority: 123,
    weightedCapacity: 123,
  }],
  launchSpecifications: {
    onDemandSpecification: {
      allocationStrategy: stepfunctions_tasks.EmrCreateCluster.OnDemandAllocationStrategy.LOWEST_PRICE,
    },
    spotSpecification: {
      timeoutAction: stepfunctions_tasks.EmrCreateCluster.SpotTimeoutAction.SWITCH_TO_ON_DEMAND,

      // the properties below are optional
      allocationStrategy: stepfunctions_tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
      blockDurationMinutes: 123,
      timeout: cdk.Duration.minutes(30),
      timeoutDurationMinutes: 123,
    },
  },
  name: 'name',
  targetOnDemandCapacity: 123,
  targetSpotCapacity: 123,
};
```

## Properties

- `instanceFleetType`: [EmrCreateCluster.InstanceRoleType](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.InstanceRoleType.html) (required) — The node type that the instance fleet hosts.

  Valid values are MASTER,CORE,and TASK.

- `instanceTypeConfigs`: [EmrCreateCluster.InstanceTypeConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.InstanceTypeConfigProperty.html)[] — The instance type configurations that define the EC2 instances in the instance fleet.

  **Default:** No instanceTpeConfigs

- `launchSpecifications`: [EmrCreateCluster.InstanceFleetProvisioningSpecificationsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.InstanceFleetProvisioningSpecificationsProperty.html) — The launch specification for the instance fleet.

  **Default:** No launchSpecifications

- `name`: string — The friendly name of the instance fleet.

  **Default:** No name

- `targetOnDemandCapacity`: number — The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

  **Default:** No targetOnDemandCapacity

  If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using `targetSpotCapacity`.

  At least one of `targetSpotCapacity` and `targetOnDemandCapacity` should be greater than 0.
  For a master instance fleet, only one of `targetSpotCapacity` and `targetOnDemandCapacity` can be specified, and its value
  must be 1.

- `targetSpotCapacity`: number — The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

  **Default:** No targetSpotCapacity

  If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet using `targetOnDemandCapacity`.

  At least one of `targetSpotCapacity` and `targetOnDemandCapacity` should be greater than 0.
  For a master instance fleet, only one of `targetSpotCapacity` and `targetOnDemandCapacity` can be specified, and its value
  must be 1.
