Interface Deployment
-
- All Known Subinterfaces:
DeploymentInstance
public interface Deployment
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Output<T>
call(java.lang.String token, TypeShape<T> targetType, CallArgs args)
<T> Output<T>
call(java.lang.String token, TypeShape<T> targetType, CallArgs args, Resource self)
<T> Output<T>
call(java.lang.String token, TypeShape<T> targetType, CallArgs args, Resource self, CallOptions options)
Dynamically calls the functiontoken
, which is offered by a provider plugin.void
call(java.lang.String token, CallArgs args)
Same ascall(String, TypeShape, CallArgs, Resource, CallOptions)
, however the return value is ignored.void
call(java.lang.String token, CallArgs args, Resource self)
Same ascall(String, TypeShape, CallArgs, Resource, CallOptions)
, however the return value is ignored.void
call(java.lang.String token, CallArgs args, Resource self, CallOptions options)
Same ascall(String, TypeShape, CallArgs, Resource, CallOptions)
, however the return value is ignored.static DeploymentInstance
getInstance()
The current running deployment instance.java.lang.String
getProjectName()
java.lang.String
getStackName()
<T> Output<T>
invoke(java.lang.String token, TypeShape<T> targetType, InvokeArgs args)
Same as @seeinvoke(String, TypeShape, InvokeArgs, InvokeOptions)
<T> Output<T>
invoke(java.lang.String token, TypeShape<T> targetType, InvokeArgs args, InvokeOptions options)
Dynamically invokes the functiontoken
, which is offered by a provider plugin.<T> java.util.concurrent.CompletableFuture<T>
invokeAsync(java.lang.String token, TypeShape<T> targetType, InvokeArgs args)
<T> java.util.concurrent.CompletableFuture<T>
invokeAsync(java.lang.String token, TypeShape<T> targetType, InvokeArgs args, InvokeOptions options)
Dynamically invokes the functiontoken
, which is offered by a provider plugin.java.util.concurrent.CompletableFuture<java.lang.Void>
invokeAsync(java.lang.String token, InvokeArgs args)
Same as @seeinvokeAsync(String, TypeShape, InvokeArgs, InvokeOptions)
, however the return value is ignored.java.util.concurrent.CompletableFuture<java.lang.Void>
invokeAsync(java.lang.String token, InvokeArgs args, InvokeOptions options)
Same as @seeinvokeAsync(String, TypeShape, InvokeArgs, InvokeOptions)
, however the return value is ignored.boolean
isDryRun()
Whether or not the application is currently being previewed or actually applied.static java.util.concurrent.CompletableFuture<java.lang.Integer>
runAsync(java.util.function.Supplier<java.util.Map<java.lang.String,Output<?>>> callback)
An entry-point to a Pulumi application.static java.util.concurrent.CompletableFuture<java.lang.Integer>
runAsyncFuture(java.util.function.Supplier<java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,Output<?>>>> callback)
An entry-point to a Pulumi application.static java.util.concurrent.CompletableFuture<java.lang.Integer>
runAsyncFuture(java.util.function.Supplier<java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,Output<?>>>> callback, StackOptions options)
An entry-point to a Pulumi application.static java.util.concurrent.CompletableFuture<java.lang.Integer>
runAsyncRunnable(java.lang.Runnable callback)
An entry-point to a Pulumi application.static <S extends Stack>
java.util.concurrent.CompletableFuture<java.lang.Integer>runAsyncStack(java.util.function.Supplier<S> stackFactory)
An entry-point to a Pulumi application.
-
-
-
Method Detail
-
getInstance
static DeploymentInstance getInstance()
The current running deployment instance. This is only available from inside the function passed to @seerunAsync(Supplier)
(or its overloads).- Throws:
java.lang.IllegalStateException
- if called before 'run' was called
-
getStackName
@Nonnull java.lang.String getStackName()
- Returns:
- the current stack name
-
getProjectName
@Nonnull java.lang.String getProjectName()
- Returns:
- the current project name
-
isDryRun
boolean isDryRun()
Whether or not the application is currently being previewed or actually applied.- Returns:
- true if application is being applied
-
invoke
<T> Output<T> invoke(java.lang.String token, TypeShape<T> targetType, InvokeArgs args, @Nullable InvokeOptions options)
-
invoke
<T> Output<T> invoke(java.lang.String token, TypeShape<T> targetType, InvokeArgs args)
Same as @seeinvoke(String, TypeShape, InvokeArgs, InvokeOptions)
-
invokeAsync
<T> java.util.concurrent.CompletableFuture<T> invokeAsync(java.lang.String token, TypeShape<T> targetType, InvokeArgs args, InvokeOptions options)
Dynamically invokes the functiontoken
, which is offered by a provider plugin.The result of
invokeAsync
will be a @seeCompletableFuture
resolved to the result value of the provider plugin.The
args
inputs can be a bag of computed values (including,T
s, @seeCompletableFuture
s, @seeOutput
s, etc.).
-
invokeAsync
<T> java.util.concurrent.CompletableFuture<T> invokeAsync(java.lang.String token, TypeShape<T> targetType, InvokeArgs args)
-
invokeAsync
java.util.concurrent.CompletableFuture<java.lang.Void> invokeAsync(java.lang.String token, InvokeArgs args, InvokeOptions options)
Same as @seeinvokeAsync(String, TypeShape, InvokeArgs, InvokeOptions)
, however the return value is ignored.
-
invokeAsync
java.util.concurrent.CompletableFuture<java.lang.Void> invokeAsync(java.lang.String token, InvokeArgs args)
Same as @seeinvokeAsync(String, TypeShape, InvokeArgs, InvokeOptions)
, however the return value is ignored.
-
call
<T> Output<T> call(java.lang.String token, TypeShape<T> targetType, CallArgs args, @Nullable Resource self, @Nullable CallOptions options)
-
call
<T> Output<T> call(java.lang.String token, TypeShape<T> targetType, CallArgs args, @Nullable Resource self)
-
call
void call(java.lang.String token, CallArgs args, @Nullable Resource self, @Nullable CallOptions options)
Same ascall(String, TypeShape, CallArgs, Resource, CallOptions)
, however the return value is ignored.
-
call
void call(java.lang.String token, CallArgs args, @Nullable Resource self)
Same ascall(String, TypeShape, CallArgs, Resource, CallOptions)
, however the return value is ignored.
-
call
void call(java.lang.String token, CallArgs args)
Same ascall(String, TypeShape, CallArgs, Resource, CallOptions)
, however the return value is ignored.
-
runAsyncRunnable
static java.util.concurrent.CompletableFuture<java.lang.Integer> runAsyncRunnable(java.lang.Runnable callback)
An entry-point to a Pulumi application.- Parameters:
callback
- Callback that creates stack resources.- See Also:
for more details.
-
runAsync
static java.util.concurrent.CompletableFuture<java.lang.Integer> runAsync(java.util.function.Supplier<java.util.Map<java.lang.String,Output<?>>> callback)
An entry-point to a Pulumi application. Deployment will instantiate a default stack instance based on the callback passed ascallback
parameter.- Parameters:
callback
- Callback that creates stack resources.- Returns:
- A dictionary of stack outputs.
- See Also:
for more details.
-
runAsyncFuture
static java.util.concurrent.CompletableFuture<java.lang.Integer> runAsyncFuture(java.util.function.Supplier<java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,Output<?>>>> callback)
An entry-point to a Pulumi application. Deployment will instantiate a default stack instance based on the callback passed ascallback
parameter.- Parameters:
callback
- Callback that creates stack resources.- See Also:
for more details.
-
runAsyncFuture
static java.util.concurrent.CompletableFuture<java.lang.Integer> runAsyncFuture(java.util.function.Supplier<java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,Output<?>>>> callback, @Nullable StackOptions options)
An entry-point to a Pulumi application. Deployment will instantiate a default stack instance based on the callback passed ascallback
parameter.- Parameters:
callback
- Callback that creates stack resources.options
- Optional Stack options. Java applications should perform all startup logic they need in theirmain
method and then end with:public static void main(String[] args) { // program initialization code ... return Deployment.runAsync(() -> { // Code that creates resources. }); }
Importantly: Cloud resources cannot be created outside of the lambda passed to any of the @see #runAsync overloads.
Because cloud Resource construction is inherently asynchronous, the result of this function is a @see
The function passed to @see #runAsyncFuture(Supplier, StackOptions) can optionally return a @seeCompletableFuture
which should then be returned or awaited. This will ensure that any problems that are encountered during the running of the program are properly reported. Failure to do this may lead to the program ending early before all resources are properly registered.Map
. The keys and values in this map will become the outputs for the Pulumi Stack that is created.- See Also:
for more information.
-
runAsyncStack
static <S extends Stack> java.util.concurrent.CompletableFuture<java.lang.Integer> runAsyncStack(java.util.function.Supplier<S> stackFactory)
An entry-point to a Pulumi application. Deployment will instantiate a new stack instance using the supplier passed asstackFactory
parameter.- Parameters:
stackFactory
- The stack supplier used to create stack instances Java applications should perform all startup logic they need in theirmain
method and then end with:public static void main(String[] args) { // program initialization code ... return Deployment.runAsyncStack(() -> new MyStack())); }
Importantly: cloud resources cannot be created outside of the @see Stack component.
Because cloud Resource construction is inherently asynchronous, the result of this function is a @see
CompletableFuture
which should then be returned or awaited. This will ensure that any problems that are encountered during the running of the program are properly reported. Failure to do this may lead to the program ending early before all resources are properly registered.- See Also:
for more information.
-
-