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