I've been trying to bind a cosmosdb input with an azure function with no luck, i'm developing the function locally using .net , when i deploy it it shows the following schema in the integration blade
here is my .net function
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
//
namespace cosmosDBFunc
{
public static class cosmosDBFunc
{
[FunctionName("cosmosDBFunc")]
public static IActionResult Run(
[HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req,
[CosmosDB("MY DB NAME", "MY CONTAINER NAME", Connection = "MY CONNECTION STR ENV VARIABLE NAME")] dynamic myContent, ILogger log)
{
var json = JsonConvert.SerializeObject(myContent);
return new OkObjectResult(json);
}
}
}
Hi,
I've been trying to bind a cosmosdb input with an azure function with no luck, i'm developing the function locally using .net , when i deploy it it shows the following schema in the integration blade
here is my .net function
My function.json