# InstanceFleetProvisioningSpecificationsProperty

> The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

`InstanceTypeConfig` is a sub-property of `InstanceFleetConfig` . `InstanceTypeConfig` determines the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_emr as emr } from 'aws-cdk-lib';
const instanceFleetProvisioningSpecificationsProperty: emr.CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty = {
  onDemandSpecification: {
    allocationStrategy: 'allocationStrategy',

    // the properties below are optional
    capacityReservationOptions: {
      capacityReservationPreference: 'capacityReservationPreference',
      capacityReservationResourceGroupArn: 'capacityReservationResourceGroupArn',
      usageStrategy: 'usageStrategy',
    },
  },
  spotSpecification: {
    timeoutAction: 'timeoutAction',
    timeoutDurationMinutes: 123,

    // the properties below are optional
    allocationStrategy: 'allocationStrategy',
    blockDurationMinutes: 123,
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_emr as emr

instance_fleet_provisioning_specifications_property = emr.CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty(
    on_demand_specification=emr.CfnInstanceFleetConfig.OnDemandProvisioningSpecificationProperty(
        allocation_strategy="allocationStrategy",

        # the properties below are optional
        capacity_reservation_options=emr.CfnInstanceFleetConfig.OnDemandCapacityReservationOptionsProperty(
            capacity_reservation_preference="capacityReservationPreference",
            capacity_reservation_resource_group_arn="capacityReservationResourceGroupArn",
            usage_strategy="usageStrategy"
        )
    ),
    spot_specification=emr.CfnInstanceFleetConfig.SpotProvisioningSpecificationProperty(
        timeout_action="timeoutAction",
        timeout_duration_minutes=123,

        # the properties below are optional
        allocation_strategy="allocationStrategy",
        block_duration_minutes=123
    )
)
```

Java:

```java
// 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.*;

InstanceFleetProvisioningSpecificationsProperty instanceFleetProvisioningSpecificationsProperty = InstanceFleetProvisioningSpecificationsProperty.builder()
        .onDemandSpecification(OnDemandProvisioningSpecificationProperty.builder()
                .allocationStrategy("allocationStrategy")

                // the properties below are optional
                .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
                        .capacityReservationPreference("capacityReservationPreference")
                        .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                        .usageStrategy("usageStrategy")
                        .build())
                .build())
        .spotSpecification(SpotProvisioningSpecificationProperty.builder()
                .timeoutAction("timeoutAction")
                .timeoutDurationMinutes(123)

                // the properties below are optional
                .allocationStrategy("allocationStrategy")
                .blockDurationMinutes(123)
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EMR;

var instanceFleetProvisioningSpecificationsProperty = new InstanceFleetProvisioningSpecificationsProperty {
    OnDemandSpecification = new OnDemandProvisioningSpecificationProperty {
        AllocationStrategy = "allocationStrategy",

        // the properties below are optional
        CapacityReservationOptions = new OnDemandCapacityReservationOptionsProperty {
            CapacityReservationPreference = "capacityReservationPreference",
            CapacityReservationResourceGroupArn = "capacityReservationResourceGroupArn",
            UsageStrategy = "usageStrategy"
        }
    },
    SpotSpecification = new SpotProvisioningSpecificationProperty {
        TimeoutAction = "timeoutAction",
        TimeoutDurationMinutes = 123,

        // the properties below are optional
        AllocationStrategy = "allocationStrategy",
        BlockDurationMinutes = 123
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

instanceFleetProvisioningSpecificationsProperty := &InstanceFleetProvisioningSpecificationsProperty{
	OnDemandSpecification: &OnDemandProvisioningSpecificationProperty{
		AllocationStrategy: jsii.String("allocationStrategy"),

		// the properties below are optional
		CapacityReservationOptions: &OnDemandCapacityReservationOptionsProperty{
			CapacityReservationPreference: jsii.String("capacityReservationPreference"),
			CapacityReservationResourceGroupArn: jsii.String("capacityReservationResourceGroupArn"),
			UsageStrategy: jsii.String("usageStrategy"),
		},
	},
	SpotSpecification: &SpotProvisioningSpecificationProperty{
		TimeoutAction: jsii.String("timeoutAction"),
		TimeoutDurationMinutes: jsii.Number(123),

		// the properties below are optional
		AllocationStrategy: jsii.String("allocationStrategy"),
		BlockDurationMinutes: jsii.Number(123),
	},
}
```

## Properties

- `onDemandSpecification`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInstanceFleetConfig.OnDemandProvisioningSpecificationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_emr.CfnInstanceFleetConfig.OnDemandProvisioningSpecificationProperty.html) — The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy and capacity reservation options.

  > The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later.

- `spotSpecification`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInstanceFleetConfig.SpotProvisioningSpecificationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_emr.CfnInstanceFleetConfig.SpotProvisioningSpecificationProperty.html) — The launch specification for Spot instances in the fleet, which determines the allocation strategy, defined duration, and provisioning timeout behavior.
