Package com.pulumi.resources
Class StackReference
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.resources.StackReference
-
public class StackReference extends CustomResource
Manages a reference to a Pulumi stack and provides access to the referenced stack's outputs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StackReference.KeyMissingException
ConfigMissingException is used when a configuration value is completely missing.-
Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource
CustomResource.CustomResourceInternal
-
Nested classes/interfaces inherited from class com.pulumi.resources.Resource
Resource.LazyField<T>, Resource.LazyFields, Resource.ResourceInternal
-
-
Field Summary
-
Fields inherited from class com.pulumi.resources.Resource
childResources, remote
-
-
Constructor Summary
Constructors Constructor Description StackReference(java.lang.String name)
Create aStackReference
resource with the given unique name.StackReference(java.lang.String name, StackReferenceArgs args)
Create aStackReference
resource with the given unique name, arguments.StackReference(java.lang.String name, StackReferenceArgs args, CustomResourceOptions options)
Create aStackReference
resource with the given unique name, arguments, and options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<?>
getValueAsync(Output<java.lang.String> name)
Fetches the value of the named stack output.java.util.concurrent.CompletableFuture<?>
getValueAsync(java.lang.String name)
Fetches the value of the named stack output.Output<java.lang.String>
name()
The name of the referenced stack.Output<?>
output(Output<java.lang.String> name)
Fetches the value of the named stack output, ornull
if the stack output was not found.Output<?>
output(java.lang.String name)
Fetches the value of the named stack output, ornull
if the stack output was not found.java.util.concurrent.CompletableFuture<StackReferenceOutputDetails>
outputDetailsAsync(java.lang.String name)
Fetches the value of the named stack output and builds aStackReferenceOutputDetails
object from it.Output<java.util.Map<java.lang.String,java.lang.Object>>
outputs()
The outputs of the referenced stack.Output<?>
requireOutput(Output<java.lang.String> name)
Fetches the value of the named stack output, or throws an error if the output was not found.Output<?>
requireOutput(java.lang.String name)
Fetches the value of the named stack output, or throws an error if the output was not found.java.util.concurrent.CompletableFuture<?>
requireValueAsync(Output<java.lang.String> name)
Fetches the value promptly of the named stack output.java.util.concurrent.CompletableFuture<?>
requireValueAsync(java.lang.String name)
Fetches the value promptly of the named stack output.Output<java.util.List<java.lang.String>>
secretOutputNames()
The secret output names of the referenced stack.-
Methods inherited from class com.pulumi.resources.CustomResource
id, idFuture
-
Methods inherited from class com.pulumi.resources.Resource
pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
-
-
-
-
Constructor Detail
-
StackReference
public StackReference(java.lang.String name)
Create aStackReference
resource with the given unique name.The name of the referenced stack will be the name of the StackReference resource.
- Parameters:
name
- The unique name of the stack reference.- See Also:
StackReference(String, StackReferenceArgs, CustomResourceOptions)
-
StackReference
public StackReference(java.lang.String name, @Nullable StackReferenceArgs args)
Create aStackReference
resource with the given unique name, arguments.If args is not specified, the name of the referenced stack will be the name of the StackReference resource.
- Parameters:
name
- The unique name of the stack reference.args
- The arguments to use to populate this resource's properties.- See Also:
StackReference(String, StackReferenceArgs, CustomResourceOptions)
-
StackReference
public StackReference(java.lang.String name, @Nullable StackReferenceArgs args, @Nullable CustomResourceOptions options)
Create aStackReference
resource with the given unique name, arguments, and options.If args is not specified, the name of the referenced stack will be the name of the StackReference resource.
- Parameters:
name
- The unique name of the stack reference.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
name
public Output<java.lang.String> name()
The name of the referenced stack.- Returns:
- the stack name
-
outputs
public Output<java.util.Map<java.lang.String,java.lang.Object>> outputs()
The outputs of the referenced stack.- Returns:
- the stack outputs
-
secretOutputNames
public Output<java.util.List<java.lang.String>> secretOutputNames()
The secret output names of the referenced stack.- Returns:
- the names of the secret outputs
-
output
public Output<?> output(java.lang.String name)
Fetches the value of the named stack output, ornull
if the stack output was not found.- Parameters:
name
- The name of the stack output to fetch.- Returns:
- An
Output
containing the requested value.
-
output
public Output<?> output(Output<java.lang.String> name)
Fetches the value of the named stack output, ornull
if the stack output was not found.- Parameters:
name
- The name of the stack output to fetch.- Returns:
- An
Output
containing the requested value.
-
requireOutput
public Output<?> requireOutput(java.lang.String name)
Fetches the value of the named stack output, or throws an error if the output was not found.- Parameters:
name
- The name of the stack output to fetch.- Returns:
- An
Output
containing the requested value.
-
requireOutput
public Output<?> requireOutput(Output<java.lang.String> name)
Fetches the value of the named stack output, or throws an error if the output was not found.- Parameters:
name
- The name of the stack output to fetch.- Returns:
- An
Output
containing the requested value.
-
outputDetailsAsync
public java.util.concurrent.CompletableFuture<StackReferenceOutputDetails> outputDetailsAsync(java.lang.String name)
Fetches the value of the named stack output and builds aStackReferenceOutputDetails
object from it. The StackReferenceOutputDetails object has its value or secretValue set depending on whether the output is a secret or not.
-
getValueAsync
public java.util.concurrent.CompletableFuture<?> getValueAsync(java.lang.String name)
Fetches the value of the named stack output. May return null if the value is not known for some reason.This operation is not supported (and will throw) for secret outputs.
- Parameters:
name
- The name of the stack output to fetch.- Returns:
- The value of the referenced stack output.
- Throws:
java.lang.UnsupportedOperationException
- if the output is secret
-
getValueAsync
public java.util.concurrent.CompletableFuture<?> getValueAsync(Output<java.lang.String> name)
Fetches the value of the named stack output. May return null if the value is not known for some reason.This operation is not supported (and will throw) for secret outputs.
- Parameters:
name
- The name of the stack output to fetch.- Returns:
- The value of the referenced stack output.
- Throws:
java.lang.UnsupportedOperationException
- if the output is secret
-
requireValueAsync
public java.util.concurrent.CompletableFuture<?> requireValueAsync(java.lang.String name)
Fetches the value promptly of the named stack output. Throws an error if the stack output is not found.This operation is not supported (and will throw) for secret outputs.
- Parameters:
name
- The name of the stack output to fetch.- Returns:
- The value of the referenced stack output.
-
requireValueAsync
public java.util.concurrent.CompletableFuture<?> requireValueAsync(Output<java.lang.String> name)
Fetches the value promptly of the named stack output. Throws an error if the stack output is not found.This operation is not supported (and will throw) for secret outputs.
- Parameters:
name
- The name of the stack output to fetch.- Returns:
- The value of the referenced stack output.
-
-