Class AssetEnvironmentFile

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ecs.EnvironmentFile
software.amazon.awscdk.services.ecs.AssetEnvironmentFile
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:00.902Z") @Stability(Stable) public class AssetEnvironmentFile extends EnvironmentFile
Environment file from a local directory.

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.ecs.*;
 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.services.kms.*;
 DockerImage dockerImage;
 IGrantable grantable;
 Key key;
 ILocalBundling localBundling;
 AssetEnvironmentFile assetEnvironmentFile = AssetEnvironmentFile.Builder.create("path")
         .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))
         .sourceKMSKey(key)
         .build();
 
  • Constructor Details

    • AssetEnvironmentFile

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

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

      @Stability(Stable) public AssetEnvironmentFile(@NotNull String path, @Nullable AssetOptions options)
      Parameters:
      path - The path to the asset file or directory. This parameter is required.
      options -
    • AssetEnvironmentFile

      @Stability(Stable) public AssetEnvironmentFile(@NotNull String path)
      Parameters:
      path - The path to the asset file or directory. This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public EnvironmentFileConfig bind(@NotNull software.constructs.Construct scope)
      Called when the container is initialized to allow this object to bind to the stack.

      Specified by:
      bind in class EnvironmentFile
      Parameters:
      scope - This parameter is required.
    • getPath

      @Stability(Stable) @NotNull public String getPath()
      The path to the asset file or directory.