import { Input, Output } from "./output"; import { CustomResource, CustomResourceOptions } from "./resource"; /** * Manages a reference to a Pulumi stack. The referenced stack's outputs are available via the * `outputs` property or the `output` method. */ export declare class StackReference extends CustomResource { /** * The name of the referenced stack. */ readonly name: Output; /** * The outputs of the referenced stack. */ readonly outputs: Output<{ [name: string]: any; }>; /** * The names of any stack outputs which contain secrets. */ readonly secretOutputNames: Output; /** * 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. * * @param name The _unique_ name of the stack reference. * @param args The arguments to use to populate this resource's properties. * @Param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: StackReferenceArgs, opts?: CustomResourceOptions); /** * Fetches the value of the named stack output, or undefined if the stack output was not found. * * @param name The name of the stack output to fetch. */ getOutput(name: Input): Output; /** * Fetches the value of the named stack output, or throws an error if the output was not found. * * @param name The name of the stack output to fetch. */ requireOutput(name: Input): Output; /** * Fetches the value promptly of the named stack output. May return undefined if the value is * not known for some reason. * * This operation is not supported (and will throw) if the named stack output is a secret. * * @param name The name of the stack output to fetch. */ getOutputValue(name: string): Promise; /** * 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) if the named stack output is a secret. * * @param name The name of the stack output to fetch. */ requireOutputValue(name: string): Promise; private readOutputValue; } /** * The set of arguments for constructing a StackReference resource. */ export interface StackReferenceArgs { /** * The name of the stack to reference. */ readonly name?: Input; }