Class BaseContainerImage
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.imagebuilder.alpha.BaseContainerImage
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.125.0 (build fdbe357)",
date="2026-01-19T12:04:05.879Z")
@Stability(Experimental)
public class BaseContainerImage
extends software.amazon.jsii.JsiiObject
(experimental) Represents a base image that is used to start from in EC2 Image Builder image builds.
Example:
IComponent parameterizedComponent = Component.fromComponentName(this, "ParameterizedComponent", "my-parameterized-component");
ImageRecipe imageRecipe = ImageRecipe.Builder.create(this, "ParameterizedImageRecipe")
.baseImage(BaseImage.fromSsmParameterName("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"))
.components(List.of(ComponentConfiguration.builder()
.component(parameterizedComponent)
.parameters(Map.of(
"environment", ComponentParameterValue.fromString("production"),
"version", ComponentParameterValue.fromString("1.0.0")))
.build()))
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseContainerImage(String image) protectedBaseContainerImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedBaseContainerImage(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic BaseContainerImagefromDockerHub(String repository, String tag) (experimental) The DockerHub image to use as the base image in a container recipe.static BaseContainerImagefromEcr(IRepository repository, String tag) (experimental) The ECR container image to use as the base image in a container recipe.static BaseContainerImagefromEcrPublic(String registryAlias, String repositoryName, String tag) (experimental) The ECR public container image to use as the base image in a container recipe.static BaseContainerImage(experimental) The EC2 Image Builder image to use as a base image in a container recipe.static BaseContainerImagefromString(String baseContainerImageString) (experimental) The string value of the base image to use in a container recipe.getImage()(experimental) The rendered base image to use.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
BaseContainerImage
protected BaseContainerImage(software.amazon.jsii.JsiiObjectRef objRef) -
BaseContainerImage
protected BaseContainerImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
BaseContainerImage
- Parameters:
image- This parameter is required.
-
-
Method Details
-
fromDockerHub
@Stability(Experimental) @NotNull public static BaseContainerImage fromDockerHub(@NotNull String repository, @NotNull String tag) (experimental) The DockerHub image to use as the base image in a container recipe.- Parameters:
repository- The DockerHub repository where the base image resides in. This parameter is required.tag- The tag of the base image in the DockerHub repository. This parameter is required.
-
fromEcr
@Stability(Experimental) @NotNull public static BaseContainerImage fromEcr(@NotNull IRepository repository, @NotNull String tag) (experimental) The ECR container image to use as the base image in a container recipe.- Parameters:
repository- The ECR repository where the base image resides in. This parameter is required.tag- The tag of the base image in the ECR repository. This parameter is required.
-
fromEcrPublic
@Stability(Experimental) @NotNull public static BaseContainerImage fromEcrPublic(@NotNull String registryAlias, @NotNull String repositoryName, @NotNull String tag) (experimental) The ECR public container image to use as the base image in a container recipe.- Parameters:
registryAlias- The alias of the ECR public registry where the base image resides in. This parameter is required.repositoryName- The name of the ECR public repository, where the base image resides in. This parameter is required.tag- The tag of the base image in the ECR public repository. This parameter is required.
-
fromImage
(experimental) The EC2 Image Builder image to use as a base image in a container recipe.- Parameters:
image- The EC2 Image Builder image to use as a base image. This parameter is required.
-
fromString
@Stability(Experimental) @NotNull public static BaseContainerImage fromString(@NotNull String baseContainerImageString) (experimental) The string value of the base image to use in a container recipe.This can be an EC2 Image Builder image ARN, an ECR or ECR public image, or a container URI sourced from a third-party container registry such as DockerHub.
- Parameters:
baseContainerImageString- The base image as a direct string value. This parameter is required.
-
getImage
(experimental) The rendered base image to use.
-