java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.imagebuilder.alpha.ContainerRecipeBase
software.amazon.awscdk.services.imagebuilder.alpha.ContainerRecipe
All Implemented Interfaces:
IEnvironmentAware, IResource, IContainerRecipe, IRecipeBase, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)", date="2025-12-05T22:26:50.020Z") @Stability(Experimental) public class ContainerRecipe extends ContainerRecipeBase
(experimental) Represents an EC2 Image Builder Container Recipe.

Example:

 ContainerRecipe containerRecipe = ContainerRecipe.Builder.create(this, "MyContainerRecipe")
         .baseImage(BaseContainerImage.fromDockerHub("amazonlinux", "latest"))
         .targetRepository(Repository.fromEcr(Repository.fromRepositoryName(this, "Repository", "my-container-repo")))
         .build();
 ImagePipeline containerPipeline = ImagePipeline.Builder.create(this, "MyContainerPipeline")
         .recipe(exampleContainerRecipe)
         .build();
 

See Also:
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Experimental) public static final String PROPERTY_INJECTION_ID
      (experimental) Uniquely identifies this class.
  • Constructor Details

    • ContainerRecipe

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

      protected ContainerRecipe(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ContainerRecipe

      @Stability(Experimental) public ContainerRecipe(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ContainerRecipeProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromContainerRecipeArn

      @Stability(Experimental) @NotNull public static IContainerRecipe fromContainerRecipeArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String containerRecipeArn)
      (experimental) Import an existing container recipe given its ARN.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      containerRecipeArn - This parameter is required.
    • fromContainerRecipeAttributes

      @Stability(Experimental) @NotNull public static IContainerRecipe fromContainerRecipeAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ContainerRecipeAttributes attrs)
      (experimental) Import an existing container recipe by providing its attributes.

      If the container recipe name is provided as an attribute, it must be normalized by converting all alphabetical characters to lowercase, and replacing all spaces and underscores with hyphens.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • fromContainerRecipeName

      @Stability(Experimental) @NotNull public static IContainerRecipe fromContainerRecipeName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String containerRecipeName)
      (experimental) Import the latest version of an existing container recipe given its name.

      The provided name must be normalized by converting all alphabetical characters to lowercase, and replacing all spaces and underscores with hyphens.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      containerRecipeName - This parameter is required.
    • isContainerRecipe

      @Stability(Experimental) @NotNull public static Boolean isContainerRecipe(@NotNull Object x)
      (experimental) Return whether the given object is a ContainerRecipe.

      Parameters:
      x - This parameter is required.
    • addInstanceBlockDevice

      @Stability(Experimental) public void addInstanceBlockDevice(@NotNull BlockDevice... instanceBlockDevices)
      (experimental) Adds block devices to attach to the instance used for building, testing, and distributing the container image.

      Parameters:
      instanceBlockDevices -
      • The list of block devices to attach.
      This parameter is required.
    • getContainerRecipeArn

      @Stability(Experimental) @NotNull public String getContainerRecipeArn()
      (experimental) The ARN of the container recipe.
      Specified by:
      getContainerRecipeArn in interface IContainerRecipe
      Specified by:
      getContainerRecipeArn in class ContainerRecipeBase
    • getContainerRecipeName

      @Stability(Experimental) @NotNull public String getContainerRecipeName()
      (experimental) The name of the container recipe.
      Specified by:
      getContainerRecipeName in interface IContainerRecipe
      Specified by:
      getContainerRecipeName in class ContainerRecipeBase
    • getContainerRecipeVersion

      @Stability(Experimental) @NotNull public String getContainerRecipeVersion()
      (experimental) The version of the container recipe.
      Specified by:
      getContainerRecipeVersion in interface IContainerRecipe
      Specified by:
      getContainerRecipeVersion in class ContainerRecipeBase