![](/img/trans.png)
[英]How to get List of resources by resource type and resource group by using Azure Resource management apis
[英]How to get Azure Resource Group Tag value programmatically
我正在嘗試以編程方式獲取資源組的標簽。
我可以使用StorageManagementClient類獲取資源組類型。
StorageManagementClient storageClient =
CloudContext.Clients.CreateStorageManagementClient(creds);
var responses = storageClient.StorageAccounts.List();
foreach (var storageService in responses)
{
foreach(var value in storageService.ExtendedProperties.Values)
{
if (value.Equals("Group"))
{
//TODO I want to get key and value of tag
}
}
}
如何獲取組的標簽的鍵和值?
查看 Azure 資源管理器站點 - https://resources.azure.com
這將向您展示使用 HTTP/s 請求的 Powershell 和 C# 代碼。
有時,客戶端庫不像直接調用 API 那樣最新。
對於直接的任務,這種方式是輕量級的並且相對簡單。
希望能幫助到你,
米克。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.