Input Binding variable doesn't show up in the code.

Akshar Ganatra 0 Reputation points
2023-07-03T17:53:18.1233333+00:00

Hello,

I was trying to follow this tutorial :
https://learn.microsoft.com/en-us/training/modules/chain-azure-functions-data-using-bindings/5-read-data-with-input-bindings-portal-lab?pivots=javascript

Note: I am using .net instead of js or ps
so the problem is
when i try to configure my input binding from cosmos db to my trigger , the input parameter is not added in the code automatically so i tried few random datatypes and it looks something like this now.

csx file looks like
User's image

function.json looks like
User's image

integration window looks like

User's image

it doesnt give me any error
but the book mark parameter is null when i try to call it using postman
like :
https://azfun0246.azurewebsites.net/api/HttpTrigger3_Cosmo45?code=myKey&id=portal

my cosmos db instance look like

User's image

Please help!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,321 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,725 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,167 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ben Gimblett 4,540 Reputation points Microsoft Employee
    2023-07-05T14:40:46.14+00:00

    Hi - The following document contains some examples of using cosmos input bindings with C# functions

    There's a few different options (depending on how you're hosting) and several examples

    This link shows the "http trigger, lookup id from query string" option and should be easily modified to suit your example

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.