Package com.pulumi.automation
Class CommandRunOptions.Builder
- java.lang.Object
-
- com.pulumi.automation.CommandRunOptions.Builder
-
- Enclosing class:
- CommandRunOptions
public static class CommandRunOptions.Builder extends java.lang.Object
Builder forCommandRunOptions
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandRunOptions.Builder
additionalEnv(java.util.Map<java.lang.String,java.lang.String> additionalEnv)
Sets the additional environment variables for the command.CommandRunOptions
build()
Builds theCommandRunOptions
.CommandRunOptions.Builder
onEngineEvent(java.util.function.Consumer<EngineEvent> onEngineEvent)
Sets a consumer that will be called with each engine event from the command.CommandRunOptions.Builder
onStandardError(java.util.function.Consumer<java.lang.String> onStandardError)
Sets a consumer that will be called with each line of standard error from the command.CommandRunOptions.Builder
onStandardOutput(java.util.function.Consumer<java.lang.String> onStandardOutput)
Sets a consumer that will be called with each line of standard output from the command.CommandRunOptions.Builder
standardInput(java.lang.String standardInput)
Sets the standard input for the command.CommandRunOptions.Builder
workingDir(java.nio.file.Path workingDir)
Sets the working directory for the command.
-
-
-
Method Detail
-
workingDir
public CommandRunOptions.Builder workingDir(java.nio.file.Path workingDir)
Sets the working directory for the command.- Parameters:
workingDir
- the working directory- Returns:
- the builder
-
additionalEnv
public CommandRunOptions.Builder additionalEnv(java.util.Map<java.lang.String,java.lang.String> additionalEnv)
Sets the additional environment variables for the command.- Parameters:
additionalEnv
- the additional environment variables- Returns:
- the builder
-
standardInput
public CommandRunOptions.Builder standardInput(java.lang.String standardInput)
Sets the standard input for the command.- Parameters:
standardInput
- the standard input- Returns:
- the builder
-
onStandardOutput
public CommandRunOptions.Builder onStandardOutput(java.util.function.Consumer<java.lang.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(java.util.function.Consumer<java.lang.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(java.util.function.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 theCommandRunOptions
.- Returns:
- the options
-
-