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.84.0 (build 5404dcf)", date="2023-06-19T16:30:41.819Z") @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])

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(Stable) public static final IBuildImage AMAZON_LINUX_2_STANDARD_1_0
      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".
  • 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:
    • 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
      invalid @link
      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