Class InstanceType
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.InstanceType
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
- Direct Known Subclasses:
OptimalInstanceType
@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)",
date="2024-05-08T21:35:06.179Z")
@Stability(Stable)
public class InstanceType
extends software.amazon.jsii.JsiiObject
Instance type for EC2 instances.
This class takes a literal string, good if you already know the identifier of the type you want.
Example:
Vpc vpc; DatabaseCluster cluster = DatabaseCluster.Builder.create(this, "Database") .masterUser(Login.builder() .username("myuser") .build()) .instanceType(InstanceType.of(InstanceClass.MEMORY5, InstanceSize.LARGE)) .vpcSubnets(SubnetSelection.builder() .subnetType(SubnetType.PUBLIC) .build()) .vpc(vpc) .removalPolicy(RemovalPolicy.SNAPSHOT) .instanceRemovalPolicy(RemovalPolicy.RETAIN) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionInstanceType
(String instanceTypeIdentifier) protected
InstanceType
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
InstanceType
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe instance's CPU architecture.Return whether this instance type is a burstable instance type.static InstanceType
of
(InstanceClass instanceClass, InstanceSize instanceSize) Instance type for EC2 instances.sameInstanceClassAs
(InstanceType other) toString()
Return the instance type as a dotted string.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
InstanceType
protected InstanceType(software.amazon.jsii.JsiiObjectRef objRef) -
InstanceType
protected InstanceType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
InstanceType
- Parameters:
instanceTypeIdentifier
- This parameter is required.
-
-
Method Details
-
of
@Stability(Stable) @NotNull public static InstanceType of(@NotNull InstanceClass instanceClass, @NotNull InstanceSize instanceSize) 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.
- Parameters:
instanceClass
- This parameter is required.instanceSize
- This parameter is required.
-
isBurstable
Return whether this instance type is a burstable instance type. -
sameInstanceClassAs
- Parameters:
other
- This parameter is required.
-
toString
Return the instance type as a dotted string. -
getArchitecture
The instance's CPU architecture.
-