Skip to content
v2.274.0

OptimalInstanceType Class ​

Not a real instance type!

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

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();
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_batch as batch

optimal_instance_type = batch.OptimalInstanceType()
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.batch.*;

OptimalInstanceType optimalInstanceType = new OptimalInstanceType();
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.Batch;

var optimalInstanceType = new OptimalInstanceType();
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"

optimalInstanceType := awscdk.Aws_batch.NewOptimalInstanceType()

Initializer ​

ts
new OptimalInstanceType()
python
OptimalInstanceType()
java
new OptimalInstanceType()
csharp
new OptimalInstanceType()
go
NewOptimalInstanceType()

Properties ​

architectureInstanceArchitecturearchitectureInstanceArchitecturearchitectureInstanceArchitectureArchitectureInstanceArchitectureArchitectureInstanceArchitecturerequired#
The instance's CPU architecture.

Methods ​

isBurstable(): booleandef is_burstable(self, ) -> boolpublic Boolean isBurstable()public bool IsBurstable()func IsBurstable() *bool#
Return whether this instance type is a burstable instance type.
of(instanceClass: InstanceClass, instanceSize: InstanceSize): InstanceType@staticmethod def of(instance_class: InstanceClass, instance_size: InstanceSize) -> InstanceTypepublic static InstanceType of(InstanceClass instanceClass, InstanceSize instanceSize)public static InstanceType Of(InstanceClass instanceClass, InstanceSize instanceSize)func Of(InstanceClass InstanceClass, InstanceSize InstanceSize) InstanceTypestatic#
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): booleandef same_instance_class_as(self, other: InstanceType) -> boolpublic Boolean sameInstanceClassAs(InstanceType other)public bool SameInstanceClassAs(InstanceType other)func SameInstanceClassAs(Other InstanceType) *bool#
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Return the instance type as a dotted string.