UNPKG

1.13 kBTypeScriptView Raw
1import { Construct } from 'constructs';
2import { ConstructNode } from './construct-compat';
3/**
4 * Functions for devising unique names for constructs. For example, those can be
5 * used to allocate unique physical names for resources.
6 */
7export declare class Names {
8 /**
9 * Returns a CloudFormation-compatible unique identifier for a construct based
10 * on its path. The identifier includes a human readable portion rendered
11 * from the path components and a hash suffix.
12 *
13 * @param construct The construct
14 * @returns a unique id based on the construct path
15 */
16 static uniqueId(construct: Construct): string;
17 /**
18 * Returns a CloudFormation-compatible unique identifier for a construct based
19 * on its path. The identifier includes a human readable portion rendered
20 * from the path components and a hash suffix.
21 *
22 * TODO (v2): replace with API to use `constructs.Node`.
23 *
24 * @param node The construct node
25 * @returns a unique id based on the construct path
26 */
27 static nodeUniqueId(node: ConstructNode): string;
28 private constructor();
29}