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
-
Method Summary
Modifier and TypeMethodDescriptionadditionalInstanceConfiguration
(IResolvable additionalInstanceConfiguration) Sets the value ofCfnImageRecipeProps.getAdditionalInstanceConfiguration()
additionalInstanceConfiguration
(CfnImageRecipe.AdditionalInstanceConfigurationProperty additionalInstanceConfiguration) Sets the value ofCfnImageRecipeProps.getAdditionalInstanceConfiguration()
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
-
components
Sets the value ofCfnImageRecipeProps.getComponents()
- Parameters:
components
- The components of the image recipe. This parameter is required. Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.- Returns:
this
-
components
Sets the value ofCfnImageRecipeProps.getComponents()
- Parameters:
components
- The components of the image recipe. This parameter is required. Components are orchestration documents that define a sequence of steps for downloading, installing, configuring, and testing software packages. They also define validation and security hardening steps. A component is defined using a YAML document format.- Returns:
this
-
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 parent image of the image recipe. This parameter is required. The string must be either an Image ARN or an AMI ID.- Returns:
this
-
version
Sets the value ofCfnImageRecipeProps.getVersion()
- Parameters:
version
- The semantic version of the image recipe. This parameter is required.- 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
-
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
-
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:
build
in interfacesoftware.amazon.jsii.Builder<CfnImageRecipeProps>
- Returns:
- a new instance of
CfnImageRecipeProps
- Throws:
NullPointerException
- if any required attribute was not provided
-