Class CommandRunOptions


  • public final class CommandRunOptions
    extends java.lang.Object
    Configuration options for running a Pulumi command.
    • Method Detail

      • workingDir

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

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

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

        @Nullable
        public java.util.function.Consumer<java.lang.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 java.util.function.Consumer<java.lang.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 java.util.function.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​(java.util.Map<java.lang.String,​java.lang.String> newEnv)
        Returns a new CommandRunOptions with the given additional environment variables.
        Parameters:
        newEnv - the additional environment variables to add
        Returns:
        the new CommandRunOptions