如何在AzureRM中扩展List资源API的输出

时间:2018-02-12 06:39:32

标签: azure azure-resource-manager

根据此answer我尝试使用此API列出资源

https://management.azure.com/subscriptions/{subscriptionId}/resources?$filter=resourceType eq 'Microsoft.Compute/virtualmachines'&$top=10&api-version={apiVersion}

它给我输出像他的

{
"value": [
    {
        "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vm}",
        "name": "{vm}",
        "type": "Microsoft.Compute/virtualMachines",
        "location": "{location}"
    },
    {
        "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vm}",
        "name": "{vm}",
        "type": "Microsoft.Compute/virtualMachines",
        "location": "{location}"
    }
]} 

我需要在此调用中扩展每个{value}的输出,如何添加过滤器以扩展值?

有人会对此产生一些火花吗?

0 个答案:

没有答案