extractAslFromTemplate
function extractAslFromTemplate(params): ExtractAslResult;Defined in: src/cfn/extract.ts:37
Recovers a renderable ASL definition from a CloudFormation/SAM/CDK template.
Locates the AWS::StepFunctions::StateMachine resource (disambiguated with
resourceId when the template has more than one), flattens the intrinsics in
its DefinitionString/Definition, applies DefinitionSubstitutions, and
parses the result as ASL.
Parameters
Section titled “Parameters”params
Section titled “params”Template source, optional format, optional resource id.
Returns
Section titled “Returns”The extracted ASL definition, the logical id used, and any warnings.
Throws
Section titled “Throws”If no state machine is found, the choice is ambiguous, or the
definition is external (DefinitionUri).
Example
Section titled “Example”const { aslDefinition } = extractAslFromTemplate({ template: cdkSynthJson });