Azure API Management

For much of the work we do, we end up with APIs in the cloud. In the .NET world, this often means hosting a WebAPI in the cloud. With WebAPIs, we usually have endpoints that are accessible to anyone who can connect to the API.

These APIs can have other requirements such as authentication, scalability, throttling, etc. Instead of building all those features into our applications, we can just use Azure’s API Management and have a lot of that hard work already done for us.

In this blog post, we will quickly set up an API Management layer on top of an Azure Function API. We have other posts that cover Azure Functions, so here we will assume we already have an Azure Function solution created.

We will start by publishing that solution from within Visual Studio by right-clicking on the Azure Function project and then clicking “Publish”.

Publishing a Function

After the Azure Function solution is published and running in Azure, we can find it within the Azure Portal.

Functions in Azure portal

Next, go to “All Resources” in the Azure Portal and add an API Management resource.

API Management

API Management service

After creating the API Management resource, you need to add your Azure Function API to this Resource. To do this, navigate to your API Management Resource and then click “APIs”.

Adding an Azure Function API to a resource

Click “+ Add API” and then import your Function application.

API Management is linked to a Function application

Now API Management is linked to your Function application, and your API is running in the cloud. Really, that’s all it takes.

If you have any questions or comments, hit me up on Twitter or sound off in the comments below.

author avatar
Chad Michel Senior Software Architect
Chad is a lifelong Nebraskan. He grew up in rural Nebraska and now lives in Lincoln. Chad and his wife have a son and daughter.

Related posts