# InferenceAccelerator

Elastic Inference Accelerator.

For more information, see [Elastic Inference Basics](https://docs.aws.amazon.com/elastic-inference/latest/developerguide/basics.html)

Used as argument in: [TaskDefinition.addInferenceAccelerator](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.TaskDefinition.html#addinferenceaccelerator)

- Source: [`aws-ecs/lib/base/task-definition.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecs/lib/base/task-definition.ts#L1114)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const inferenceAccelerator: ecs.InferenceAccelerator = {
  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_ecs as ecs

inference_accelerator = ecs.InferenceAccelerator(
    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.ecs.*;

InferenceAccelerator inferenceAccelerator = InferenceAccelerator.builder()
        .deviceName("deviceName")
        .deviceType("deviceType")
        .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.ECS;

var inferenceAccelerator = new InferenceAccelerator {
    DeviceName = "deviceName",
    DeviceType = "deviceType"
};
```

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"

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

## Properties

- `deviceName`: string = empty — The Elastic Inference accelerator device name.

- `deviceType`: string = empty — The Elastic Inference accelerator type to use.

  The allowed values are: eia2.medium, eia2.large and eia2.xlarge.
