Class CommandRunOptions.Builder

java.lang.Object
com.pulumi.automation.CommandRunOptions.Builder
Enclosing class:
CommandRunOptions

public static class CommandRunOptions.Builder extends Object
Builder for CommandRunOptions.
  • Method Details

    • workingDir

      public CommandRunOptions.Builder workingDir(Path workingDir)
      Sets the working directory for the command.
      Parameters:
      workingDir - the working directory
      Returns:
      the builder
    • additionalEnv

      public CommandRunOptions.Builder additionalEnv(Map<String,String> additionalEnv)
      Sets the additional environment variables for the command.
      Parameters:
      additionalEnv - the additional environment variables
      Returns:
      the builder
    • standardInput

      public CommandRunOptions.Builder standardInput(String standardInput)
      Sets the standard input for the command.
      Parameters:
      standardInput - the standard input
      Returns:
      the builder
    • onStandardOutput

      public CommandRunOptions.Builder onStandardOutput(Consumer<String> onStandardOutput)
      Sets a consumer that will be called with each line of standard output from the command.
      Parameters:
      onStandardOutput - the consumer for standard output
      Returns:
      the builder
    • onStandardError

      public CommandRunOptions.Builder onStandardError(Consumer<String> onStandardError)
      Sets a consumer that will be called with each line of standard error from the command.
      Parameters:
      onStandardError - the consumer for standard error
      Returns:
      the builder
    • onEngineEvent

      public CommandRunOptions.Builder onEngineEvent(Consumer<EngineEvent> onEngineEvent)
      Sets a consumer that will be called with each engine event from the command.
      Parameters:
      onEngineEvent - the consumer for engine events
      Returns:
      the builder
    • build

      public CommandRunOptions build()
      Builds the CommandRunOptions.
      Returns:
      the options