UNPKG

3.71 kBTypeScriptView Raw
1import { Construct } from 'constructs';
2import { CfnElement } from './cfn-element';
3export interface CfnOutputProps {
4 /**
5 * A String type that describes the output value.
6 * The description can be a maximum of 4 K in length.
7 *
8 * @default - No description.
9 */
10 readonly description?: string;
11 /**
12 * The value of the property returned by the aws cloudformation describe-stacks command.
13 * The value of an output can include literals, parameter references, pseudo-parameters,
14 * a mapping value, or intrinsic functions.
15 */
16 readonly value: string;
17 /**
18 * The name used to export the value of this output across stacks.
19 *
20 * To import the value from another stack, use `Fn.importValue(exportName)`.
21 *
22 * @default - the output is not exported
23 */
24 readonly exportName?: string;
25 /**
26 * A condition to associate with this output value. If the condition evaluates
27 * to `false`, this output value will not be included in the stack.
28 *
29 * @default - No condition is associated with the output.
30 */
31 readonly condition?: CfnCondition;
32}
33export declare class CfnOutput extends CfnElement {
34 private _description?;
35 private _condition?;
36 private _value?;
37 private _exportName?;
38 /**
39 * Creates an CfnOutput value for this stack.
40 * @param scope The parent construct.
41 * @param props CfnOutput properties.
42 */
43 constructor(scope: Construct, id: string, props: CfnOutputProps);
44 /**
45 * A String type that describes the output value.
46 * The description can be a maximum of 4 K in length.
47 *
48 * @default - No description.
49 */
50 get description(): string | undefined;
51 set description(description: string | undefined);
52 /**
53 * The value of the property returned by the aws cloudformation describe-stacks command.
54 * The value of an output can include literals, parameter references, pseudo-parameters,
55 * a mapping value, or intrinsic functions.
56 */
57 get value(): any;
58 set value(value: any);
59 /**
60 * A condition to associate with this output value. If the condition evaluates
61 * to `false`, this output value will not be included in the stack.
62 *
63 * @default - No condition is associated with the output.
64 */
65 get condition(): CfnCondition | undefined;
66 set condition(condition: CfnCondition | undefined);
67 /**
68 * The name used to export the value of this output across stacks.
69 *
70 * To use the value in another stack, pass the value of
71 * `output.importValue` to it.
72 *
73 * @default - the output is not exported
74 */
75 get exportName(): string | undefined;
76 set exportName(exportName: string | undefined);
77 /**
78 * Return the `Fn.importValue` expression to import this value into another stack
79 *
80 * The returned value should not be used in the same stack, but in a
81 * different one. It must be deployed to the same environment, as
82 * CloudFormation exports can only be imported in the same Region and
83 * account.
84 *
85 * The is no automatic registration of dependencies between stacks when using
86 * this mechanism, so you should make sure to deploy them in the right order
87 * yourself.
88 *
89 * You can use this mechanism to share values across Stacks in different
90 * Stages. If you intend to share the value to another Stack inside the same
91 * Stage, the automatic cross-stack referencing mechanism is more convenient.
92 */
93 get importValue(): string;
94 /**
95 * @internal
96 */
97 _toCloudFormation(): object;
98 protected validate(): string[];
99}
100import { CfnCondition } from './cfn-condition';