Called once when the synthesizer is associated with a stack.
Use this to store a reference to the stack for use during synthesize().
OptionalcollectOptional. Returns the artifact IDs of stacks this stack depends on.
Called by App.synth() before writing any files so that cross-stack
cycles can be detected and reported without producing partial output.
ProtectedserializeCalled during app.synth() to produce the stack's output artifact.
Protectedwrite
Synthesizer that writes one YAML file per root resource into
outputDir.A resource is a root if none of its properties contain a
{ ref, attr }token pointing to another resource in the same stack. Resources whose{ ref, attr }token matches a sibling resource are children — they are nested under their parent's YAML output under a key derived from the last segment of their type name, pluralised with a plain+s(e.g.Multipass::VM::Network→networks).Fields whose value is a
{ ref, attr }token are excluded from the YAML output entirely (they are the composition signal, not user data).If a resource declares an
outputFileNamestring property, that value is used as the output filename and excluded from the YAML content. Otherwise the filename defaults to${props.name}.yamlwhen anameproperty exists, or${logicalId}.yaml.Registers artifacts with type
cdkx:local-filesin the cloud assembly.