Class CfnImageRecipeProps.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.CfnImageRecipeProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnImageRecipeProps>
- Enclosing interface:
CfnImageRecipeProps
@Stability(Stable)
public static final class CfnImageRecipeProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnImageRecipeProps>
A builder for
CfnImageRecipeProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalInstanceConfiguration(IResolvable additionalInstanceConfiguration) Sets the value ofCfnImageRecipeProps.getAdditionalInstanceConfiguration()additionalInstanceConfiguration(CfnImageRecipe.AdditionalInstanceConfigurationProperty additionalInstanceConfiguration) Sets the value ofCfnImageRecipeProps.getAdditionalInstanceConfiguration()Sets the value ofCfnImageRecipeProps.getAmiTags()amiTags(IResolvable amiTags) Sets the value ofCfnImageRecipeProps.getAmiTags()amiWatermarks(List<String> amiWatermarks) Sets the value ofCfnImageRecipeProps.getAmiWatermarks()blockDeviceMappings(List<? extends Object> blockDeviceMappings) Sets the value ofCfnImageRecipeProps.getBlockDeviceMappings()blockDeviceMappings(IResolvable blockDeviceMappings) Sets the value ofCfnImageRecipeProps.getBlockDeviceMappings()build()Builds the configured instance.components(List<? extends Object> components) Sets the value ofCfnImageRecipeProps.getComponents()components(IResolvable components) Sets the value ofCfnImageRecipeProps.getComponents()description(String description) Sets the value ofCfnImageRecipeProps.getDescription()Sets the value ofCfnImageRecipeProps.getName()parentImage(String parentImage) Sets the value ofCfnImageRecipeProps.getParentImage()Sets the value ofCfnImageRecipeProps.getTags()Sets the value ofCfnImageRecipeProps.getVersion()workingDirectory(String workingDirectory) Sets the value ofCfnImageRecipeProps.getWorkingDirectory()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the value ofCfnImageRecipeProps.getName()- Parameters:
name- The name of the image recipe. This parameter is required.- Returns:
this
-
parentImage
Sets the value ofCfnImageRecipeProps.getParentImage()- Parameters:
parentImage- The base image for customizations specified in the image recipe. This parameter is required. You can specify the parent image using one of the following options:- AMI ID
- Image Builder image Amazon Resource Name (ARN)
- AWS Systems Manager (SSM) Parameter Store Parameter, prefixed by
ssm:, followed by the parameter name or ARN. - AWS Marketplace product ID
- Returns:
this
-
version
Sets the value ofCfnImageRecipeProps.getVersion()- Parameters:
version- The semantic version of the image recipe. This version follows the semantic version syntax. This parameter is required.The semantic version has four nodes:
. . / . You can assign values for the first three, and can filter on all of them. Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.
Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
- Returns:
this
-
additionalInstanceConfiguration
@Stability(Stable) public CfnImageRecipeProps.Builder additionalInstanceConfiguration(IResolvable additionalInstanceConfiguration) Sets the value ofCfnImageRecipeProps.getAdditionalInstanceConfiguration()- Parameters:
additionalInstanceConfiguration- Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration. Instance configuration adds a layer of control over those instances. You can define settings and add scripts to run when an instance is launched from your AMI.- Returns:
this
-
additionalInstanceConfiguration
@Stability(Stable) public CfnImageRecipeProps.Builder additionalInstanceConfiguration(CfnImageRecipe.AdditionalInstanceConfigurationProperty additionalInstanceConfiguration) Sets the value ofCfnImageRecipeProps.getAdditionalInstanceConfiguration()- Parameters:
additionalInstanceConfiguration- Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration. Instance configuration adds a layer of control over those instances. You can define settings and add scripts to run when an instance is launched from your AMI.- Returns:
this
-
amiTags
Sets the value ofCfnImageRecipeProps.getAmiTags()- Parameters:
amiTags- Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.- Returns:
this
-
amiTags
Sets the value ofCfnImageRecipeProps.getAmiTags()- Parameters:
amiTags- Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.- Returns:
this
-
amiWatermarks
Sets the value ofCfnImageRecipeProps.getAmiWatermarks()- Parameters:
amiWatermarks- The AMI watermark names to attach to the output AMI from this recipe. AMI watermarks are lineage markers that automatically propagate to derivative AMIs when the source AMI is copied or distributed.- Returns:
this
-
blockDeviceMappings
@Stability(Stable) public CfnImageRecipeProps.Builder blockDeviceMappings(IResolvable blockDeviceMappings) Sets the value ofCfnImageRecipeProps.getBlockDeviceMappings()- Parameters:
blockDeviceMappings- The block device mappings to apply when creating images from this recipe.- Returns:
this
-
blockDeviceMappings
@Stability(Stable) public CfnImageRecipeProps.Builder blockDeviceMappings(List<? extends Object> blockDeviceMappings) Sets the value ofCfnImageRecipeProps.getBlockDeviceMappings()- Parameters:
blockDeviceMappings- The block device mappings to apply when creating images from this recipe.- Returns:
this
-
components
Sets the value ofCfnImageRecipeProps.getComponents()- Parameters:
components- The components that are included in the image recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.- Returns:
this
-
components
Sets the value ofCfnImageRecipeProps.getComponents()- Parameters:
components- The components that are included in the image recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.- Returns:
this
-
description
Sets the value ofCfnImageRecipeProps.getDescription()- Parameters:
description- The description of the image recipe.- Returns:
this
-
tags
Sets the value ofCfnImageRecipeProps.getTags()- Parameters:
tags- The tags of the image recipe.- Returns:
this
-
workingDirectory
Sets the value ofCfnImageRecipeProps.getWorkingDirectory()- Parameters:
workingDirectory- The working directory to be used during build and test workflows.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnImageRecipeProps>- Returns:
- a new instance of
CfnImageRecipeProps - Throws:
NullPointerException- if any required attribute was not provided
-