# CapacityAllocationProperty

Information about instance capacity usage for a Capacity Reservation.

- Source: Generated at build time
- Type last changed: v2.186.0 · 27 Mar 2025

## 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 capacityAllocationProperty: ec2.CfnCapacityReservation.CapacityAllocationProperty = {
  allocationType: 'allocationType',
  count: 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_ec2 as ec2

capacity_allocation_property = ec2.CfnCapacityReservation.CapacityAllocationProperty(
    allocation_type="allocationType",
    count=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.ec2.*;

CapacityAllocationProperty capacityAllocationProperty = CapacityAllocationProperty.builder()
        .allocationType("allocationType")
        .count(123)
        .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 capacityAllocationProperty = new CapacityAllocationProperty {
    AllocationType = "allocationType",
    Count = 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"

capacityAllocationProperty := &CapacityAllocationProperty{
	AllocationType: jsii.String("allocationType"),
	Count: jsii.Number(123),
}
```

## Properties

- `allocationType`: string — The usage type.

  `used` indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.

- `count`: number — The amount of instance capacity associated with the usage.

  For example a value of `4` indicates that instance capacity for 4 instances is currently in use.
