Interface Image.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<Image.Builder,Image>,SdkBuilder<Image.Builder,Image>,SdkPojo
- Enclosing class:
- Image
public static interface Image.Builder extends SdkPojo, CopyableBuilder<Image.Builder,Image>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Image.Builderarn(String arn)The Amazon Resource Name (ARN) of the image.Image.BuilderbuildType(String buildType)Indicates the type of build that created this image.Image.BuilderbuildType(BuildType buildType)Indicates the type of build that created this image.default Image.BuildercontainerRecipe(Consumer<ContainerRecipe.Builder> containerRecipe)For container images, this is the container recipe that Image Builder used to create the image.Image.BuildercontainerRecipe(ContainerRecipe containerRecipe)For container images, this is the container recipe that Image Builder used to create the image.Image.BuilderdateCreated(String dateCreated)The date on which Image Builder created this image.Image.BuilderdeprecationTime(Instant deprecationTime)The time when deprecation occurs for an image resource.default Image.BuilderdistributionConfiguration(Consumer<DistributionConfiguration.Builder> distributionConfiguration)The distribution configuration that Image Builder used to create this image.Image.BuilderdistributionConfiguration(DistributionConfiguration distributionConfiguration)The distribution configuration that Image Builder used to create this image.Image.BuilderenhancedImageMetadataEnabled(Boolean enhancedImageMetadataEnabled)Indicates whether Image Builder collects additional information about the image, such as the operating system (OS) version and package list.Image.BuilderexecutionRole(String executionRole)The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.default Image.BuilderimageRecipe(Consumer<ImageRecipe.Builder> imageRecipe)For images that distribute an AMI, this is the image recipe that Image Builder used to create the image.Image.BuilderimageRecipe(ImageRecipe imageRecipe)For images that distribute an AMI, this is the image recipe that Image Builder used to create the image.default Image.BuilderimageScanningConfiguration(Consumer<ImageScanningConfiguration.Builder> imageScanningConfiguration)Contains settings for vulnerability scans.Image.BuilderimageScanningConfiguration(ImageScanningConfiguration imageScanningConfiguration)Contains settings for vulnerability scans.Image.BuilderimageSource(String imageSource)The origin of the base image that Image Builder used to build this image.Image.BuilderimageSource(ImageSource imageSource)The origin of the base image that Image Builder used to build this image.default Image.BuilderimageTestsConfiguration(Consumer<ImageTestsConfiguration.Builder> imageTestsConfiguration)The image tests that ran when that Image Builder created this image.Image.BuilderimageTestsConfiguration(ImageTestsConfiguration imageTestsConfiguration)The image tests that ran when that Image Builder created this image.default Image.BuilderinfrastructureConfiguration(Consumer<InfrastructureConfiguration.Builder> infrastructureConfiguration)The infrastructure that Image Builder used to create this image.Image.BuilderinfrastructureConfiguration(InfrastructureConfiguration infrastructureConfiguration)The infrastructure that Image Builder used to create this image.Image.BuilderlifecycleExecutionId(String lifecycleExecutionId)Identifies the last runtime instance of the lifecycle policy to take action on the image.Image.Buildername(String name)The name of the image.Image.BuilderosVersion(String osVersion)The operating system version for instances that launch from this image.default Image.BuilderoutputResources(Consumer<OutputResources.Builder> outputResources)The output resources that Image Builder produces for this image.Image.BuilderoutputResources(OutputResources outputResources)The output resources that Image Builder produces for this image.Image.Builderplatform(String platform)The image operating system platform, such as Linux or Windows.Image.Builderplatform(Platform platform)The image operating system platform, such as Linux or Windows.default Image.BuilderscanState(Consumer<ImageScanState.Builder> scanState)Contains information about the current state of scans for this image.Image.BuilderscanState(ImageScanState scanState)Contains information about the current state of scans for this image.Image.BuildersourcePipelineArn(String sourcePipelineArn)The Amazon Resource Name (ARN) of the image pipeline that created this image.Image.BuildersourcePipelineName(String sourcePipelineName)The name of the image pipeline that created this image.default Image.Builderstate(Consumer<ImageState.Builder> state)The state of the image.Image.Builderstate(ImageState state)The state of the image.Image.Buildertags(Map<String,String> tags)The tags that apply to this image.Image.Buildertype(String type)Specifies whether this image produces an AMI or a container image.Image.Buildertype(ImageType type)Specifies whether this image produces an AMI or a container image.Image.Builderversion(String version)The semantic version of the image.Image.Builderworkflows(Collection<WorkflowConfiguration> workflows)Contains the build and test workflows that are associated with the image.Image.Builderworkflows(Consumer<WorkflowConfiguration.Builder>... workflows)Contains the build and test workflows that are associated with the image.Image.Builderworkflows(WorkflowConfiguration... workflows)Contains the build and test workflows that are associated with the image.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
arn
Image.Builder arn(String arn)
The Amazon Resource Name (ARN) of the image.
Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:
-
Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.
-
Version ARNs have only the first three nodes: <major>.<minor>.<patch>
-
Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
- Parameters:
arn- The Amazon Resource Name (ARN) of the image.Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:
-
Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.
-
Version ARNs have only the first three nodes: <major>.<minor>.<patch>
-
Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
type
Image.Builder type(String type)
Specifies whether this image produces an AMI or a container image.
-
type
Image.Builder type(ImageType type)
Specifies whether this image produces an AMI or a container image.
-
name
Image.Builder name(String name)
The name of the image.
- Parameters:
name- The name of the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
version
Image.Builder version(String version)
The semantic version of the image.
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. 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.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
- Parameters:
version- The semantic version of the image.The semantic version has four nodes: <major>.<minor>.<patch>/<build>. 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.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
platform
Image.Builder platform(String platform)
The image operating system platform, such as Linux or Windows.
-
platform
Image.Builder platform(Platform platform)
The image operating system platform, such as Linux or Windows.
-
enhancedImageMetadataEnabled
Image.Builder enhancedImageMetadataEnabled(Boolean enhancedImageMetadataEnabled)
Indicates whether Image Builder collects additional information about the image, such as the operating system (OS) version and package list.
- Parameters:
enhancedImageMetadataEnabled- Indicates whether Image Builder collects additional information about the image, such as the operating system (OS) version and package list.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
osVersion
Image.Builder osVersion(String osVersion)
The operating system version for instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.
- Parameters:
osVersion- The operating system version for instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
state
Image.Builder state(ImageState state)
The state of the image.
- Parameters:
state- The state of the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
state
default Image.Builder state(Consumer<ImageState.Builder> state)
The state of the image.
This is a convenience method that creates an instance of theImageState.Builderavoiding the need to create one manually viaImageState.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tostate(ImageState).- Parameters:
state- a consumer that will call methods onImageState.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
state(ImageState)
-
imageRecipe
Image.Builder imageRecipe(ImageRecipe imageRecipe)
For images that distribute an AMI, this is the image recipe that Image Builder used to create the image. For container images, this is empty.
- Parameters:
imageRecipe- For images that distribute an AMI, this is the image recipe that Image Builder used to create the image. For container images, this is empty.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageRecipe
default Image.Builder imageRecipe(Consumer<ImageRecipe.Builder> imageRecipe)
For images that distribute an AMI, this is the image recipe that Image Builder used to create the image. For container images, this is empty.
This is a convenience method that creates an instance of theImageRecipe.Builderavoiding the need to create one manually viaImageRecipe.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toimageRecipe(ImageRecipe).- Parameters:
imageRecipe- a consumer that will call methods onImageRecipe.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
imageRecipe(ImageRecipe)
-
containerRecipe
Image.Builder containerRecipe(ContainerRecipe containerRecipe)
For container images, this is the container recipe that Image Builder used to create the image. For images that distribute an AMI, this is empty.
- Parameters:
containerRecipe- For container images, this is the container recipe that Image Builder used to create the image. For images that distribute an AMI, this is empty.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
containerRecipe
default Image.Builder containerRecipe(Consumer<ContainerRecipe.Builder> containerRecipe)
For container images, this is the container recipe that Image Builder used to create the image. For images that distribute an AMI, this is empty.
This is a convenience method that creates an instance of theContainerRecipe.Builderavoiding the need to create one manually viaContainerRecipe.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocontainerRecipe(ContainerRecipe).- Parameters:
containerRecipe- a consumer that will call methods onContainerRecipe.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
containerRecipe(ContainerRecipe)
-
sourcePipelineName
Image.Builder sourcePipelineName(String sourcePipelineName)
The name of the image pipeline that created this image.
- Parameters:
sourcePipelineName- The name of the image pipeline that created this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
sourcePipelineArn
Image.Builder sourcePipelineArn(String sourcePipelineArn)
The Amazon Resource Name (ARN) of the image pipeline that created this image.
- Parameters:
sourcePipelineArn- The Amazon Resource Name (ARN) of the image pipeline that created this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
infrastructureConfiguration
Image.Builder infrastructureConfiguration(InfrastructureConfiguration infrastructureConfiguration)
The infrastructure that Image Builder used to create this image.
- Parameters:
infrastructureConfiguration- The infrastructure that Image Builder used to create this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
infrastructureConfiguration
default Image.Builder infrastructureConfiguration(Consumer<InfrastructureConfiguration.Builder> infrastructureConfiguration)
The infrastructure that Image Builder used to create this image.
This is a convenience method that creates an instance of theInfrastructureConfiguration.Builderavoiding the need to create one manually viaInfrastructureConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toinfrastructureConfiguration(InfrastructureConfiguration).- Parameters:
infrastructureConfiguration- a consumer that will call methods onInfrastructureConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
infrastructureConfiguration(InfrastructureConfiguration)
-
distributionConfiguration
Image.Builder distributionConfiguration(DistributionConfiguration distributionConfiguration)
The distribution configuration that Image Builder used to create this image.
- Parameters:
distributionConfiguration- The distribution configuration that Image Builder used to create this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
distributionConfiguration
default Image.Builder distributionConfiguration(Consumer<DistributionConfiguration.Builder> distributionConfiguration)
The distribution configuration that Image Builder used to create this image.
This is a convenience method that creates an instance of theDistributionConfiguration.Builderavoiding the need to create one manually viaDistributionConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todistributionConfiguration(DistributionConfiguration).- Parameters:
distributionConfiguration- a consumer that will call methods onDistributionConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
distributionConfiguration(DistributionConfiguration)
-
imageTestsConfiguration
Image.Builder imageTestsConfiguration(ImageTestsConfiguration imageTestsConfiguration)
The image tests that ran when that Image Builder created this image.
- Parameters:
imageTestsConfiguration- The image tests that ran when that Image Builder created this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageTestsConfiguration
default Image.Builder imageTestsConfiguration(Consumer<ImageTestsConfiguration.Builder> imageTestsConfiguration)
The image tests that ran when that Image Builder created this image.
This is a convenience method that creates an instance of theImageTestsConfiguration.Builderavoiding the need to create one manually viaImageTestsConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toimageTestsConfiguration(ImageTestsConfiguration).- Parameters:
imageTestsConfiguration- a consumer that will call methods onImageTestsConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
imageTestsConfiguration(ImageTestsConfiguration)
-
dateCreated
Image.Builder dateCreated(String dateCreated)
The date on which Image Builder created this image.
- Parameters:
dateCreated- The date on which Image Builder created this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
outputResources
Image.Builder outputResources(OutputResources outputResources)
The output resources that Image Builder produces for this image.
- Parameters:
outputResources- The output resources that Image Builder produces for this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
outputResources
default Image.Builder outputResources(Consumer<OutputResources.Builder> outputResources)
The output resources that Image Builder produces for this image.
This is a convenience method that creates an instance of theOutputResources.Builderavoiding the need to create one manually viaOutputResources.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tooutputResources(OutputResources).- Parameters:
outputResources- a consumer that will call methods onOutputResources.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
outputResources(OutputResources)
-
tags
Image.Builder tags(Map<String,String> tags)
The tags that apply to this image.
- Parameters:
tags- The tags that apply to this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
buildType
Image.Builder buildType(String buildType)
Indicates the type of build that created this image. The build can be initiated in the following ways:
-
USER_INITIATED – A manual pipeline build request.
-
SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.
-
IMPORT – A VM import created the image to use as the base image for the recipe.
- Parameters:
buildType- Indicates the type of build that created this image. The build can be initiated in the following ways:-
USER_INITIATED – A manual pipeline build request.
-
SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.
-
IMPORT – A VM import created the image to use as the base image for the recipe.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
BuildType,BuildType
-
-
buildType
Image.Builder buildType(BuildType buildType)
Indicates the type of build that created this image. The build can be initiated in the following ways:
-
USER_INITIATED – A manual pipeline build request.
-
SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.
-
IMPORT – A VM import created the image to use as the base image for the recipe.
- Parameters:
buildType- Indicates the type of build that created this image. The build can be initiated in the following ways:-
USER_INITIATED – A manual pipeline build request.
-
SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.
-
IMPORT – A VM import created the image to use as the base image for the recipe.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
BuildType,BuildType
-
-
imageSource
Image.Builder imageSource(String imageSource)
The origin of the base image that Image Builder used to build this image.
- Parameters:
imageSource- The origin of the base image that Image Builder used to build this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ImageSource,ImageSource
-
imageSource
Image.Builder imageSource(ImageSource imageSource)
The origin of the base image that Image Builder used to build this image.
- Parameters:
imageSource- The origin of the base image that Image Builder used to build this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ImageSource,ImageSource
-
scanState
Image.Builder scanState(ImageScanState scanState)
Contains information about the current state of scans for this image.
- Parameters:
scanState- Contains information about the current state of scans for this image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scanState
default Image.Builder scanState(Consumer<ImageScanState.Builder> scanState)
Contains information about the current state of scans for this image.
This is a convenience method that creates an instance of theImageScanState.Builderavoiding the need to create one manually viaImageScanState.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toscanState(ImageScanState).- Parameters:
scanState- a consumer that will call methods onImageScanState.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
scanState(ImageScanState)
-
imageScanningConfiguration
Image.Builder imageScanningConfiguration(ImageScanningConfiguration imageScanningConfiguration)
Contains settings for vulnerability scans.
- Parameters:
imageScanningConfiguration- Contains settings for vulnerability scans.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageScanningConfiguration
default Image.Builder imageScanningConfiguration(Consumer<ImageScanningConfiguration.Builder> imageScanningConfiguration)
Contains settings for vulnerability scans.
This is a convenience method that creates an instance of theImageScanningConfiguration.Builderavoiding the need to create one manually viaImageScanningConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toimageScanningConfiguration(ImageScanningConfiguration).- Parameters:
imageScanningConfiguration- a consumer that will call methods onImageScanningConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
imageScanningConfiguration(ImageScanningConfiguration)
-
deprecationTime
Image.Builder deprecationTime(Instant deprecationTime)
The time when deprecation occurs for an image resource. This can be a past or future date.
- Parameters:
deprecationTime- The time when deprecation occurs for an image resource. This can be a past or future date.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
lifecycleExecutionId
Image.Builder lifecycleExecutionId(String lifecycleExecutionId)
Identifies the last runtime instance of the lifecycle policy to take action on the image.
- Parameters:
lifecycleExecutionId- Identifies the last runtime instance of the lifecycle policy to take action on the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
executionRole
Image.Builder executionRole(String executionRole)
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.
- Parameters:
executionRole- The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
workflows
Image.Builder workflows(Collection<WorkflowConfiguration> workflows)
Contains the build and test workflows that are associated with the image.
- Parameters:
workflows- Contains the build and test workflows that are associated with the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
workflows
Image.Builder workflows(WorkflowConfiguration... workflows)
Contains the build and test workflows that are associated with the image.
- Parameters:
workflows- Contains the build and test workflows that are associated with the image.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
workflows
Image.Builder workflows(Consumer<WorkflowConfiguration.Builder>... workflows)
Contains the build and test workflows that are associated with the image.
This is a convenience method that creates an instance of theWorkflowConfiguration.Builderavoiding the need to create one manually viaWorkflowConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#workflows(List.) - Parameters:
workflows- a consumer that will call methods onWorkflowConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#workflows(java.util.Collection)
-
-