【发布时间】:2018-04-02 13:35:44
【问题描述】:
我有几个 Microsoft.ApiManagement/service 类型的资源。
当我将下面的 find cmdlet 与该资源类型一起使用时,它不会返回资源的状态/状态。我可以在门户上看到状态,但我正在按资源类型检索资源状态,以获取可以钻取的摘要仪表板的数据。 -ResourceType“microsoft.web/sites” 按预期工作并显示资源的状态。
我不确定是否需要为 -ResourceType "Microsoft.ApiManagement/service" 做其他事情以使其显示状态。 -ResourceType "Microsoft.Storage/storageAccounts" 也不显示状态,尽管在门户中显示 Primary:Available, Secondary:Available。 似乎每种资源类型都有其定义的属性集,并且必须找到文档才能遍历该资源类型以找到所需的内容。 我不知道在哪里可以找到这些信息。
谢谢!
Find-AzureRmResource -ResourceType "microsoft.web/sites" -ExpandProperties |Sort SiteName
Find-AzureRmResource -ResourceType "Microsoft.ApiManagement/service" -ExpandProperties |Sort Name
Find-AzureRmResource -ResourceType "Microsoft.Storage/storageAccounts" -ExpandProperties |Sort Name
【问题讨论】:
标签: powershell azure