Package software.amazon.awscdk
Class FileAssetSource.Builder
java.lang.Object
software.amazon.awscdk.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.deployTime
(Boolean deployTime) Sets the value ofFileAssetSource.getDeployTime()
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
-
deployTime
Sets the value ofFileAssetSource.getDeployTime()
- Parameters:
deployTime
- Whether or not the asset needs to exist beyond deployment time;. i.e. are copied over to a different location and not needed afterwards. Setting this property to true has an impact on the lifecycle of the asset, because we will assume that it is safe to delete after the CloudFormation deployment succeeds.For example, Lambda Function assets are copied over to Lambda during deployment. Therefore, it is not necessary to store the asset in S3, so we consider those deployTime assets.
- 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
-