Interface CustomCommandOptions

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

@Generated(value="jsii-pacmak/1.102.0 (build e354887)", date="2024-08-23T05:56:18.903Z") @Stability(Stable) public interface CustomCommandOptions extends software.amazon.jsii.JsiiSerializable, AssetOptions
Options for creating AssetCode with a custom command, such as running a buildfile.

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.iam.*;
 import software.amazon.awscdk.services.lambda.*;
 Object commandOptions;
 DockerImage dockerImage;
 IGrantable grantable;
 ILocalBundling localBundling;
 CustomCommandOptions customCommandOptions = CustomCommandOptions.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())
         .commandOptions(Map.of(
                 "commandOptionsKey", commandOptions))
         .deployTime(false)
         .exclude(List.of("exclude"))
         .followSymlinks(SymlinkFollowMode.NEVER)
         .ignoreMode(IgnoreMode.GLOB)
         .readers(List.of(grantable))
         .build();
 
  • Method Details

    • getCommandOptions

      @Stability(Stable) @Nullable default Map<String,Object> getCommandOptions()
      options that are passed to the spawned process, which determine the characteristics of the spawned process.

      Default: : see `child_process.SpawnSyncOptions` (https://nodejs.org/api/child_process.html#child_processspawnsynccommand-args-options).

    • builder

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