Skip to content

Triggers

Shivam Gupta edited this page Nov 17, 2022 · 9 revisions

Introduction

Triggers cause a function to run. A trigger defines how a function is invoked and a function must have exactly one trigger. Triggers have associated data, which is often provided as the payload of the function.

azure function triggers

There are many types of triggers

azure function triggers

Azure Functions provides triggers/templates to get you started with key scenarios, including the following: 
  • HTTPTrigger -Trigger the execution of your code by using an HTTP request.

  • TimerTrigger – Execute clean up or other batch tasks on a predefined schedule.

  • CosmosDBTrigger - Process Azure Cosmos DB documents when they are added or updated in collections in a NoSQL database.

  • BlobTrigger - Process Azure Storage blobs when they are added to containers. You might use this function for image resizing.

  • QueueTrigger - Respond to messages as they arrive in an Azure Storage queue.

  • EventGridTrigger - Respond to events delivered to a subscription in Azure Event Grid. Supports a subscription-based model for receiving events, which includes filtering. A good solution for building event-based architectures.

  • EventHubTrigger - Respond to events delivered to an Azure Event Hub. Particularly useful in application instrumentation, user experience or workflow processing, and internet-of-things (IoT) scenarios.

  • ServiceBusQueueTrigger - Connect your code to other Azure services or on-premises services by listening to message queues.

  • ServiceBusTopicTrigger - Connect your code to other Azure services or on-premises services by subscribing to topics.