DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   

How to disable or enable Azure functions in Function App

By Ashok Nalam on 28 Sep 2020 | Category: Microsoft Azure | Tagged: azure azure portal azure functions azure app settings 
  Discuss Add Comment   |  
Add rating Rate this resource   

Introduction 

Azure Function App can contain multiple Functions. If you want to stop a specific function instead of a complete function app, you can easily do it using the Enable and Disable button on your Function.

How to disable the Function

Open your Function App > Functions > Select your Function> Overview tab > Click on Disable > In couple of seconds, your function app is in disabled mode and can not trigger.

Fig 1 - Function - Disable

To enable back, click on Enable button.

Fig 2 : Function - Enable

AzureWebJobs.Function1.Disabled application setting

With Disable button click action, it adds “AzureWebJobs.Function1.Disabled” setting to your Function App Application Settings where Function1 is your Function name. 

Fig 3 : Function App Application Settings

Recommended Approach

Add multiple Application settings AzureWebJobs.<<your_function_name>>.Disabled=1 directly to disable multiple functions in your Function App. This is the easiest option and you can use below Azure CLI command as well to update the settings.

az functionapp config appsettings set --name <myFunctionApp> --resource-group <myResourceGroup> --settings AzureWebJobs.<<Function Name>>.Disabled=true

Note: If you send false, it will enable the Function.

Note: Portal Test Run from Code+Test ignores the setting and also your local development. 

References


  Discuss Add Comment    
Add rating Rate this resource   
About the Contributor
Member Since : 10 Dec 2012
Member Points (Level) : 9526  (Professional)
Location : INDIA
Home Page : http://dotnetmirror.com
About : I am admin of this site.
Rate this resource
 
Add your Comment
Name Email WebSite
Captcha Refresh


Comments (0)
No comments found, click here to add comment.
 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys