Class LinuxArmBuildImage

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codebuild.LinuxArmBuildImage
All Implemented Interfaces:
IBuildImage, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:33:59.041Z") @Stability(Stable) public class LinuxArmBuildImage extends software.amazon.jsii.JsiiObject implements IBuildImage
A CodeBuild image running aarch64 Linux.

This class has a bunch of public constants that represent the CodeBuild ARM images.

You can also specify a custom image using the static method:

  • LinuxBuildImage.fromEcrRepository(repo[, tag])
  • LinuxBuildImage.fromDockerRegistry(image[, { secretsManagerCredentials }])

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.codebuild.*;
 IBuildImage linuxArmBuildImage = LinuxArmBuildImage.fromCodeBuildImageId("id");
 

See Also:
  • Field Details

    • AMAZON_LINUX_2_STANDARD_1_0

      @Stability(Deprecated) @Deprecated public static final IBuildImage AMAZON_LINUX_2_STANDARD_1_0
      Deprecated.
      Use
      invalid @link
      LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0
      instead.
      (deprecated) Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0".

    • AMAZON_LINUX_2_STANDARD_2_0

      @Stability(Stable) public static final IBuildImage AMAZON_LINUX_2_STANDARD_2_0
      Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0" based on Amazon Linux 2.
    • AMAZON_LINUX_2_STANDARD_3_0

      @Stability(Stable) public static final IBuildImage AMAZON_LINUX_2_STANDARD_3_0
      Image "aws/codebuild/amazonlinux2-aarch64-standard:3.0" based on Amazon Linux 2023.
  • Constructor Details

    • LinuxArmBuildImage

      protected LinuxArmBuildImage(software.amazon.jsii.JsiiObjectRef objRef)
    • LinuxArmBuildImage

      protected LinuxArmBuildImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • fromCodeBuildImageId

      @Stability(Stable) @NotNull public static IBuildImage fromCodeBuildImageId(@NotNull String id)
      Uses a Docker image provided by CodeBuild.

      Example:

       "aws/codebuild/amazonlinux2-aarch64-standard:1.0";
       

      Parameters:
      id - The image identifier. This parameter is required.
      Returns:
      A Docker image provided by CodeBuild.
      See Also:
    • fromDockerRegistry

      @Stability(Stable) @NotNull public static IBuildImage fromDockerRegistry(@NotNull String name, @Nullable DockerImageOptions options)
      Parameters:
      name - This parameter is required.
      options -
      Returns:
      a x86-64 Linux build image from a Docker Hub image.
    • fromDockerRegistry

      @Stability(Stable) @NotNull public static IBuildImage fromDockerRegistry(@NotNull String name)
      Parameters:
      name - This parameter is required.
      Returns:
      a x86-64 Linux build image from a Docker Hub image.
    • fromEcrRepository

      @Stability(Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository, @Nullable String tagOrDigest)
      Returns an ARM image running Linux from an ECR repository.

      NOTE: if the repository is external (i.e. imported), then we won't be able to add a resource policy statement for it so CodeBuild can pull the image.

      Parameters:
      repository - The ECR repository. This parameter is required.
      tagOrDigest - Image tag or digest (default "latest", digests must start with sha256:).
      Returns:
      An aarch64 Linux build image from an ECR repository.
      See Also:
    • fromEcrRepository

      @Stability(Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository)
      Returns an ARM image running Linux from an ECR repository.

      NOTE: if the repository is external (i.e. imported), then we won't be able to add a resource policy statement for it so CodeBuild can pull the image.

      Parameters:
      repository - The ECR repository. This parameter is required.
      Returns:
      An aarch64 Linux build image from an ECR repository.
      See Also:
    • runScriptBuildspec

      @Stability(Stable) @NotNull public BuildSpec runScriptBuildspec(@NotNull String entrypoint)
      Make a buildspec to run the indicated script.

      Specified by:
      runScriptBuildspec in interface IBuildImage
      Parameters:
      entrypoint - This parameter is required.
    • validate

      @Stability(Stable) @NotNull public List<String> validate(@NotNull BuildEnvironment buildEnvironment)
      Validates by checking the BuildEnvironment computeType as aarch64 images only support ComputeType.SMALL and ComputeType.LARGE.

      Specified by:
      validate in interface IBuildImage
      Parameters:
      buildEnvironment - BuildEnvironment. This parameter is required.
    • getDefaultComputeType

      @Stability(Stable) @NotNull public ComputeType getDefaultComputeType()
      The default ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly.
      Specified by:
      getDefaultComputeType in interface IBuildImage
    • getImageId

      @Stability(Stable) @NotNull public String getImageId()
      The Docker image identifier that the build environment uses.
      Specified by:
      getImageId in interface IBuildImage
      See Also:
    • getType

      @Stability(Stable) @NotNull public String getType()
      The type of build environment.
      Specified by:
      getType in interface IBuildImage
    • getImagePullPrincipalType

      @Stability(Stable) @Nullable public ImagePullPrincipalType getImagePullPrincipalType()
      The type of principal that CodeBuild will use to pull this build Docker image.
      Specified by:
      getImagePullPrincipalType in interface IBuildImage
    • getRepository

      @Stability(Stable) @Nullable public IRepository getRepository()
      An optional ECR repository that the image is hosted in.
      Specified by:
      getRepository in interface IBuildImage
    • getSecretsManagerCredentials

      @Stability(Stable) @Nullable public ISecret getSecretsManagerCredentials()
      The secretsManagerCredentials for access to a private registry.
      Specified by:
      getSecretsManagerCredentials in interface IBuildImage