Search code examples
c#azureazure-resource-managerazure-fluent-apimicrosoft-documentation

How to use filter Odata Expression in Docs.microsoft Focus Mode


I'm trying to get the list of all resources based on its type using Azure API.

I can able to achieve this using Azure Fluent SDK

var resource = resouceManagementClient.Resources.ListAsync(new ODataQuery<GenericResourceFilterInner>(x => x.ResourceType == "microsoft.insights/alertrules")).Result;

However, I couldn't able to get this work with the Focus mode in the Microsoft doc site.

My Actal request is going like below

GET /subscriptions//resources?$filter=resourceType%20eq%20'microsoft.insights%2Falertrules'&api-version=2017-05-10

I tried the same within the focused editor

enter image description here

But still, this results in all resources, not only the type microsoft.insights/alertrules

What I'm missing here ?


Solution

  • Refer to my test screenshot, it works fine,resourceType eq 'Microsoft.Insights/alertRules'.

    enter image description here

    Note: After passing the parameter, click the "+" symbol.

    enter image description here