Hello @Joe Zeng
Welcome to the Microsoft Q&A and thank you for posting your questions here.
In addition to solution above by @Pinaki Ghatak if you would like to have scalability and security solution, these are improvement solution and best practices:
- To maintain state and handle retries more robustly if there are failures when triggering the ADF pipeline and if the rename events are frequent, consider using Azure Durable Functions to handle the webhook logic - https://learn.microsoft.com/azure/azure-functions/durable/durable-functions-overview
- To minimize the overhead of processing unrelated events, ensure that your Event Grid subscription is set up with appropriate filters to capture only the relevant events (
BlobRenamed
). - https://learn.microsoft.com/azure/event-grid/event-schema-blob-storage - Secure your webhook endpoint using authentication methods like Azure Active Directory (AAD) or API Management, ensuring that only authorized services can trigger the webhook - https://learn.microsoft.com/azure/api-management/api-management-howto-protect-backend-with-aad
- When triggering the Data Factory pipeline from Azure Functions or Logic Apps, you can use Managed Identity to authenticate without storing credentials - https://learn.microsoft.com/azure/data-factory/using-azure-managed-identities
- Implement logging within the webhook (Logic App or Function) for tracing failures or bottlenecks and leverage Azure Monitor and Application Insights to track events and performance - https://learn.microsoft.com/azure/azure-monitor/overview
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.