Package com.pulumi.automation
Class CommandRunOptions
- java.lang.Object
-
- com.pulumi.automation.CommandRunOptions
-
public final class CommandRunOptions extends java.lang.ObjectConfiguration options for running a Pulumi command.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommandRunOptions.BuilderBuilder forCommandRunOptions.
-
Field Summary
Fields Modifier and Type Field Description static CommandRunOptionsEmptyAn empty set of options.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>additionalEnv()Returns the additional environment variables for the command.static CommandRunOptions.Builderbuilder()Returns a new builder forCommandRunOptions.java.util.function.Consumer<EngineEvent>onEngineEvent()Returns a consumer that will be called with each engine event from the command.java.util.function.Consumer<java.lang.String>onStandardError()Returns a consumer that will be called with each line of standard error from the command.java.util.function.Consumer<java.lang.String>onStandardOutput()Returns a consumer that will be called with each line of standard output from the command.java.lang.StringstandardInput()Returns the standard input for the command.CommandRunOptionswithAdditionalEnv(java.util.Map<java.lang.String,java.lang.String> newEnv)Returns a newCommandRunOptionswith the given additional environment variables.CommandRunOptionswithWorkingDir(java.nio.file.Path workingDir)Returns a newCommandRunOptionswith the given working directory.java.nio.file.PathworkingDir()Returns the working directory for the command.
-
-
-
Field Detail
-
Empty
public static final CommandRunOptions Empty
An empty set of options.
-
-
Method Detail
-
builder
public static CommandRunOptions.Builder builder()
Returns a new builder forCommandRunOptions.- Returns:
- the builder
-
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 newCommandRunOptionswith the given additional environment variables.- Parameters:
newEnv- the additional environment variables to add- Returns:
- the new
CommandRunOptions
-
withWorkingDir
public CommandRunOptions withWorkingDir(java.nio.file.Path workingDir)
Returns a newCommandRunOptionswith the given working directory.- Parameters:
workingDir- the working directory- Returns:
- the new
CommandRunOptions
-
-