# OptimalInstanceType

Not a real instance type!

Indicates that Batch will choose one it determines to be optimal
for the workload.

Extends: InstanceType › OptimalInstanceType

- Source: [`aws-batch/lib/multinode-job-definition.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-batch/lib/multinode-job-definition.ts#L18)
- Type last changed: v2.99.0 · 28 Sep 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
const optimalInstanceType = new batch.OptimalInstanceType();
```

## Initializer

```ts
new OptimalInstanceType()
```

## Properties

- `architecture`: [InstanceArchitecture](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.InstanceArchitecture.html) — The instance's CPU architecture.

## Methods

- `isBurstable(): boolean` — Return whether this instance type is a burstable instance type.

- `of(instanceClass: InstanceClass, instanceSize: InstanceSize): InstanceType` (static) — Instance type for EC2 instances.

  This class takes a combination of a class and size.

  Be aware that not all combinations of class and size are available, and not all
  classes are available in all regions.

- `sameInstanceClassAs(other: InstanceType): boolean`

- `toString(): string` — Return the instance type as a dotted string.
