Package com.pulumi.automation
Class LocalPulumiCommand
- java.lang.Object
-
- com.pulumi.automation.LocalPulumiCommand
-
- All Implemented Interfaces:
PulumiCommand
public class LocalPulumiCommand extends java.lang.Object implements PulumiCommand
APulumiCommand
implementation that uses a locally installed Pulumi CLI.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LocalPulumiCommand
create()
Creates a newLocalPulumiCommand
instance.static LocalPulumiCommand
create(LocalPulumiCommandOptions options)
Creates a newLocalPulumiCommand
instance.CommandResult
run(java.util.List<java.lang.String> args, CommandRunOptions options)
Runs the Pulumi command.Version
version()
The version of the Pulumi CLI that is being used.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.pulumi.automation.PulumiCommand
run
-
-
-
-
Method Detail
-
create
public static LocalPulumiCommand create() throws AutomationException
Creates a newLocalPulumiCommand
instance.- Returns:
- a new
LocalPulumiCommand
instance - Throws:
AutomationException
-
create
public static LocalPulumiCommand create(LocalPulumiCommandOptions options) throws AutomationException
Creates a newLocalPulumiCommand
instance.- Parameters:
options
- options to configure theLocalPulumiCommand
- Returns:
- a new
LocalPulumiCommand
instance - Throws:
AutomationException
-
version
@Nullable public Version version()
Description copied from interface:PulumiCommand
The version of the Pulumi CLI that is being used.- Specified by:
version
in interfacePulumiCommand
- Returns:
- the version of the Pulumi CLI or
null
-
run
public CommandResult run(java.util.List<java.lang.String> args, CommandRunOptions options) throws AutomationException
Runs the Pulumi command.- Specified by:
run
in interfacePulumiCommand
- Parameters:
args
- the arguments to pass to the commandoptions
- the options for running the command- Returns:
- the command result
- Throws:
AutomationException
- if the command fails
-
-