Package software.amazon.awscdk.core
Class FileAssetSource.Builder
java.lang.Object
software.amazon.awscdk.core.FileAssetSource.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FileAssetSource>
- Enclosing interface:
- FileAssetSource
@Stability(Stable)
public static final class FileAssetSource.Builder
extends Object
implements software.amazon.jsii.Builder<FileAssetSource>
A builder for
FileAssetSource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.executable
(List<String> executable) Sets the value ofFileAssetSource.getExecutable()
Sets the value ofFileAssetSource.getFileName()
packaging
(FileAssetPackaging packaging) Sets the value ofFileAssetSource.getPackaging()
sourceHash
(String sourceHash) Sets the value ofFileAssetSource.getSourceHash()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
sourceHash
Sets the value ofFileAssetSource.getSourceHash()
- Parameters:
sourceHash
- A hash on the content source. This parameter is required. This hash is used to uniquely identify this asset throughout the system. If this value doesn't change, the asset will not be rebuilt or republished.- Returns:
this
-
executable
Sets the value ofFileAssetSource.getExecutable()
- Parameters:
executable
- An external command that will produce the packaged asset. The command should produce the location of a ZIP file onstdout
.- Returns:
this
-
fileName
Sets the value ofFileAssetSource.getFileName()
- Parameters:
fileName
- The path, relative to the root of the cloud assembly, in which this asset source resides. This can be a path to a file or a directory, depending on the packaging type.- Returns:
this
-
packaging
Sets the value ofFileAssetSource.getPackaging()
- Parameters:
packaging
- Which type of packaging to perform.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<FileAssetSource>
- Returns:
- a new instance of
FileAssetSource
- Throws:
NullPointerException
- if any required attribute was not provided
-