Class ImageRecipe.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.ImageRecipe.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ImageRecipe>
- Enclosing class:
ImageRecipe
@Stability(Experimental)
public static final class ImageRecipe.Builder
extends Object
implements software.amazon.jsii.Builder<ImageRecipe>
(experimental) A fluent builder for
ImageRecipe.-
Method Summary
Modifier and TypeMethodDescription(experimental) The additional tags to assign to the output AMI generated by the build.(experimental) The base image for customizations specified in the image recipe.blockDevices(List<? extends BlockDevice> blockDevices) (experimental) The block devices to attach to the instance used for building the image.build()components(List<? extends ComponentConfiguration> components) (experimental) The list of component configurations to apply in the image build.static ImageRecipe.Builderdescription(String description) (experimental) The description of the image recipe.imageRecipeName(String imageRecipeName) (experimental) The name of the image recipe.imageRecipeVersion(String imageRecipeVersion) (experimental) The version of the image recipe.(experimental) The tags to apply to the image recipe.uninstallSsmAgentAfterBuild(Boolean uninstallSsmAgentAfterBuild) (experimental) Whether to uninstall the Systems Manager agent from your final build image, prior to creating the new AMI.userDataOverride(UserData userDataOverride) (experimental) The user data commands to pass to Image Builder build and test EC2 instances.workingDirectory(String workingDirectory) (experimental) The working directory for use during build and test workflows.
-
Method Details
-
create
@Stability(Experimental) public static ImageRecipe.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
ImageRecipe.Builder.
-
baseImage
(experimental) The base image for customizations specified in the image recipe.- Parameters:
baseImage- The base image for customizations specified in the image recipe. This parameter is required.- Returns:
this
-
amiTags
(experimental) The additional tags to assign to the output AMI generated by the build.Default: None
- Parameters:
amiTags- The additional tags to assign to the output AMI generated by the build. This parameter is required.- Returns:
this
-
blockDevices
@Stability(Experimental) public ImageRecipe.Builder blockDevices(List<? extends BlockDevice> blockDevices) (experimental) The block devices to attach to the instance used for building the image.Default: None
- Parameters:
blockDevices- The block devices to attach to the instance used for building the image. This parameter is required.- Returns:
this
-
components
@Stability(Experimental) public ImageRecipe.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
-
description
(experimental) The description of the image recipe.Default: None
- Parameters:
description- The description of the image recipe. This parameter is required.- Returns:
this
-
imageRecipeName
(experimental) The name of the image recipe.Default: - a name is generated
- Parameters:
imageRecipeName- The name of the image recipe. This parameter is required.- Returns:
this
-
imageRecipeVersion
(experimental) The version of the image recipe.Default: 1.0.x
- Parameters:
imageRecipeVersion- The version of the image recipe. This parameter is required.- Returns:
this
-
tags
(experimental) The tags to apply to the image recipe.Default: None
- Parameters:
tags- The tags to apply to the image recipe. This parameter is required.- Returns:
this
-
uninstallSsmAgentAfterBuild
@Stability(Experimental) public ImageRecipe.Builder uninstallSsmAgentAfterBuild(Boolean uninstallSsmAgentAfterBuild) (experimental) Whether to uninstall the Systems Manager agent from your final build image, prior to creating the new AMI.Default: - this is false if the Systems Manager agent is pre-installed on the base image. Otherwise, this is true.
- Parameters:
uninstallSsmAgentAfterBuild- Whether to uninstall the Systems Manager agent from your final build image, prior to creating the new AMI. This parameter is required.- Returns:
this
-
userDataOverride
(experimental) The user data commands to pass to Image Builder build and test EC2 instances.For Linux and macOS, Image Builder uses a default user data script to install the Systems Manager agent. If you override the user data, you must ensure to add commands to install Systems Manager agent, if it is not pre-installed on your base image.
Default: None
- Parameters:
userDataOverride- The user data commands to pass to Image Builder build and test EC2 instances. This parameter is required.- Returns:
this
-
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
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ImageRecipe>- Returns:
- a newly built instance of
ImageRecipe.
-