Package software.amazon.awscdk.core
Class BundlingOptions.Builder
java.lang.Object
software.amazon.awscdk.core.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.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()
outputType
(BundlingOutput outputType) Sets the value ofBundlingOptions.getOutputType()
securityOpt
(String securityOpt) Sets the value ofBundlingOptions.getSecurityOpt()
Sets the value ofBundlingOptions.getUser()
volumes
(List<? extends DockerVolume> volumes) Sets the value ofBundlingOptions.getVolumes()
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
-
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
-
outputType
Sets the value ofBundlingOptions.getOutputType()
- Parameters:
outputType
- The type of output that this bundling operation is producing.- 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
-
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
-