Interface AssetProps

All Superinterfaces:
AssetOptions, AssetOptions, FileCopyOptions, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AssetProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:24.150Z") @Stability(Stable) public interface AssetProps extends software.amazon.jsii.JsiiSerializable, AssetOptions
Example:

 import software.amazon.awscdk.*;
 Asset asset = Asset.Builder.create(this, "BundledAsset")
         .path("/path/to/asset")
         .bundling(BundlingOptions.builder()
                 .image(DockerImage.fromRegistry("alpine"))
                 .command(List.of("command-that-produces-an-archive.sh"))
                 .outputType(BundlingOutput.NOT_ARCHIVED)
                 .build())
         .build();
 
  • Method Details

    • getPath

      @Stability(Stable) @NotNull String getPath()
      The disk location of the asset.

      The path should refer to one of the following:

      • A regular file or a .zip file, in which case the file will be uploaded as-is to S3.
      • A directory, in which case it will be archived into a .zip file and uploaded to S3.
    • builder

      @Stability(Stable) static AssetProps.Builder builder()
      Returns:
      a AssetProps.Builder of AssetProps