# CapacityReservationConfigProperty

Settings for the capacity reservation for the compute instances that SageMaker AI reserves for an endpoint.

- Source: Generated at build time
- Type last changed: v2.214.0 · 2 Sep 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_sagemaker as sagemaker } from 'aws-cdk-lib';
const capacityReservationConfigProperty: sagemaker.CfnEndpointConfig.CapacityReservationConfigProperty = {
  capacityReservationPreference: 'capacityReservationPreference',
  mlReservationArn: 'mlReservationArn',
};
```

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_sagemaker as sagemaker

capacity_reservation_config_property = sagemaker.CfnEndpointConfig.CapacityReservationConfigProperty(
    capacity_reservation_preference="capacityReservationPreference",
    ml_reservation_arn="mlReservationArn"
)
```

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

CapacityReservationConfigProperty capacityReservationConfigProperty = CapacityReservationConfigProperty.builder()
        .capacityReservationPreference("capacityReservationPreference")
        .mlReservationArn("mlReservationArn")
        .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.Sagemaker;

var capacityReservationConfigProperty = new CapacityReservationConfigProperty {
    CapacityReservationPreference = "capacityReservationPreference",
    MlReservationArn = "mlReservationArn"
};
```

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"

capacityReservationConfigProperty := &CapacityReservationConfigProperty{
	CapacityReservationPreference: jsii.String("capacityReservationPreference"),
	MlReservationArn: jsii.String("mlReservationArn"),
}
```

## Properties

- `capacityReservationPreference`: string — Options that you can choose for the capacity reservation.

- `mlReservationArn`: string — The Amazon Resource Name (ARN) that uniquely identifies the ML capacity reservation that SageMaker AI applies when it deploys the endpoint.
