az ts export
Export the specified template spec version and artifacts (if any) to the specified output folder. Azure CLI reference
2 options Its page in the Azure CLI reference
Options
--output-folderExisting folder to output export(s).--template-spec, -sThe template spec resource id.