Class AssetManifestBuilder

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.AssetManifestBuilder
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-27T16:50:51.737Z") @Stability(Stable) public class AssetManifestBuilder extends software.amazon.jsii.JsiiObject
Build an asset manifest from assets added to a stack.

This class does not need to be used by app builders; it is only necessary for building Stack Synthesizers.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 AssetManifestBuilder assetManifestBuilder = new AssetManifestBuilder();
 
  • Constructor Details

    • AssetManifestBuilder

      protected AssetManifestBuilder(software.amazon.jsii.JsiiObjectRef objRef)
    • AssetManifestBuilder

      protected AssetManifestBuilder(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • AssetManifestBuilder

      @Stability(Stable) public AssetManifestBuilder()
  • Method Details

    • addDockerImageAsset

      @Stability(Stable) @NotNull public DockerImageDestination addDockerImageAsset(@NotNull Stack stack, @NotNull String sourceHash, @NotNull DockerImageSource source, @NotNull DockerImageDestination dest)
      Add a docker asset source and destination to the manifest.

      sourceHash should be unique for every source.

      Parameters:
      stack - This parameter is required.
      sourceHash - This parameter is required.
      source - This parameter is required.
      dest - This parameter is required.
    • addFileAsset

      @Stability(Stable) @NotNull public FileDestination addFileAsset(@NotNull Stack stack, @NotNull String sourceHash, @NotNull FileSource source, @NotNull FileDestination dest)
      Add a file asset source and destination to the manifest.

      sourceHash should be unique for every source.

      Parameters:
      stack - This parameter is required.
      sourceHash - This parameter is required.
      source - This parameter is required.
      dest - This parameter is required.
    • defaultAddDockerImageAsset

      @Stability(Stable) @NotNull public DockerImageDestination defaultAddDockerImageAsset(@NotNull Stack stack, @NotNull DockerImageAssetSource asset, @NotNull AssetManifestDockerImageDestination target)
      Add a docker image asset to the manifest with default settings.

      Derive the region from the stack, use the asset hash as the key, and set the prefix.

      Parameters:
      stack - This parameter is required.
      asset - This parameter is required.
      target - This parameter is required.
    • defaultAddFileAsset

      @Stability(Stable) @NotNull public FileDestination defaultAddFileAsset(@NotNull Stack stack, @NotNull FileAssetSource asset, @NotNull AssetManifestFileDestination target)
      Add a file asset to the manifest with default settings.

      Derive the region from the stack, use the asset hash as the key, copy the file extension over, and set the prefix.

      Parameters:
      stack - This parameter is required.
      asset - This parameter is required.
      target - This parameter is required.
    • emitManifest

      @Stability(Stable) @NotNull public String emitManifest(@NotNull Stack stack, @NotNull ISynthesisSession session, @Nullable AssetManifestOptions options, @Nullable List<String> dependencies)
      Write the manifest to disk, and add it to the synthesis session.

      Return the artifact id, which should be added to the additionalDependencies field of the stack artifact.

      Parameters:
      stack - This parameter is required.
      session - This parameter is required.
      options -
      dependencies -
    • emitManifest

      @Stability(Stable) @NotNull public String emitManifest(@NotNull Stack stack, @NotNull ISynthesisSession session, @Nullable AssetManifestOptions options)
      Write the manifest to disk, and add it to the synthesis session.

      Return the artifact id, which should be added to the additionalDependencies field of the stack artifact.

      Parameters:
      stack - This parameter is required.
      session - This parameter is required.
      options -
    • emitManifest

      @Stability(Stable) @NotNull public String emitManifest(@NotNull Stack stack, @NotNull ISynthesisSession session)
      Write the manifest to disk, and add it to the synthesis session.

      Return the artifact id, which should be added to the additionalDependencies field of the stack artifact.

      Parameters:
      stack - This parameter is required.
      session - This parameter is required.
    • getHasAssets

      @Stability(Stable) @NotNull public Boolean getHasAssets()
      Whether there are any assets registered in the manifest.