0

In C# I am using the Azure fluent API Microsoft.Azure.Management.Fluent to manage resources. I want to be able to delete an Elastic Pool if it is empty (e.g. I have just ran a process that deletes a DB within it).

azure.SqlServers.ElasticPools.DeleteBySqlServerAsync(...

However I have a separate process which depending on user actions might create a database within the pool. So I don't think it is safe for me to get the count of the databases within the pool then delete it if there are zero due to the race condition that might happen between.

Is there anyway, using the Azure fluent api I can safety delete elastics pools only if there is no databases?

Michael Hancock
  • 2,673
  • 1
  • 18
  • 37

0 Answers0