I have a logic app query to get the details of long running pipelines and I sending the email with the pipeline names. Now I want to cancel those pipelines which are running for long time how Can I implement with Logic app ?
I have a logic app query to get the details of long running pipelines and I sending the email with the pipeline names. Now I want to cancel those pipelines which are running for long time how Can I implement with Logic app ?
2
Answers
There is an action available directly in logic apps "Azure data factory" connector. The following is an example where you can cancel a pipeline run.
The following is the flow of the logic app that I am using:
If the intend is to cancel a long running ADF pipeline , you can do that from ADF only ( using a different pipeline)
using web activity. Get the running pipeline ( Saideep has mentioned this in his response )
Use the durationInMs property to get "for how long is this running "
Use the runid to cancel the run : https://learn.microsoft.com/en-us/rest/api/datafactory/pipeline-runs/cancel?tabs=HTTP