# CapacityReservationTargetProperty

Specifies a target Capacity Reservation.

`CapacityReservationTarget` is a property of the [Amazon EC2 LaunchTemplate LaunchTemplateData](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html) property type.

- 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_ec2 as ec2 } from 'aws-cdk-lib';
const capacityReservationTargetProperty: ec2.CfnLaunchTemplate.CapacityReservationTargetProperty = {
  capacityReservationId: 'capacityReservationId',
  capacityReservationResourceGroupArn: 'capacityReservationResourceGroupArn',
};
```

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

capacity_reservation_target_property = ec2.CfnLaunchTemplate.CapacityReservationTargetProperty(
    capacity_reservation_id="capacityReservationId",
    capacity_reservation_resource_group_arn="capacityReservationResourceGroupArn"
)
```

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

CapacityReservationTargetProperty capacityReservationTargetProperty = CapacityReservationTargetProperty.builder()
        .capacityReservationId("capacityReservationId")
        .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
        .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 capacityReservationTargetProperty = new CapacityReservationTargetProperty {
    CapacityReservationId = "capacityReservationId",
    CapacityReservationResourceGroupArn = "capacityReservationResourceGroupArn"
};
```

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"

capacityReservationTargetProperty := &CapacityReservationTargetProperty{
	CapacityReservationId: jsii.String("capacityReservationId"),
	CapacityReservationResourceGroupArn: jsii.String("capacityReservationResourceGroupArn"),
}
```

## Properties

- `capacityReservationId`: string — The ID of the Capacity Reservation in which to run the instance.

- `capacityReservationResourceGroupArn`: string — The ARN of the Capacity Reservation resource group in which to run the instance.
