Search code examples
azureazure-logic-apps

Deactivate a function in Azure Logic App Workflow using the designer


I am stuck with a problem that initially seems quite trivial. The thing is, I need to deactivate a Function in an Azure Resource Group, but I can only do it using the Designer, and I don't have access to the Active Directory. Apparently, it's something straightforward, but I can't find which Action I can use to Disable or Enable the Function. Here's a screenshot of the Designer that currently works perfectly.

enter image description here

Does anyone know which Action I should use to Disable or Enable another function in this scenario?

Thanks to all in advance!


Solution

  • Using HTTP connector by calling the below Azure Management REST API's you can meet your requirement.

    1. STOP webapp REST API --> To start/stop the function app.
    2. WebApp- Update Application Settings--> To enable or disable a particular function inside a function app.

    For example, If you have Queue trigger function in your function app and you want to disable then you need to update the application setting AzureWebJobs.QueueTrigger.Disabled

    Similarly, each function you will have a specific application setting related to it based on the trigger.

    For more information, refer to this article on how to call Azure Management REST API through logic app.

    Updated Answer:

    To test this, we have enabled managed identity to logic App, assigned contributor role to that managed identity and we are able to stop the function app.

    enter image description here

    enter image description here