Class ContainerRecipe.Builder

java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.ContainerRecipe.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<ContainerRecipe>
Enclosing class:
ContainerRecipe

@Stability(Experimental) public static final class ContainerRecipe.Builder extends Object implements software.amazon.jsii.Builder<ContainerRecipe>
(experimental) A fluent builder for ContainerRecipe.
  • Method Details

    • create

      @Stability(Experimental) public static ContainerRecipe.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of ContainerRecipe.Builder.
    • baseImage

      @Stability(Experimental) public ContainerRecipe.Builder baseImage(BaseContainerImage baseImage)
      (experimental) The base image for customizations specified in the container recipe.

      Parameters:
      baseImage - The base image for customizations specified in the container recipe. This parameter is required.
      Returns:
      this
    • targetRepository

      @Stability(Experimental) public ContainerRecipe.Builder targetRepository(Repository targetRepository)
      (experimental) The container repository where the output container image is stored.

      Parameters:
      targetRepository - The container repository where the output container image is stored. This parameter is required.
      Returns:
      this
    • components

      @Stability(Experimental) public ContainerRecipe.Builder components(List<? extends ComponentConfiguration> components)
      (experimental) The list of component configurations to apply in the image build.

      Default: None

      Parameters:
      components - The list of component configurations to apply in the image build. This parameter is required.
      Returns:
      this
    • containerRecipeName

      @Stability(Experimental) public ContainerRecipe.Builder containerRecipeName(String containerRecipeName)
      (experimental) The name of the container recipe.

      Default: a name is generated

      Parameters:
      containerRecipeName - The name of the container recipe. This parameter is required.
      Returns:
      this
    • containerRecipeVersion

      @Stability(Experimental) public ContainerRecipe.Builder containerRecipeVersion(String containerRecipeVersion)
      (experimental) The version of the container recipe.

      Default: 1.0.x

      Parameters:
      containerRecipeVersion - The version of the container recipe. This parameter is required.
      Returns:
      this
    • description

      @Stability(Experimental) public ContainerRecipe.Builder description(String description)
      (experimental) The description of the container recipe.

      Default: None

      Parameters:
      description - The description of the container recipe. This parameter is required.
      Returns:
      this
    • dockerfile

      @Stability(Experimental) public ContainerRecipe.Builder dockerfile(DockerfileData dockerfile)
      (experimental) The dockerfile template used to build the container image.

      Default: - a standard dockerfile template will be generated to pull the base image, perform environment setup, and run all components in the recipe

      Parameters:
      dockerfile - The dockerfile template used to build the container image. This parameter is required.
      Returns:
      this
    • instanceBlockDevices

      @Stability(Experimental) public ContainerRecipe.Builder instanceBlockDevices(List<? extends BlockDevice> instanceBlockDevices)
      (experimental) The block devices to attach to the instance used for building, testing, and distributing the container image.

      Default: the block devices of the instance image will be used

      Parameters:
      instanceBlockDevices - The block devices to attach to the instance used for building, testing, and distributing the container image. This parameter is required.
      Returns:
      this
    • instanceImage

      @Stability(Experimental) public ContainerRecipe.Builder instanceImage(ContainerInstanceImage instanceImage)
      (experimental) The image to use to launch the instance used for building, testing, and distributing the container image.

      Default: Image Builder will use the appropriate ECS-optimized AMI

      Parameters:
      instanceImage - The image to use to launch the instance used for building, testing, and distributing the container image. This parameter is required.
      Returns:
      this
    • kmsKey

      @Stability(Experimental) public ContainerRecipe.Builder kmsKey(IKey kmsKey)
      (experimental) The KMS key used to encrypt the dockerfile template.

      Default: None

      Parameters:
      kmsKey - The KMS key used to encrypt the dockerfile template. This parameter is required.
      Returns:
      this
    • osVersion

      @Stability(Experimental) public ContainerRecipe.Builder osVersion(OSVersion osVersion)
      (experimental) The operating system (OS) version of the base image.

      Default: - Image Builder will determine the OS version of the base image, if sourced from a third-party container registry. Otherwise, the OS version of the base image is required.

      Parameters:
      osVersion - The operating system (OS) version of the base image. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Experimental) public ContainerRecipe.Builder tags(Map<String,String> tags)
      (experimental) The tags to apply to the container recipe.

      Default: None

      Parameters:
      tags - The tags to apply to the container recipe. This parameter is required.
      Returns:
      this
    • workingDirectory

      @Stability(Experimental) public ContainerRecipe.Builder workingDirectory(String workingDirectory)
      (experimental) The working directory for use during build and test workflows.

      Default: - the Image Builder default working directory is used. For Linux and macOS builds, this would be /tmp. For Windows builds, this would be C:/

      Parameters:
      workingDirectory - The working directory for use during build and test workflows. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public ContainerRecipe build()
      Specified by:
      build in interface software.amazon.jsii.Builder<ContainerRecipe>
      Returns:
      a newly built instance of ContainerRecipe.