Enum AmazonLinuxKernel

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.382Z") @Stability(Stable) public enum AmazonLinuxKernel extends Enum<AmazonLinuxKernel>
Amazon Linux Kernel.

Example:

 Vpc vpc;
 InstanceType instanceType;
 // AWS Linux
 // AWS Linux
 Instance.Builder.create(this, "Instance1")
         .vpc(vpc)
         .instanceType(instanceType)
         .machineImage(new AmazonLinuxImage())
         .build();
 // AWS Linux 2
 // AWS Linux 2
 Instance.Builder.create(this, "Instance2")
         .vpc(vpc)
         .instanceType(instanceType)
         .machineImage(AmazonLinuxImage.Builder.create()
                 .generation(AmazonLinuxGeneration.AMAZON_LINUX_2)
                 .build())
         .build();
 // AWS Linux 2 with kernel 5.x
 // AWS Linux 2 with kernel 5.x
 Instance.Builder.create(this, "Instance3")
         .vpc(vpc)
         .instanceType(instanceType)
         .machineImage(AmazonLinuxImage.Builder.create()
                 .generation(AmazonLinuxGeneration.AMAZON_LINUX_2)
                 .kernel(AmazonLinuxKernel.KERNEL5_X)
                 .build())
         .build();
 // AWS Linux 2022
 // AWS Linux 2022
 Instance.Builder.create(this, "Instance4")
         .vpc(vpc)
         .instanceType(instanceType)
         .machineImage(AmazonLinuxImage.Builder.create()
                 .generation(AmazonLinuxGeneration.AMAZON_LINUX_2022)
                 .build())
         .build();
 
  • Enum Constant Details

    • KERNEL5_X

      @Stability(Stable) public static final AmazonLinuxKernel KERNEL5_X
      Standard edition.
  • Method Details

    • values

      public static AmazonLinuxKernel[] 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 AmazonLinuxKernel 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