# InstanceFleetResizingSpecificationsProperty

Struct · External

The resize specification for On-Demand and Spot Instances in the fleet.

- Source: Generated at build time
- Type last changed: v2.162.0 · 10 Oct 2024

## 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 instanceFleetResizingSpecificationsProperty: emr.CfnInstanceFleetConfig.InstanceFleetResizingSpecificationsProperty = {
  onDemandResizeSpecification: {
    allocationStrategy: 'allocationStrategy',
    capacityReservationOptions: {
      capacityReservationPreference: 'capacityReservationPreference',
      capacityReservationResourceGroupArn: 'capacityReservationResourceGroupArn',
      usageStrategy: 'usageStrategy',
    },
    timeoutDurationMinutes: 123,
  },
  spotResizeSpecification: {
    allocationStrategy: 'allocationStrategy',
    timeoutDurationMinutes: 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_resizing_specifications_property = emr.CfnInstanceFleetConfig.InstanceFleetResizingSpecificationsProperty(
    on_demand_resize_specification=emr.CfnInstanceFleetConfig.OnDemandResizingSpecificationProperty(
        allocation_strategy="allocationStrategy",
        capacity_reservation_options=emr.CfnInstanceFleetConfig.OnDemandCapacityReservationOptionsProperty(
            capacity_reservation_preference="capacityReservationPreference",
            capacity_reservation_resource_group_arn="capacityReservationResourceGroupArn",
            usage_strategy="usageStrategy"
        ),
        timeout_duration_minutes=123
    ),
    spot_resize_specification=emr.CfnInstanceFleetConfig.SpotResizingSpecificationProperty(
        allocation_strategy="allocationStrategy",
        timeout_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.*;

InstanceFleetResizingSpecificationsProperty instanceFleetResizingSpecificationsProperty = InstanceFleetResizingSpecificationsProperty.builder()
        .onDemandResizeSpecification(OnDemandResizingSpecificationProperty.builder()
                .allocationStrategy("allocationStrategy")
                .capacityReservationOptions(OnDemandCapacityReservationOptionsProperty.builder()
                        .capacityReservationPreference("capacityReservationPreference")
                        .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                        .usageStrategy("usageStrategy")
                        .build())
                .timeoutDurationMinutes(123)
                .build())
        .spotResizeSpecification(SpotResizingSpecificationProperty.builder()
                .allocationStrategy("allocationStrategy")
                .timeoutDurationMinutes(123)
                .build())
        .build();
```

C#:

```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 instanceFleetResizingSpecificationsProperty = new InstanceFleetResizingSpecificationsProperty {
    OnDemandResizeSpecification = new OnDemandResizingSpecificationProperty {
        AllocationStrategy = "allocationStrategy",
        CapacityReservationOptions = new OnDemandCapacityReservationOptionsProperty {
            CapacityReservationPreference = "capacityReservationPreference",
            CapacityReservationResourceGroupArn = "capacityReservationResourceGroupArn",
            UsageStrategy = "usageStrategy"
        },
        TimeoutDurationMinutes = 123
    },
    SpotResizeSpecification = new SpotResizingSpecificationProperty {
        AllocationStrategy = "allocationStrategy",
        TimeoutDurationMinutes = 123
    }
};
```

Go:

```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"

instanceFleetResizingSpecificationsProperty := &InstanceFleetResizingSpecificationsProperty{
	OnDemandResizeSpecification: &OnDemandResizingSpecificationProperty{
		AllocationStrategy: jsii.String("allocationStrategy"),
		CapacityReservationOptions: &OnDemandCapacityReservationOptionsProperty{
			CapacityReservationPreference: jsii.String("capacityReservationPreference"),
			CapacityReservationResourceGroupArn: jsii.String("capacityReservationResourceGroupArn"),
			UsageStrategy: jsii.String("usageStrategy"),
		},
		TimeoutDurationMinutes: jsii.Number(123),
	},
	SpotResizeSpecification: &SpotResizingSpecificationProperty{
		AllocationStrategy: jsii.String("allocationStrategy"),
		TimeoutDurationMinutes: jsii.Number(123),
	},
}
```

## Properties

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

- `spotResizeSpecification`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInstanceFleetConfig.SpotResizingSpecificationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_emr.CfnInstanceFleetConfig.SpotResizingSpecificationProperty.html) — The resize specification for Spot Instances in the instance fleet, which contains the allocation strategy and the resize timeout period.
