How to specify output bindings of Azure Function from Visual studio 2017 preview 2?

Viewed 5641

In Azure portal, one can easily configure the output bindings of an Azure function, from the 'Integrate' page of that function. These settings Eventually go into the function.json.

Specifying output bindings from Azure portal

My question is, how can I set these values from Visual studio ? The code looks like this:

public static class SomeEventProcessor
{
    [FunctionName("SomeEventProcessor")]

    public static async Task<HttpResponseMessage> Run(
        [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)]HttpRequestMessage req,
        TraceWriter log,
        IAsyncCollector<EventInfo> outputQueue)
    {
        log.Info("C# HTTP trigger function processed a request.");

        EventInfo eventInfo = new EventInfo(); //Just a container
        eventInfo.SomeID = req.Headers.Contains("SomeID") ? req.Headers.GetValues("SomeID").First() : null;

        //Write to a queue and promptly return
        await outputQueue.AddAsync(eventInfo);

        return req.CreateResponse(HttpStatusCode.OK);

    }
}

I want to specify which queue and which storage to use, from VS, so that I can source control my code and config. I have checked out similar questions, suggested questions etc, but none proved handy.

I am using Visual studio 2017 preview, Version 15.3.0 Preview 3

VS Extension: Azure Function tools for VS, version 0.2

1 Answers
Related