This is using the DataFactoryManagementClient.LinkedServices "CreateOrUpdateAsync" method (docs here.
I have a list of LinkedServiceResources which I get using ListByFactoryAsync / ListByFactoryNext. Since Azure has no API to tell me which linked service depends on which, I have a solution to repeat deletion multiple times on the list until every resource is deleted. I.e, the first loop will delete LS with no dependencies. Second loop will depend LS that had dependencies on the first, etc. To keep it simple I'm using a queue.
However, I'll need to know if when I try to delete a linked service that has others depending on it, will it throw a Cloud Exception? If so, then I know to push it back onto the queue to re-try its deletion.
On a related note, will it also throw a Cloud Exception if I try to create a linked service resource with dependencies, but said dependencies don't exist yet?
Thank you.
I tried referencing the docs here, but couldn't find details on exceptions: docs
I also tried looking at the definition for DeleteAsync but could not find the specific place where an exception might be thrown.