Azure Batch .NET SDK Tag Batch Resources

Category: azure batch

Question

BKoth on Fri, 16 Aug 2019 18:53:13


Is it possible to add tags to the resources created through an Azure Batch pool? I don't see anything in the batch sdk, I thought perhaps the Azure Resource Management sdk might have a way but I'm struggling to see how.

Replies

Micah McKittrick on Fri, 16 Aug 2019 19:47:19


Are you referring to tagging as resources are being created or after they are created you going back and updating the tags? 

BKoth on Fri, 16 Aug 2019 20:13:33


Either. 

Micah McKittrick on Fri, 16 Aug 2019 20:33:07


Azure Batch does support tags

https://docs.microsoft.com/en-us/azure/azure-resource-manager/tag-support#microsoftbatch

As per applying tags, you can apply them using the portal, PowerShell, CLI, Template and Rest API. 

We have examples of using each of these here: 

https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-using-tags

Let me know if that helps else I can keep digging and find some more examples. 

BKoth on Fri, 16 Aug 2019 20:44:43


What about through the .NET SDK?

Micah McKittrick on Fri, 16 Aug 2019 20:51:04


I am not aware of any way to achieve this using the .Net SDK. Only the above listed options in my previous comment.