Azure functions: how to bind query string parameters of http trigger function to SQL query of Cosmos DB

I don't think you can configure a Cosmos DB binding to values defined in query parameters e.g. ?age=30. At least I haven't seen any examples like that in the functions documentation.

But you can bind them to the route parameters to achieve the same outcome, which you have pretty much done already.

Keeping that route of users/{age}/{gender}, your Cosmos SqlQuery will then pick up those route parameters when invoking a GET on http://yourfunctionhost/yourfunction/users/30/male