@Cairn Apologies if my previous response wasn't clear. Yes, by template, I was referring to the Azure Resource Manager Template containing the resource schema and properties. :)
For example, to export the ARM template for an Ubuntu 18.04-LTS Server, the following options are available:
- If the resource is not already deployed to your Subscription:
- Find the Service on the Azure Marketplace and select it.
- Fill in the values for the new service.
- After passing validation, but before starting the deployment, select Download a template for automation.

- The template is displayed and is available for download and deploy.

- If the resource is deployed to your Subscription, you can:
Hope this helps. Do let us know if this does not satisfy your requirement, or if you are looking for something different.