Class ContainerRecipeProps.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.ContainerRecipeProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ContainerRecipeProps>
- Enclosing interface:
ContainerRecipeProps
@Stability(Experimental)
public static final class ContainerRecipeProps.Builder
extends Object
implements software.amazon.jsii.Builder<ContainerRecipeProps>
A builder for
ContainerRecipeProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbaseImage(BaseContainerImage baseImage) Sets the value ofContainerRecipeProps.getBaseImage()build()Builds the configured instance.components(List<? extends ComponentConfiguration> components) Sets the value ofContainerRecipeProps.getComponents()containerRecipeName(String containerRecipeName) Sets the value ofContainerRecipeProps.getContainerRecipeName()containerRecipeVersion(String containerRecipeVersion) Sets the value ofContainerRecipeProps.getContainerRecipeVersion()description(String description) Sets the value ofContainerRecipeProps.getDescription()dockerfile(DockerfileData dockerfile) Sets the value ofContainerRecipeProps.getDockerfile()instanceBlockDevices(List<? extends BlockDevice> instanceBlockDevices) Sets the value ofContainerRecipeProps.getInstanceBlockDevices()instanceImage(ContainerInstanceImage instanceImage) Sets the value ofContainerRecipeProps.getInstanceImage()Sets the value ofContainerRecipeProps.getKmsKey()Sets the value ofContainerRecipeProps.getOsVersion()Sets the value ofContainerRecipeProps.getTags()targetRepository(Repository targetRepository) Sets the value ofContainerRecipeProps.getTargetRepository()workingDirectory(String workingDirectory) Sets the value ofContainerRecipeProps.getWorkingDirectory()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
baseImage
@Stability(Experimental) public ContainerRecipeProps.Builder baseImage(BaseContainerImage baseImage) Sets the value ofContainerRecipeProps.getBaseImage()- Parameters:
baseImage- The base image for customizations specified in the container recipe. This parameter is required.- Returns:
this
-
targetRepository
@Stability(Experimental) public ContainerRecipeProps.Builder targetRepository(Repository targetRepository) Sets the value ofContainerRecipeProps.getTargetRepository()- Parameters:
targetRepository- The container repository where the output container image is stored. This parameter is required.- Returns:
this
-
components
@Stability(Experimental) public ContainerRecipeProps.Builder components(List<? extends ComponentConfiguration> components) Sets the value ofContainerRecipeProps.getComponents()- Parameters:
components- The list of component configurations to apply in the image build.- Returns:
this
-
containerRecipeName
@Stability(Experimental) public ContainerRecipeProps.Builder containerRecipeName(String containerRecipeName) Sets the value ofContainerRecipeProps.getContainerRecipeName()- Parameters:
containerRecipeName- The name of the container recipe.- Returns:
this
-
containerRecipeVersion
@Stability(Experimental) public ContainerRecipeProps.Builder containerRecipeVersion(String containerRecipeVersion) Sets the value ofContainerRecipeProps.getContainerRecipeVersion()- Parameters:
containerRecipeVersion- The version of the container recipe.- Returns:
this
-
description
Sets the value ofContainerRecipeProps.getDescription()- Parameters:
description- The description of the container recipe.- Returns:
this
-
dockerfile
Sets the value ofContainerRecipeProps.getDockerfile()- Parameters:
dockerfile- The dockerfile template used to build the container image.- Returns:
this
-
instanceBlockDevices
@Stability(Experimental) public ContainerRecipeProps.Builder instanceBlockDevices(List<? extends BlockDevice> instanceBlockDevices) Sets the value ofContainerRecipeProps.getInstanceBlockDevices()- Parameters:
instanceBlockDevices- The block devices to attach to the instance used for building, testing, and distributing the container image.- Returns:
this
-
instanceImage
@Stability(Experimental) public ContainerRecipeProps.Builder instanceImage(ContainerInstanceImage instanceImage) Sets the value ofContainerRecipeProps.getInstanceImage()- Parameters:
instanceImage- The image to use to launch the instance used for building, testing, and distributing the container image.- Returns:
this
-
kmsKey
Sets the value ofContainerRecipeProps.getKmsKey()- Parameters:
kmsKey- The KMS key used to encrypt the dockerfile template.- Returns:
this
-
osVersion
Sets the value ofContainerRecipeProps.getOsVersion()- Parameters:
osVersion- The operating system (OS) version of the base image.- Returns:
this
-
tags
Sets the value ofContainerRecipeProps.getTags()- Parameters:
tags- The tags to apply to the container recipe.- Returns:
this
-
workingDirectory
@Stability(Experimental) public ContainerRecipeProps.Builder workingDirectory(String workingDirectory) Sets the value ofContainerRecipeProps.getWorkingDirectory()- Parameters:
workingDirectory- The working directory for use during build and test workflows.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ContainerRecipeProps>- Returns:
- a new instance of
ContainerRecipeProps - Throws:
NullPointerException- if any required attribute was not provided
-