# ReservedCapacityOptionsRequestProperty

- Source: Generated at build time
- Type last changed: v2.268.0 · 2 Sep 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const reservedCapacityOptionsRequestProperty: ec2.CfnEC2Fleet.ReservedCapacityOptionsRequestProperty = {
  allocationStrategy: 'allocationStrategy',
  capacityReservationTarget: {
    capacityReservationIds: ['capacityReservationIds'],
    capacityReservationResourceGroupArns: ['capacityReservationResourceGroupArns'],
  },
  reservationTypes: ['reservationTypes'],
  reservedCapacityFallbackOptions: {
    marketTypes: ['marketTypes'],
  },
};
```

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_ec2 as ec2

reserved_capacity_options_request_property = ec2.CfnEC2Fleet.ReservedCapacityOptionsRequestProperty(
    allocation_strategy="allocationStrategy",
    capacity_reservation_target=ec2.CfnEC2Fleet.CapacityReservationTargetRequestProperty(
        capacity_reservation_ids=["capacityReservationIds"],
        capacity_reservation_resource_group_arns=["capacityReservationResourceGroupArns"]
    ),
    reservation_types=["reservationTypes"],
    reserved_capacity_fallback_options=ec2.CfnEC2Fleet.ReservedCapacityFallbackOptionsRequestProperty(
        market_types=["marketTypes"]
    )
)
```

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.ec2.*;

ReservedCapacityOptionsRequestProperty reservedCapacityOptionsRequestProperty = ReservedCapacityOptionsRequestProperty.builder()
        .allocationStrategy("allocationStrategy")
        .capacityReservationTarget(CapacityReservationTargetRequestProperty.builder()
                .capacityReservationIds(List.of("capacityReservationIds"))
                .capacityReservationResourceGroupArns(List.of("capacityReservationResourceGroupArns"))
                .build())
        .reservationTypes(List.of("reservationTypes"))
        .reservedCapacityFallbackOptions(ReservedCapacityFallbackOptionsRequestProperty.builder()
                .marketTypes(List.of("marketTypes"))
                .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.EC2;

var reservedCapacityOptionsRequestProperty = new ReservedCapacityOptionsRequestProperty {
    AllocationStrategy = "allocationStrategy",
    CapacityReservationTarget = new CapacityReservationTargetRequestProperty {
        CapacityReservationIds = new [] { "capacityReservationIds" },
        CapacityReservationResourceGroupArns = new [] { "capacityReservationResourceGroupArns" }
    },
    ReservationTypes = new [] { "reservationTypes" },
    ReservedCapacityFallbackOptions = new ReservedCapacityFallbackOptionsRequestProperty {
        MarketTypes = new [] { "marketTypes" }
    }
};
```

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"

reservedCapacityOptionsRequestProperty := &ReservedCapacityOptionsRequestProperty{
	AllocationStrategy: jsii.String("allocationStrategy"),
	CapacityReservationTarget: &CapacityReservationTargetRequestProperty{
		CapacityReservationIds: []*string{
			jsii.String("capacityReservationIds"),
		},
		CapacityReservationResourceGroupArns: []*string{
			jsii.String("capacityReservationResourceGroupArns"),
		},
	},
	ReservationTypes: []*string{
		jsii.String("reservationTypes"),
	},
	ReservedCapacityFallbackOptions: &ReservedCapacityFallbackOptionsRequestProperty{
		MarketTypes: []*string{
			jsii.String("marketTypes"),
		},
	},
}
```

## Properties

- `allocationStrategy`: string

- `capacityReservationTarget`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnEC2Fleet.CapacityReservationTargetRequestProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnEC2Fleet.CapacityReservationTargetRequestProperty.html)

- `reservationTypes`: string[]

- `reservedCapacityFallbackOptions`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnEC2Fleet.ReservedCapacityFallbackOptionsRequestProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnEC2Fleet.ReservedCapacityFallbackOptionsRequestProperty.html)
