Class AssetImportSource

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudfront.ImportSource
software.amazon.awscdk.services.cloudfront.AssetImportSource
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-06T23:25:05.423Z") @Stability(Stable) public class AssetImportSource extends ImportSource
An import source from a local file.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.cloudfront.*;
 import software.amazon.awscdk.services.iam.*;
 DockerImage dockerImage;
 IGrantable grantable;
 ILocalBundling localBundling;
 ImportSource assetImportSource = AssetImportSource.fromAsset("path", AssetOptions.builder()
         .assetHash("assetHash")
         .assetHashType(AssetHashType.SOURCE)
         .bundling(BundlingOptions.builder()
                 .image(dockerImage)
                 // the properties below are optional
                 .bundlingFileAccess(BundlingFileAccess.VOLUME_COPY)
                 .command(List.of("command"))
                 .entrypoint(List.of("entrypoint"))
                 .environment(Map.of(
                         "environmentKey", "environment"))
                 .local(localBundling)
                 .network("network")
                 .outputType(BundlingOutput.ARCHIVED)
                 .platform("platform")
                 .securityOpt("securityOpt")
                 .user("user")
                 .volumes(List.of(DockerVolume.builder()
                         .containerPath("containerPath")
                         .hostPath("hostPath")
                         // the properties below are optional
                         .consistency(DockerVolumeConsistency.CONSISTENT)
                         .build()))
                 .volumesFrom(List.of("volumesFrom"))
                 .workingDirectory("workingDirectory")
                 .build())
         .deployTime(false)
         .exclude(List.of("exclude"))
         .followSymlinks(SymlinkFollowMode.NEVER)
         .ignoreMode(IgnoreMode.GLOB)
         .readers(List.of(grantable))
         .build());
 
  • Constructor Details

    • AssetImportSource

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

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

      @Stability(Stable) public AssetImportSource(@NotNull String path, @Nullable AssetOptions options)
      Parameters:
      path - the path to the local file. This parameter is required.
      options - the configuration for the temporarily created S3 file.
    • AssetImportSource

      @Stability(Stable) public AssetImportSource(@NotNull String path)
      Parameters:
      path - the path to the local file. This parameter is required.
  • Method Details

    • getPath

      @Stability(Stable) @NotNull public String getPath()
      the path to the local file.