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 Details

    • Builder

      public Builder()
  • Method Details

    • sourceHash

      @Stability(Stable) public FileAssetSource.Builder sourceHash(String sourceHash)
      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

      @Stability(Stable) public FileAssetSource.Builder deployTime(Boolean deployTime)
      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

      @Stability(Stable) public FileAssetSource.Builder executable(List<String> executable)
      Parameters:
      executable - An external command that will produce the packaged asset. The command should produce the location of a ZIP file on stdout.
      Returns:
      this
    • fileName

      @Stability(Stable) public FileAssetSource.Builder fileName(String fileName)
      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

      @Stability(Stable) public FileAssetSource.Builder packaging(FileAssetPackaging packaging)
      Parameters:
      packaging - Which type of packaging to perform.
      Returns:
      this
    • build

      @Stability(Stable) public FileAssetSource build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<FileAssetSource>
      Returns:
      a new instance of FileAssetSource
      Throws:
      NullPointerException - if any required attribute was not provided