Function Triggers
Defining the trigger of your function.
A trigger is a statement that tells your function when and how to execute. A trigger is simply an announcement of what event should trigger your function to execute. When you connect a trigger with a Cloud Function, it will run when the triggering occurs.
There are two trigger types:
HTTP triggers
Event triggers
HTTP triggers
A function with an HTTP trigger is executed when an HTTP request is sent to the function's URL.
Event triggers
A function with an event trigger does not have a public URL. It executes in response to an event within your Cloud project. For example, a function might execute in response to changes to data in a database.
Cloud Functions supports the following event-based triggers:
When you are defining your function, it is important to tell what will trigger it. You can do this in the function.config.json file by giving the provider, event, and resource values.
Supported trigger combinations.
Notice that the resource value is not necessary for all the providers.
Last updated