Enum LocalStorageType

java.lang.Object
java.lang.Enum<LocalStorageType>
software.amazon.awscdk.services.ec2.LocalStorageType
All Implemented Interfaces:
Serializable, Comparable<LocalStorageType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-02T12:05:07.851Z") @Stability(Stable) public enum LocalStorageType extends Enum<LocalStorageType>
Types of local storage available for EC2 instances.

Specifies the physical medium used for local (instance store) storage.

Example:

 Vpc vpc;
 SecurityGroup securityGroup = SecurityGroup.Builder.create(this, "SecurityGroup")
         .vpc(vpc)
         .description("Security group for managed instances")
         .build();
 ManagedInstancesCapacityProvider miCapacityProvider = ManagedInstancesCapacityProvider.Builder.create(this, "MICapacityProvider")
         .subnets(vpc.getPrivateSubnets())
         .securityGroups(List.of(securityGroup))
         .instanceRequirements(InstanceRequirementsConfig.builder()
                 // Required: CPU and memory constraints
                 .vCpuCountMin(2)
                 .vCpuCountMax(8)
                 .memoryMin(Size.gibibytes(4))
                 .memoryMax(Size.gibibytes(32))
                 // CPU preferences
                 .cpuManufacturers(List.of(CpuManufacturer.INTEL, CpuManufacturer.AMD))
                 .instanceGenerations(List.of(InstanceGeneration.CURRENT))
                 // Instance type filtering
                 .allowedInstanceTypes(List.of("m5.*", "c5.*"))
                 // Performance characteristics
                 .burstablePerformance(BurstablePerformance.EXCLUDED)
                 .bareMetal(BareMetal.EXCLUDED)
                 // Accelerator requirements (for ML/AI workloads)
                 .acceleratorTypes(List.of(AcceleratorType.GPU))
                 .acceleratorManufacturers(List.of(AcceleratorManufacturer.NVIDIA))
                 .acceleratorNames(List.of(AcceleratorName.T4, AcceleratorName.V100))
                 .acceleratorCountMin(1)
                 // Storage requirements
                 .localStorage(LocalStorage.REQUIRED)
                 .localStorageTypes(List.of(LocalStorageType.SSD))
                 .totalLocalStorageGBMin(100)
                 // Network requirements
                 .networkInterfaceCountMin(2)
                 .networkBandwidthGbpsMin(10)
                 // Cost optimization
                 .onDemandMaxPricePercentageOverLowestPrice(10)
                 .build())
         .build();
 
  • Enum Constant Details

    • HDD

      @Stability(Stable) public static final LocalStorageType HDD
      Hard disk drive storage.
    • SSD

      @Stability(Stable) public static final LocalStorageType SSD
      Solid state drive storage.
  • Method Details

    • values

      public static LocalStorageType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static LocalStorageType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null