Class ImagePipelineProps.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.ImagePipelineProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ImagePipelineProps>
- Enclosing interface:
ImagePipelineProps
@Stability(Experimental)
public static final class ImagePipelineProps.Builder
extends Object
implements software.amazon.jsii.Builder<ImagePipelineProps>
A builder for
ImagePipelineProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.description(String description) Sets the value ofImagePipelineProps.getDescription()distributionConfiguration(IDistributionConfiguration distributionConfiguration) Sets the value ofImagePipelineProps.getDistributionConfiguration()enhancedImageMetadataEnabled(Boolean enhancedImageMetadataEnabled) Sets the value ofImagePipelineProps.getEnhancedImageMetadataEnabled()executionRole(IRole executionRole) Sets the value ofImagePipelineProps.getExecutionRole()imageLogGroup(ILogGroup imageLogGroup) Sets the value ofImagePipelineProps.getImageLogGroup()imagePipelineLogGroup(ILogGroup imagePipelineLogGroup) Sets the value ofImagePipelineProps.getImagePipelineLogGroup()imagePipelineName(String imagePipelineName) Sets the value ofImagePipelineProps.getImagePipelineName()imageScanningEcrRepository(IRepository imageScanningEcrRepository) Sets the value ofImagePipelineProps.getImageScanningEcrRepository()imageScanningEcrTags(List<String> imageScanningEcrTags) Sets the value ofImagePipelineProps.getImageScanningEcrTags()imageScanningEnabled(Boolean imageScanningEnabled) Sets the value ofImagePipelineProps.getImageScanningEnabled()imageTestsEnabled(Boolean imageTestsEnabled) Sets the value ofImagePipelineProps.getImageTestsEnabled()infrastructureConfiguration(IInfrastructureConfiguration infrastructureConfiguration) Sets the value ofImagePipelineProps.getInfrastructureConfiguration()recipe(IRecipeBase recipe) Sets the value ofImagePipelineProps.getRecipe()schedule(ImagePipelineSchedule schedule) Sets the value ofImagePipelineProps.getSchedule()status(ImagePipelineStatus status) Sets the value ofImagePipelineProps.getStatus()Sets the value ofImagePipelineProps.getTags()workflows(List<? extends WorkflowConfiguration> workflows) Sets the value ofImagePipelineProps.getWorkflows()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
recipe
Sets the value ofImagePipelineProps.getRecipe()- Parameters:
recipe- The recipe that defines the base image, components, and customizations used to build the image. This parameter is required. This can either be an image recipe, or a container recipe.- Returns:
this
-
description
Sets the value ofImagePipelineProps.getDescription()- Parameters:
description- The description of the image pipeline.- Returns:
this
-
distributionConfiguration
@Stability(Experimental) public ImagePipelineProps.Builder distributionConfiguration(IDistributionConfiguration distributionConfiguration) Sets the value ofImagePipelineProps.getDistributionConfiguration()- Parameters:
distributionConfiguration- The distribution configuration used for distributing the image.- Returns:
this
-
enhancedImageMetadataEnabled
@Stability(Experimental) public ImagePipelineProps.Builder enhancedImageMetadataEnabled(Boolean enhancedImageMetadataEnabled) Sets the value ofImagePipelineProps.getEnhancedImageMetadataEnabled()- Parameters:
enhancedImageMetadataEnabled- If enabled, collects additional information about the image being created, including the operating system (OS) version and package list for the AMI.- Returns:
this
-
executionRole
Sets the value ofImagePipelineProps.getExecutionRole()- Parameters:
executionRole- The execution role used to perform workflow actions to build this image. By default, the Image Builder Service Linked Role (SLR) will be created automatically and used as the execution role. However, when providing a custom set of image workflows for the pipeline, an execution role will be generated with the minimal permissions needed to execute the workflows.- Returns:
this
-
imageLogGroup
Sets the value ofImagePipelineProps.getImageLogGroup()- Parameters:
imageLogGroup- The log group to use for images created from the image pipeline. By default, a log group will be created with the format/aws/imagebuilder/<image-name>.- Returns:
this
-
imagePipelineLogGroup
@Stability(Experimental) public ImagePipelineProps.Builder imagePipelineLogGroup(ILogGroup imagePipelineLogGroup) Sets the value ofImagePipelineProps.getImagePipelineLogGroup()- Parameters:
imagePipelineLogGroup- The log group to use for the image pipeline. By default, a log group will be created with the format/aws/imagebuilder/pipeline/<pipeline-name>- Returns:
this
-
imagePipelineName
@Stability(Experimental) public ImagePipelineProps.Builder imagePipelineName(String imagePipelineName) Sets the value ofImagePipelineProps.getImagePipelineName()- Parameters:
imagePipelineName- The name of the image pipeline.- Returns:
this
-
imageScanningEcrRepository
@Stability(Experimental) public ImagePipelineProps.Builder imageScanningEcrRepository(IRepository imageScanningEcrRepository) Sets the value ofImagePipelineProps.getImageScanningEcrRepository()- Parameters:
imageScanningEcrRepository- The container repository that Amazon Inspector scans to identify findings for your container images. If a repository is not provided, Image Builder creates a repository namedimage-builder-image-scanning-repositoryfor vulnerability scanning.- Returns:
this
-
imageScanningEcrTags
@Stability(Experimental) public ImagePipelineProps.Builder imageScanningEcrTags(List<String> imageScanningEcrTags) Sets the value ofImagePipelineProps.getImageScanningEcrTags()- Parameters:
imageScanningEcrTags- The tags for Image Builder to apply to the output container image that Amazon Inspector scans.- Returns:
this
-
imageScanningEnabled
@Stability(Experimental) public ImagePipelineProps.Builder imageScanningEnabled(Boolean imageScanningEnabled) Sets the value ofImagePipelineProps.getImageScanningEnabled()- Parameters:
imageScanningEnabled- Indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.- Returns:
this
-
imageTestsEnabled
@Stability(Experimental) public ImagePipelineProps.Builder imageTestsEnabled(Boolean imageTestsEnabled) Sets the value ofImagePipelineProps.getImageTestsEnabled()- Parameters:
imageTestsEnabled- Whether to run tests after building an image.- Returns:
this
-
infrastructureConfiguration
@Stability(Experimental) public ImagePipelineProps.Builder infrastructureConfiguration(IInfrastructureConfiguration infrastructureConfiguration) Sets the value ofImagePipelineProps.getInfrastructureConfiguration()- Parameters:
infrastructureConfiguration- The infrastructure configuration used for building the image. A default infrastructure configuration will be used if one is not provided.The default configuration will create an instance profile and role with minimal permissions needed to build the image, attached to the EC2 instance.
- Returns:
this
-
schedule
Sets the value ofImagePipelineProps.getSchedule()- Parameters:
schedule- The schedule of the image pipeline. This configures how often and when a pipeline automatically creates a new image.- Returns:
this
-
status
Sets the value ofImagePipelineProps.getStatus()- Parameters:
status- Indicates whether the pipeline is enabled to be triggered by the provided schedule.- Returns:
this
-
tags
Sets the value ofImagePipelineProps.getTags()- Parameters:
tags- The tags to apply to the image pipeline.- Returns:
this
-
workflows
@Stability(Experimental) public ImagePipelineProps.Builder workflows(List<? extends WorkflowConfiguration> workflows) Sets the value ofImagePipelineProps.getWorkflows()- Parameters:
workflows- The list of workflow configurations used to build the image.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ImagePipelineProps>- Returns:
- a new instance of
ImagePipelineProps - Throws:
NullPointerException- if any required attribute was not provided
-