使用 ARM 模板将 Azure 成本分析数据导出到 CSV

Export Azure Cost Analysis Data into CSV using ARM Template

是否可以使用ARM Template下载Azure中所有资源的成本分析数据(Cost Usage Report)。是否可以使用 ARM 模板将其下载到 CSV 文件。请分享示例模板 enter image description here

根据我的研究,我们不能使用arm模板导出数据。 Azure arm 模板不提供资源类型Microsoft.CostManagement\Export。详情请参考here

所以如果你想导出数据,我建议你使用 Azure REST API 来做。详情请参考here and here

PUT https://management.azure.com/{scope}/providers/Microsoft.CostManagement/exports/{exportName}?api-version=2020-06-01