Class ImageRecipeProps.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.ImageRecipeProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ImageRecipeProps>
- Enclosing interface:
ImageRecipeProps
@Stability(Experimental)
public static final class ImageRecipeProps.Builder
extends Object
implements software.amazon.jsii.Builder<ImageRecipeProps>
A builder for
ImageRecipeProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofImageRecipeProps.getAmiTags()Sets the value ofImageRecipeProps.getBaseImage()blockDevices(List<? extends BlockDevice> blockDevices) Sets the value ofImageRecipeProps.getBlockDevices()build()Builds the configured instance.components(List<? extends ComponentConfiguration> components) Sets the value ofImageRecipeProps.getComponents()description(String description) Sets the value ofImageRecipeProps.getDescription()imageRecipeName(String imageRecipeName) Sets the value ofImageRecipeProps.getImageRecipeName()imageRecipeVersion(String imageRecipeVersion) Sets the value ofImageRecipeProps.getImageRecipeVersion()Sets the value ofImageRecipeProps.getTags()uninstallSsmAgentAfterBuild(Boolean uninstallSsmAgentAfterBuild) Sets the value ofImageRecipeProps.getUninstallSsmAgentAfterBuild()userDataOverride(UserData userDataOverride) Sets the value ofImageRecipeProps.getUserDataOverride()workingDirectory(String workingDirectory) Sets the value ofImageRecipeProps.getWorkingDirectory()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
baseImage
Sets the value ofImageRecipeProps.getBaseImage()- Parameters:
baseImage- The base image for customizations specified in the image recipe. This parameter is required.- Returns:
this
-
amiTags
Sets the value ofImageRecipeProps.getAmiTags()- Parameters:
amiTags- The additional tags to assign to the output AMI generated by the build.- Returns:
this
-
blockDevices
@Stability(Experimental) public ImageRecipeProps.Builder blockDevices(List<? extends BlockDevice> blockDevices) Sets the value ofImageRecipeProps.getBlockDevices()- Parameters:
blockDevices- The block devices to attach to the instance used for building the image.- Returns:
this
-
components
@Stability(Experimental) public ImageRecipeProps.Builder components(List<? extends ComponentConfiguration> components) Sets the value ofImageRecipeProps.getComponents()- Parameters:
components- The list of component configurations to apply in the image build.- Returns:
this
-
description
Sets the value ofImageRecipeProps.getDescription()- Parameters:
description- The description of the image recipe.- Returns:
this
-
imageRecipeName
Sets the value ofImageRecipeProps.getImageRecipeName()- Parameters:
imageRecipeName- The name of the image recipe.- Returns:
this
-
imageRecipeVersion
@Stability(Experimental) public ImageRecipeProps.Builder imageRecipeVersion(String imageRecipeVersion) Sets the value ofImageRecipeProps.getImageRecipeVersion()- Parameters:
imageRecipeVersion- The version of the image recipe.- Returns:
this
-
tags
Sets the value ofImageRecipeProps.getTags()- Parameters:
tags- The tags to apply to the image recipe.- Returns:
this
-
uninstallSsmAgentAfterBuild
@Stability(Experimental) public ImageRecipeProps.Builder uninstallSsmAgentAfterBuild(Boolean uninstallSsmAgentAfterBuild) Sets the value ofImageRecipeProps.getUninstallSsmAgentAfterBuild()- Parameters:
uninstallSsmAgentAfterBuild- Whether to uninstall the Systems Manager agent from your final build image, prior to creating the new AMI.- Returns:
this
-
userDataOverride
@Stability(Experimental) public ImageRecipeProps.Builder userDataOverride(UserData userDataOverride) Sets the value ofImageRecipeProps.getUserDataOverride()- Parameters:
userDataOverride- 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.- Returns:
this
-
workingDirectory
Sets the value ofImageRecipeProps.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<ImageRecipeProps>- Returns:
- a new instance of
ImageRecipeProps - Throws:
NullPointerException- if any required attribute was not provided
-