Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 2.66 KB

add-bindings-existing-function.md

File metadata and controls

39 lines (24 loc) · 2.66 KB
title description ms.topic ms.date ms.custom
Connect functions to other Azure services
Learn how to add bindings that connect to other Azure services to an existing function in your Azure Functions project.
how-to
04/29/2020
vscode-azure-extension-update-not-needed

Connect functions to Azure services using bindings

When you create a function, language-specific trigger code is added in your project from a set of trigger templates. If you want to connect your function to other services by using input or output bindings, you have to add specific binding definitions in your function. To learn more about bindings, see Azure Functions triggers and bindings concepts.

Local development

When you develop functions locally, you need to update the function code to add bindings. Using Visual Studio Code can make it easier to add bindings to a function.

Visual Studio Code

When you use Visual Studio Code to develop your function and your function uses a function.json file, the Azure Functions extension can automatically add a binding to an existing function.json file. To learn more, see Add input and output bindings.

Manually add bindings based on examples

When adding a binding to an existing function, you'll need update both the function code and the function.json configuration file, if used by your language. Both .NET class library and Java functions use attributes instead of function.json, so you'll need to update that instead.

Use the following table to find examples of specific binding types that you can use to guide you in updating an existing function. First, choose the language tab that corresponds to your project.

[!INCLUDE functions-bindings-code-example-chooser]

Azure portal

When you develop your functions in the Azure portal, you add input and output bindings in the Integrate tab for a given function. The new bindings are added to either the function.json file or to the method attributes, depending on your language. The following articles show examples of how to add bindings to an existing function in the portal:

Next steps