Search Suggest

Deploy one function in an Azure function app


Deploy one function in an Azure function app


Issue:

·       Is it possible to deploy just one function in an Azure function app?

·       Can I deploy single function when there are multiple functions?

·       Azure functions deploy single function?


Solution:

There are various ways to deploy your function app e.g.
·       Visual Studio,
·       Visual Source Code,
·       Dev Ops
·       MSDEPLOY
·       Zip Deploy
·       ARM Template
·       GIT

but all these allow us to deploy whole function app as a single unit but not the single or one function while there are multiple functions available in your function app.

Ideally you should be deploying the entire function app as a single unit which is the best practice but sometime if you want to deploy a single function (which is not recommended) then you can use the REST API which support deploying individual functions in a limited way.

You need to send a PUT request to update your function. Please note, in this case your function app should have been created already.

PUT

/subscriptions/{subscription ID}/resourceGroups/{resource group name}/providers/Microsoft.Web/sites/{function app name}/functions/MyFunction?api-version=2015-08-01


Again, the use of this API is highly not recommended. You should instead deploy your entire Function App as a single unit

References,





Post a Comment