Class StackReference
Manages a reference to a Pulumi stack and provides access to the referenced stack's outputs.
Inherited Members
Namespace: Pulumi
Assembly: Pulumi.dll
Syntax
public class StackReference : CustomResourceConstructors
View SourceStackReference(string, StackReferenceArgs?, CustomResourceOptions?)
Create a StackReference 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.Declaration
public StackReference(string name, StackReferenceArgs? args = null, CustomResourceOptions? options = null)Parameters
| Type | Name | Description | 
|---|---|---|
| string | name | The unique name of the stack reference. | 
| StackReferenceArgs | args | The arguments to use to populate this resource's properties. | 
| CustomResourceOptions | options | A bag of options that control this resource's behavior. | 
Properties
View SourceName
The name of the referenced stack.
Declaration
[Output("name")]
public Output<string> Name { get; }Property Value
| Type | Description | 
|---|---|
| Output<string> | 
Outputs
The outputs of the referenced stack.
Declaration
[Output("outputs")]
public Output<ImmutableDictionary<string, object>> Outputs { get; }Property Value
| Type | Description | 
|---|---|
| Output<ImmutableDictionary<string, object>> | 
SecretOutputNames
The names of any stack outputs which contain secrets.
Declaration
[Output("secretOutputNames")]
public Output<ImmutableArray<string>> SecretOutputNames { get; }Property Value
| Type | Description | 
|---|---|
| Output<ImmutableArray<string>> | 
Methods
View SourceGetOutput(Input<string>)
Fetches the value of the named stack output, or null if the stack output was not found.
Declaration
public Output<object?> GetOutput(Input<string> name)Parameters
| Type | Name | Description | 
|---|---|---|
| Input<string> | name | The name of the stack output to fetch. | 
Returns
| Type | Description | 
|---|---|
| Output<object> | An Output<T> containing the requested value. | 
GetOutputDetailsAsync(string)
Fetches the value of the named stack output
and builds a 
Declaration
public Task<StackReferenceOutputDetails> GetOutputDetailsAsync(string name)Parameters
| Type | Name | Description | 
|---|---|---|
| string | name | The name of the stack output to fetch. | 
Returns
| Type | Description | 
|---|---|
| Task<StackReferenceOutputDetails> | StackReferenceOutputDetails object containing the output. | 
GetValueAsync(Input<string>)
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.Declaration
public Task<object?> GetValueAsync(Input<string> name)Parameters
| Type | Name | Description | 
|---|---|---|
| Input<string> | name | The name of the stack output to fetch. | 
Returns
| Type | Description | 
|---|---|
| Task<object> | The value of the referenced stack output. | 
RequireOutput(Input<string>)
Fetches the value of the named stack output, or throws an error if the output was not found.
Declaration
public Output<object> RequireOutput(Input<string> name)Parameters
| Type | Name | Description | 
|---|---|---|
| Input<string> | name | The name of the stack output to fetch. | 
Returns
| Type | Description | 
|---|---|
| Output<object> | An Output<T> containing the requested value. | 
RequireValueAsync(Input<string>)
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.Declaration
public Task<object> RequireValueAsync(Input<string> name)Parameters
| Type | Name | Description | 
|---|---|---|
| Input<string> | name | The name of the stack output to fetch. | 
Returns
| Type | Description | 
|---|---|
| Task<object> | The value of the referenced stack output. |