I have an issue trying to filter usages for Azure Consumption, as specified in the official documentation, based on:
properties/resourceName eq '{resourceName}
The complete URI is:
$ConsumtionUsagesUri = "https://management.azure.com/subscriptions/$subId/providers/Microsoft.Billing/billingPeriods/$BillingPeriod/providers/Microsoft.Consumption/usageDetails?$expand=meterDetails,additionalProperties&$filter=properties/resourceName eq '{resourceName}'&api-version=2019-10-01"
The query returns all the results regardless of filter. Thanks everyone for your help!
This may be because your syntax is not correct. If you would like to filter by resource name, you have to follow this syntax. Please note that the case sensitivity may return different result.
For other syntax, please check the Azure Consumption API repo. I believe this will work with Azure Consumption API.