Your options are somewhat limited and will entail modifying some files that will enable or disable your functions.
Fortunately, you can easily to this programmatically using the Kudu VFS API.
There are two files you can work with to disable or enable a function, offering you different approaches to support different patterns:
host.json
The host.json
file, located on the root of your function script files, exposes a functions
property, which is a string array that, when set, defines a functions white list. When this property is set, only the functions contained in this array will be enabled and loaded by the runtime.
You can find more information about that setting here.
function.json
Each function has a function.json
file that contains function metadata. This metadata supports a disabled
property that, when set to true, disables that function.
This gives you the ability to manage each function individually, which defaulting to loading all functions in the app, but you do end up having to manage more files.
You can find more information about this setting here.