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

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-09-25T13:53:46.599Z") @Stability(Stable) public enum HostKernel extends Enum<HostKernel>
The host operating system kernel used for builds in a CodeBuild project.

The host kernel does not affect the build environment operating system, which is determined by the build image.

Only applies to the LINUX_CONTAINER, ARM_CONTAINER, LINUX_EC2 and ARM_EC2 environment types. It is not applicable to Windows, Lambda or Mac environment types.

Example:

 Project.Builder.create(this, "Project")
         .environment(BuildEnvironment.builder()
                 .buildImage(LinuxBuildImage.STANDARD_7_0)
                 .hostKernel(HostKernel.LINUX_KERNEL_6)
                 .build())
         .build();
 

See Also:
  • Enum Constant Details

    • LINUX_KERNEL_4

      @Stability(Stable) public static final HostKernel LINUX_KERNEL_4
      Runs on an Amazon Linux 2 host (kernel 4.x).
    • LINUX_KERNEL_6

      @Stability(Stable) public static final HostKernel LINUX_KERNEL_6
      Runs on an Amazon Linux 2023 host (kernel 6.x).
    • LINUX_KERNEL_LATEST

      @Stability(Stable) public static final HostKernel LINUX_KERNEL_LATEST
      Runs on the latest supported host kernel.
  • Method Details

    • values

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