Set up Azure Functions for custom providers
A custom provider is a contract between Azure and an endpoint. With custom providers, you can change workflows in Azure. This tutorial shows how to set up a function app in Azure Functions to work as a custom provider endpoint.
Create the function app
Note
In this tutorial, you create a simple service endpoint that uses a function app in Azure Functions. However, a custom provider can use any publicly accessible endpoint. Alternatives include Azure Logic Apps, Azure API Management, and the Web Apps feature of Azure App Service.
To start this tutorial, you should first follow the tutorial Create your first function app in the Azure portal. That tutorial creates a .NET core webhook function that can be modified in the Azure portal. It's also the foundation for the current tutorial.
Install Azure Table storage bindings
To install the Azure Table storage bindings:
- Go to the Integrate tab for the HttpTrigger.
- Select + New Input.
- Select Azure Table Storage.
- Install the Microsoft.Azure.WebJobs.Extensions.Storage extension if it isn't already installed.
- In the Table parameter name box, enter tableStorage.
- In the Table name box, enter myCustomResources.
- Select Save to save the updated input parameter.

Update RESTful HTTP methods
To set up the Azure function to include the custom provider RESTful request methods:
- Go to the Integrate tab for the HttpTrigger.
- Under Selected HTTP methods, select GET, POST, DELETE, and PUT.

Add Azure Resource Manager NuGet packages
Note
If your C# project file is missing from the project directory, you can add it manually, or it will appear after the Microsoft.Azure.WebJobs.Extensions.Storage extension is installed on the function app.
Next, update the C# project file to include helpful NuGet libraries. These libraries make it easier to parse incoming requests from custom providers. Follow the steps to add extensions from the portal and update the C# project file to include the following package references:
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.4" />
<PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.22.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.*" />
The following XML element is an example C# project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<WarningsAsErrors />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.4" />
<PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.22.2" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.*" />
</ItemGroup>
</Project>
Next steps
In this tutorial, you set up a function app in Azure Functions to work as an Azure Custom Provider endpoint.
To learn how to author a RESTful custom provider endpoint, see Tutorial: Authoring a RESTful custom provider endpoint.
Maklum balas
Kirim dan lihat maklum balas untuk