# InferenceAcceleratorOverride

Struct · Stable

Override inference accelerators for the task.

- Source: [`aws-events-targets/lib/ecs-task-properties.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-events-targets/lib/ecs-task-properties.ts#L75)
- Type last changed: v2.179.0 · 18 Feb 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_events_targets as events_targets } from 'aws-cdk-lib';
const inferenceAcceleratorOverride: events_targets.InferenceAcceleratorOverride = {
  deviceName: 'deviceName',
  deviceType: 'deviceType',
};
```

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_events_targets as events_targets

inference_accelerator_override = events_targets.InferenceAcceleratorOverride(
    device_name="deviceName",
    device_type="deviceType"
)
```

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

InferenceAcceleratorOverride inferenceAcceleratorOverride = InferenceAcceleratorOverride.builder()
        .deviceName("deviceName")
        .deviceType("deviceType")
        .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.Events.Targets;

var inferenceAcceleratorOverride = new InferenceAcceleratorOverride {
    DeviceName = "deviceName",
    DeviceType = "deviceType"
};
```

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"

inferenceAcceleratorOverride := &InferenceAcceleratorOverride{
	DeviceName: jsii.String("deviceName"),
	DeviceType: jsii.String("deviceType"),
}
```

## Properties

- `deviceName`: string (required) — The Elastic Inference accelerator device name to override for the task.

  This parameter must match a `deviceName` specified in the task definition.

- `deviceType`: string (required) — The Elastic Inference accelerator type to use.
