Package com.pulumi.resources
Class StackReference
java.lang.Object
com.pulumi.resources.Resource
com.pulumi.resources.CustomResource
com.pulumi.resources.StackReference
Manages a reference to a Pulumi stack and provides access to the referenced stack's outputs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfigMissingException is used when a configuration value is completely missing.Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource
CustomResource.CustomResourceInternalNested 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
ConstructorsConstructorDescriptionStackReference(String name) Create aStackReferenceresource with the given unique name.StackReference(String name, StackReferenceArgs args) Create aStackReferenceresource with the given unique name, arguments.StackReference(String name, StackReferenceArgs args, CustomResourceOptions options) Create aStackReferenceresource with the given unique name, arguments, and options. -
Method Summary
Modifier and TypeMethodDescriptiongetValueAsync(Output<String> name) Fetches the value of the named stack output.getValueAsync(String name) Fetches the value of the named stack output.name()The name of the referenced stack.Output<?>Fetches the value of the named stack output, ornullif the stack output was not found.Output<?>Fetches the value of the named stack output, ornullif the stack output was not found.outputDetailsAsync(String name) Fetches the value of the named stack output and builds aStackReferenceOutputDetailsobject from it.outputs()The outputs of the referenced stack.Output<?>requireOutput(Output<String> name) Fetches the value of the named stack output, or throws an error if the output was not found.Output<?>requireOutput(String name) Fetches the value of the named stack output, or throws an error if the output was not found.requireValueAsync(Output<String> name) Fetches the value promptly of the named stack output.requireValueAsync(String name) Fetches the value promptly of the named stack output.The secret output names of the referenced stack.Methods inherited from class com.pulumi.resources.CustomResource
id, idFutureMethods inherited from class com.pulumi.resources.Resource
pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
-
Constructor Details
-
StackReference
Create aStackReferenceresource 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
Create aStackReferenceresource 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
public StackReference(String name, @Nullable StackReferenceArgs args, @Nullable CustomResourceOptions options) Create aStackReferenceresource 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 Details
-
name
The name of the referenced stack.- Returns:
- the stack name
-
outputs
The outputs of the referenced stack.- Returns:
- the stack outputs
-
secretOutputNames
The secret output names of the referenced stack.- Returns:
- the names of the secret outputs
-
output
Fetches the value of the named stack output, ornullif the stack output was not found.- Parameters:
name- The name of the stack output to fetch.- Returns:
- An
Outputcontaining the requested value.
-
output
Fetches the value of the named stack output, ornullif the stack output was not found.- Parameters:
name- The name of the stack output to fetch.- Returns:
- An
Outputcontaining the requested value.
-
requireOutput
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
Outputcontaining the requested value.
-
requireOutput
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
Outputcontaining the requested value.
-
outputDetailsAsync
Fetches the value of the named stack output and builds aStackReferenceOutputDetailsobject from it. The StackReferenceOutputDetails object has its value or secretValue set depending on whether the output is a secret or not. -
getValueAsync
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:
UnsupportedOperationException- if the output is secret
-
getValueAsync
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:
UnsupportedOperationException- if the output is secret
-
requireValueAsync
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
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.
-