Class ContainerImageAssetMetadataEntry.Builder
java.lang.Object
software.amazon.awscdk.cloud_assembly_schema.ContainerImageAssetMetadataEntry.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ContainerImageAssetMetadataEntry>
- Enclosing interface:
ContainerImageAssetMetadataEntry
@Stability(Stable)
public static final class ContainerImageAssetMetadataEntry.Builder
extends Object
implements software.amazon.jsii.Builder<ContainerImageAssetMetadataEntry>
A builder for
ContainerImageAssetMetadataEntry-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofContainerImageAssetMetadataEntry.getBuildArgs()buildSecrets(Map<String, String> buildSecrets) Sets the value ofContainerImageAssetMetadataEntry.getBuildSecrets()Sets the value ofContainerImageAssetMetadataEntry.getBuildSsh()cacheDisabled(Boolean cacheDisabled) Sets the value ofContainerImageAssetMetadataEntry.getCacheDisabled()cacheFrom(List<? extends ContainerImageAssetCacheOption> cacheFrom) Sets the value ofContainerImageAssetMetadataEntry.getCacheFrom()cacheTo(ContainerImageAssetCacheOption cacheTo) Sets the value ofContainerImageAssetMetadataEntry.getCacheTo()Sets the value ofContainerImageAssetMetadataEntry.getFile()Sets the value ofContainerImageAssetMetadataEntry.getId()Sets the value ofContainerImageAssetMetadataEntry.getImageTag()networkMode(String networkMode) Sets the value ofContainerImageAssetMetadataEntry.getNetworkMode()Sets the value ofContainerImageAssetMetadataEntry.getOutputs()Sets the value ofContainerImageAssetMetadataEntry.getPackaging()Sets the value ofContainerImageAssetMetadataEntry.getPath()Sets the value ofContainerImageAssetMetadataEntry.getPlatform()repositoryName(String repositoryName) Sets the value ofContainerImageAssetMetadataEntry.getRepositoryName()sourceHash(String sourceHash) Sets the value ofContainerImageAssetMetadataEntry.getSourceHash()Sets the value ofContainerImageAssetMetadataEntry.getTarget()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
id
Sets the value ofContainerImageAssetMetadataEntry.getId()- Parameters:
id- Logical identifier for the asset. This parameter is required.- Returns:
this
-
packaging
Sets the value ofContainerImageAssetMetadataEntry.getPackaging()- Parameters:
packaging- Type of asset. This parameter is required.- Returns:
this
-
path
Sets the value ofContainerImageAssetMetadataEntry.getPath()- Parameters:
path- Path on disk to the asset. This parameter is required.- Returns:
this
-
sourceHash
Sets the value ofContainerImageAssetMetadataEntry.getSourceHash()- Parameters:
sourceHash- The hash of the asset source. This parameter is required.- Returns:
this
-
buildArgs
@Stability(Stable) public ContainerImageAssetMetadataEntry.Builder buildArgs(Map<String, String> buildArgs) Sets the value ofContainerImageAssetMetadataEntry.getBuildArgs()- Parameters:
buildArgs- Build args to pass to thedocker buildcommand.- Returns:
this
-
buildSecrets
@Stability(Stable) public ContainerImageAssetMetadataEntry.Builder buildSecrets(Map<String, String> buildSecrets) Sets the value ofContainerImageAssetMetadataEntry.getBuildSecrets()- Parameters:
buildSecrets- Build secrets to pass to thedocker buildcommand.- Returns:
this
-
buildSsh
Sets the value ofContainerImageAssetMetadataEntry.getBuildSsh()- Parameters:
buildSsh- SSH agent socket or keys to pass to thedocker buildcommand.- Returns:
this
-
cacheDisabled
@Stability(Stable) public ContainerImageAssetMetadataEntry.Builder cacheDisabled(Boolean cacheDisabled) Sets the value ofContainerImageAssetMetadataEntry.getCacheDisabled()- Parameters:
cacheDisabled- Disable the cache and pass--no-cacheto thedocker buildcommand.- Returns:
this
-
cacheFrom
@Stability(Stable) public ContainerImageAssetMetadataEntry.Builder cacheFrom(List<? extends ContainerImageAssetCacheOption> cacheFrom) Sets the value ofContainerImageAssetMetadataEntry.getCacheFrom()- Parameters:
cacheFrom- Cache from options to pass to thedocker buildcommand.- Returns:
this
-
cacheTo
@Stability(Stable) public ContainerImageAssetMetadataEntry.Builder cacheTo(ContainerImageAssetCacheOption cacheTo) Sets the value ofContainerImageAssetMetadataEntry.getCacheTo()- Parameters:
cacheTo- Cache to options to pass to thedocker buildcommand.- Returns:
this
-
file
Sets the value ofContainerImageAssetMetadataEntry.getFile()- Parameters:
file- Path to the Dockerfile (relative to the directory).- Returns:
this
-
imageTag
Sets the value ofContainerImageAssetMetadataEntry.getImageTag()- Parameters:
imageTag- The docker image tag to use for tagging pushed images. This field is required ifimageParameterNameis ommited (otherwise, the app won't be able to find the image).- Returns:
this
-
networkMode
Sets the value ofContainerImageAssetMetadataEntry.getNetworkMode()- Parameters:
networkMode- Networking mode for the RUN commands during build.- Returns:
this
-
outputs
Sets the value ofContainerImageAssetMetadataEntry.getOutputs()- Parameters:
outputs- Outputs to pass to thedocker buildcommand.- Returns:
this
-
platform
Sets the value ofContainerImageAssetMetadataEntry.getPlatform()- Parameters:
platform- Platform to build for. Requires Docker Buildx.- Returns:
this
-
repositoryName
@Stability(Stable) public ContainerImageAssetMetadataEntry.Builder repositoryName(String repositoryName) Sets the value ofContainerImageAssetMetadataEntry.getRepositoryName()- Parameters:
repositoryName- ECR repository name, if omitted a default name based on the asset's ID is used instead. Specify this property if you need to statically address the image, e.g. from a Kubernetes Pod. Note, this is only the repository name, without the registry and the tag parts.- Returns:
this
-
target
Sets the value ofContainerImageAssetMetadataEntry.getTarget()- Parameters:
target- Docker target to build to.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ContainerImageAssetMetadataEntry>- Returns:
- a new instance of
ContainerImageAssetMetadataEntry - Throws:
NullPointerException- if any required attribute was not provided
-