Class Names
Functions for devising unique names for constructs.
public class Names : DeputyBase
- Inheritance
-
Names
Remarks
For example, those can be used to allocate unique physical names for resources.
Methods
NodeUniqueId(ConstructNode)
Returns a CloudFormation-compatible unique identifier for a construct based on its path.
public static string NodeUniqueId(ConstructNode node)
Parameters
node
ConstructNodeThe construct node.
Returns
- string
a unique id based on the construct path
Remarks
The identifier includes a human readable portion rendered from the path components and a hash suffix.
TODO (v2): replace with API to use constructs.Node
.
UniqueId(Construct)
Returns a CloudFormation-compatible unique identifier for a construct based on its path.
public static string UniqueId(Construct construct)
Parameters
construct
ConstructThe construct.
Returns
- string
a unique id based on the construct path
Remarks
The identifier includes a human readable portion rendered from the path components and a hash suffix.