0
votes

In the Azure API portal there is the Automation script tab, but that generates the ARM template for the entire resource group. It also includes a lot of other stuff that needed.

Is there a (simple) way to get hold of the ARM template for a specific API rather than the entire resource group? Can it be done through Azure cli? the REST API?

2

2 Answers

2
votes

Yes, use the Azure Resource Explorer to locate your resource, the Uri at the top of the page will provide you a link to the template (requires authentication if you want to call it from outside of Resource Explorer).

Azure Resource Explorer

I also always refer back to the reference documentation on ARM templates, it is a very good place to start from. Whilst it doesn't give you your exact template, it does give you a very clear base to start from (example below). I find this far more productive that trying to read the templates in the Automation Script" section of the portal.

Good luck.

Azure documentation for a CosmosDB resource

1
votes

No, you cannot do that. there is only 1 resource provider action to export and it exports the whole resource group. just remove all the extra parts.