wz366
wz366

Reputation: 2940

How to set Azure Functions to be disabled initially when deploy using Visual Studio

How to set Azure Functions to be disabled initially when deploy using Visual Studio? I want to turn it on manually not automatically by the deployment.

Upvotes: 3

Views: 1443

Answers (2)

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35154

You could add [Disable("settingname")] attribute to your function and then set the app setting settingname to true before the deployment.

Set it to false when you need to run the functions.

Upvotes: 2

Nikhil Vartak
Nikhil Vartak

Reputation: 5137

I believe this is not possible. Once you deploy function app using Visual Studio, Azure portal puts such app into read only mode and restricts editing function.json which is otherwise used for enabling/ disabling individual function.

Upvotes: 0

Related Questions