QuestionQ90

Integrate an Azure Cosmos DB solution

You have an Azure Cosmos DB for NoSQL database that contains a container named Container1.

You are developing a new app named App1 that will use Container1.

You need to ensure that, when App1 tries to delete a document in Container1, the action is blocked and an error is returned to the app.

What should you use?

  • A a post-trigger
  • B a stored procedure
  • C a user-defined function (UDF)
  • D a pre-trigger
Explanation

An Azure Cosmos DB pre-trigger executes before a document operation. A pre-trigger configured for the Delete operation can throw an error, aborting the delete operation and returning that error to the calling application.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!