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.ObjectBuilder forCommandRunOptions.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandRunOptions.BuilderadditionalEnv(java.util.Map<java.lang.String,java.lang.String> additionalEnv)Sets the additional environment variables for the command.CommandRunOptionsbuild()Builds theCommandRunOptions.CommandRunOptions.BuilderonEngineEvent(java.util.function.Consumer<EngineEvent> onEngineEvent)Sets a consumer that will be called with each engine event from the command.CommandRunOptions.BuilderonStandardError(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.BuilderonStandardOutput(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.BuilderstandardInput(java.lang.String standardInput)Sets the standard input for the command.CommandRunOptions.BuilderworkingDir(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
-
-