Comment on page
This page describes StackState version 4.1.
The StackState 4.1 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.1 version range to upgrade to a more recent release.
StackState's templated json incorporates several functions helpful to resolve nodes either by name or identifier that need to be addressed while creating other nodes, for example on a
ComponentTemplateyou want to attach to your about to be created
getfunction finds a node of a certain type by its unique identifier without needing to specify the type of the node.
get <identifier> Type=<type>;Name=<name>
Example: resolve the
getfunction finds a node in a nested way by first finding the identifier and then finding the type and name in the scope of the first resolved node. For example it is possible to resolve the
metricsfrom the CheckFunction identified by
get "urn:stackpack:aws:check_function:basic" "Type=Parameter;Name=metrics"
getOrCreatefunction tries to resolve a node by first its identifier and then by the fallback create-identifier. If it can't find any it'll create it using the type and name argument and it'll identify the newly created node with the create-identifier value.
getOrCreate <identifier> <create-identifier> Type=<type>;Name=<name>
Example: find the
Environmentby its identifier and by its fallback identifier or otherwise create it
getOrCreate "urn:stackpack:aws:environment:production" "urn:system:auto:stackpack:aws:environment:production" "Type=Environment;Name=Production"
getOrCreateworks only with the following (simple) types: Environment, Layer, Domain, ComponentType and RelationType. Note that
create-identifiermust be a value in the "urn:system:auto" namespace.
We strongly encourage to use
getOrCreateas resolving nodes by identifier is safer than by name due to the unique constraint enforced in the
identifierfunction creates an identifier out of an identifier prefix, a component type and a component name.
identifier "urn:stackpack:common" "ComponentType" element.type.name
concatfunction concatenates two values:
concat "Type=ComponentType;Name=" element.type.name