简体   繁体   中英

Adding Tags To Azure Batch Resources

Is it possible to tag the resources used from azure batch? I use the .NET SDK to create a batch pool, job and tasks. I'm wondering if I can tag the pool VM's that get created by the azure batch client. I looked through the properties and documentation and wasn't seeing anything obvious.

Seems there is no way to tag the batch pool from .Net sdk but you can utilize Metadata Property for adding the information in key/value pair of CloudPool which will help you identifying the resources.

Gets or sets a list of name-value pairs associated with the pool as metadata.

 CloudPool.Metadata
    public System.Collections.Generic.IList<Microsoft.Azure.Batch.MetadataItem> Metadata { get; set; }

You can find more details here .

Also i would suggest you to create a resource group with tag and link all the resources in the same resource group.

Hope it helps.

池是ARM资源(您只能将标记添加到ARM资源),因此您应该能够使用ARM SDK( https://docs.microsoft.com/zh-cn/dotnet/api / overview / azure / resource-manager?view = azure-dotnet

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM