Class CommandRunOptions

java.lang.Object
com.pulumi.automation.CommandRunOptions

public final class CommandRunOptions extends Object
Configuration options for running a Pulumi command.
  • Field Details

  • Method Details

    • builder

      public static CommandRunOptions.Builder builder()
      Returns a new builder for CommandRunOptions.
      Returns:
      the builder
    • workingDir

      @Nullable public Path workingDir()
      Returns the working directory for the command.
      Returns:
      the working directory
    • additionalEnv

      public Map<String,String> additionalEnv()
      Returns the additional environment variables for the command.
      Returns:
      the additional environment variables
    • standardInput

      @Nullable public String standardInput()
      Returns the standard input for the command.
      Returns:
      the standard input
    • onStandardOutput

      @Nullable public Consumer<String> onStandardOutput()
      Returns a consumer that will be called with each line of standard output from the command.
      Returns:
      the consumer for standard output
    • onStandardError

      @Nullable public Consumer<String> onStandardError()
      Returns a consumer that will be called with each line of standard error from the command.
      Returns:
      the consumer for standard error
    • onEngineEvent

      @Nullable public Consumer<EngineEvent> onEngineEvent()
      Returns a consumer that will be called with each engine event from the command.
      Returns:
      the consumer for engine events
    • withAdditionalEnv

      public CommandRunOptions withAdditionalEnv(Map<String,String> newEnv)
      Returns a new CommandRunOptions with the given additional environment variables.
      Parameters:
      newEnv - the additional environment variables to add
      Returns:
      the new CommandRunOptions
    • withWorkingDir

      public CommandRunOptions withWorkingDir(Path workingDir)
      Returns a new CommandRunOptions with the given working directory.
      Parameters:
      workingDir - the working directory
      Returns:
      the new CommandRunOptions