@Stability(value=Experimental) public static final class ParcelOptions.Builder extends Object implements software.amazon.jsii.Builder<ParcelOptions>
ParcelOptions| Constructor and Description |
|---|
Builder() |
@Stability(value=Experimental) public ParcelOptions.Builder entry(String entry)
ParcelOptions.getEntry()entry - Entry file. This parameter is required.this@Stability(value=Experimental) public ParcelOptions.Builder runtime(Runtime runtime)
ParcelOptions.getRuntime()runtime - The runtime of the lambda function. This parameter is required.this@Stability(value=Experimental) public ParcelOptions.Builder buildArgs(Map<String,String> buildArgs)
ParcelBaseOptions.getBuildArgs()buildArgs - Build arguments to pass when building the bundling image.this@Stability(value=Experimental) public ParcelOptions.Builder bundlingDockerImage(BundlingDockerImage bundlingDockerImage)
ParcelBaseOptions.getBundlingDockerImage()bundlingDockerImage - A custom bundling Docker image.
This image should have Parcel installed at /. If you plan to use nodeModules
it should also have npm or yarn depending on the lock file you're using.
See https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/parcel/Dockerfile for the default image provided by @aws-cdk/aws-lambda-nodejs.
this@Stability(value=Experimental) public ParcelOptions.Builder cacheDir(String cacheDir)
ParcelBaseOptions.getCacheDir()cacheDir - The cache directory (relative to the project root).
Parcel uses a filesystem cache for fast rebuilds.this@Stability(value=Experimental) public ParcelOptions.Builder externalModules(List<String> externalModules)
ParcelBaseOptions.getExternalModules()externalModules - A list of modules that should be considered as externals (already available in the runtime).this@Stability(value=Experimental) public ParcelOptions.Builder forceDockerBundling(Boolean forceDockerBundling)
ParcelBaseOptions.getForceDockerBundling()forceDockerBundling - Force bundling in a Docker container even if local bundling is possible.This is useful if your function relies on node modules that should be installed (`nodeModules`) in a Lambda compatible environment.this@Stability(value=Experimental) public ParcelOptions.Builder minify(Boolean minify)
ParcelBaseOptions.getMinify()minify - Whether to minify files when bundling.this@Stability(value=Experimental) public ParcelOptions.Builder nodeModules(List<String> nodeModules)
ParcelBaseOptions.getNodeModules()nodeModules - A list of modules that should be installed instead of bundled.
Modules are
installed in a Lambda compatible environnment.this@Stability(value=Experimental) public ParcelOptions.Builder parcelEnvironment(Map<String,String> parcelEnvironment)
ParcelBaseOptions.getParcelEnvironment()parcelEnvironment - Environment variables defined when Parcel runs.this@Stability(value=Experimental) public ParcelOptions.Builder parcelVersion(String parcelVersion)
ParcelBaseOptions.getParcelVersion()parcelVersion - The version of Parcel to use when running in a Docker container.this@Stability(value=Experimental) public ParcelOptions.Builder projectRoot(String projectRoot)
ParcelBaseOptions.getProjectRoot()projectRoot - The root of the project.
This will be used as the source for the volume
mounted in the Docker container. If you specify this prop, ensure that
this path includes entry and any module/dependencies used by your
function otherwise bundling will not be possible.this@Stability(value=Experimental) public ParcelOptions.Builder sourceMaps(Boolean sourceMaps)
ParcelBaseOptions.getSourceMaps()sourceMaps - Whether to include source maps when bundling.this@Stability(value=Experimental) public ParcelOptions build()
build in interface software.amazon.jsii.Builder<ParcelOptions>ParcelOptionsNullPointerException - if any required attribute was not providedCopyright © 2020. All rights reserved.