Package software.amazon.awscdk
Class BundlingOptions.Builder
java.lang.Object
software.amazon.awscdk.BundlingOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BundlingOptions>
- Enclosing interface:
BundlingOptions
@Stability(Stable)
public static final class BundlingOptions.Builder
extends Object
implements software.amazon.jsii.Builder<BundlingOptions>
A builder for
BundlingOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.bundlingFileAccess
(BundlingFileAccess bundlingFileAccess) Sets the value ofBundlingOptions.getBundlingFileAccess()
Sets the value ofBundlingOptions.getCommand()
entrypoint
(List<String> entrypoint) Sets the value ofBundlingOptions.getEntrypoint()
environment
(Map<String, String> environment) Sets the value ofBundlingOptions.getEnvironment()
image
(DockerImage image) Sets the value ofBundlingOptions.getImage()
local
(ILocalBundling local) Sets the value ofBundlingOptions.getLocal()
Sets the value ofBundlingOptions.getNetwork()
outputType
(BundlingOutput outputType) Sets the value ofBundlingOptions.getOutputType()
Sets the value ofBundlingOptions.getPlatform()
securityOpt
(String securityOpt) Sets the value ofBundlingOptions.getSecurityOpt()
Sets the value ofBundlingOptions.getUser()
volumes
(List<? extends DockerVolume> volumes) Sets the value ofBundlingOptions.getVolumes()
volumesFrom
(List<String> volumesFrom) Sets the value ofBundlingOptions.getVolumesFrom()
workingDirectory
(String workingDirectory) Sets the value ofBundlingOptions.getWorkingDirectory()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
image
Sets the value ofBundlingOptions.getImage()
- Parameters:
image
- The Docker image where the command will run. This parameter is required.- Returns:
this
-
bundlingFileAccess
@Stability(Stable) public BundlingOptions.Builder bundlingFileAccess(BundlingFileAccess bundlingFileAccess) Sets the value ofBundlingOptions.getBundlingFileAccess()
- Parameters:
bundlingFileAccess
- The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.- Returns:
this
-
command
Sets the value ofBundlingOptions.getCommand()
- Parameters:
command
- The command to run in the Docker container. Example value:['npm', 'install']
- Returns:
this
-
entrypoint
Sets the value ofBundlingOptions.getEntrypoint()
- Parameters:
entrypoint
- The entrypoint to run in the Docker container. Example value:['/bin/sh', '-c']
- Returns:
this
-
environment
Sets the value ofBundlingOptions.getEnvironment()
- Parameters:
environment
- The environment variables to pass to the Docker container.- Returns:
this
-
local
Sets the value ofBundlingOptions.getLocal()
- Parameters:
local
- Local bundling provider. The provider implements a methodtryBundle()
which should returntrue
if local bundling was performed. Iffalse
is returned, docker bundling will be done.- Returns:
this
-
network
Sets the value ofBundlingOptions.getNetwork()
- Parameters:
network
- Docker Networking options.- Returns:
this
-
outputType
Sets the value ofBundlingOptions.getOutputType()
- Parameters:
outputType
- The type of output that this bundling operation is producing.- Returns:
this
-
platform
Sets the value ofBundlingOptions.getPlatform()
- Parameters:
platform
- Platform to build for. Requires Docker Buildx. Specify this property to build images on a specific platform.- Returns:
this
-
securityOpt
Sets the value ofBundlingOptions.getSecurityOpt()
- Parameters:
securityOpt
- Security configuration when running the docker container.- Returns:
this
-
user
Sets the value ofBundlingOptions.getUser()
- Parameters:
user
- The user to use when running the Docker container. user | user:group | uid | uid:gid | user:gid | uid:group- Returns:
this
-
volumes
Sets the value ofBundlingOptions.getVolumes()
- Parameters:
volumes
- Additional Docker volumes to mount.- Returns:
this
-
volumesFrom
Sets the value ofBundlingOptions.getVolumesFrom()
- Parameters:
volumesFrom
- Where to mount the specified volumes from.- Returns:
this
-
workingDirectory
Sets the value ofBundlingOptions.getWorkingDirectory()
- Parameters:
workingDirectory
- Working directory inside the Docker container.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BundlingOptions>
- Returns:
- a new instance of
BundlingOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-