无法通过 ARM 获取经典 VM 的指标数据 api

unable to get metric data of classic VM through ARM api

我正在尝试通过 ARM API 获取经典 VM 的指标数据,但出现错误 "Resource provider not found: [Microsoft.ClassicCompute]"。我正在向 https://management.azure.com/subscriptions/cc******-9605-4***********c0f/resourceGroups/dummy-test-vm/providers/Microsoft.ClassicCompute/virtualMachines/dummy-test-vm/providers/microsoft.insights/metrics 发送 GET 请求? api-version=2016-06-01&$filter = (name.value eq 'Network Out') and aggregationType eq 'Total' and startTime eq 2017-06-18 and endTime eq 2017- 07-17 和 timeGrain eq duration 'P10D'。我不知道我哪里错了?

Microsoft.ClassicCompute/virtualMachines 不是指标 API 支持的资源类型。支持的类型和指标在此处:Supported metrics with Azure Monitor。您可以查看此 link,目前不支持经典 VM。

经典 VM 指标存储在经典存储帐户中,您可以使用存储 API 获取指标,请参阅此