Triggers

Triggers are bound to functions. Different types of triggers have different formats. When you configure a trigger, the function will be automatically triggered when certain conditions are met. Cloud Functions currently supports the following three kinds of triggers, which are:

  • HTTPTrigger: You can customize REST API to bind the API operation (supports GET and POST request methods) to the current function. You can access API through HTTPS on browser or terminal. HTTPTrigger will trigger the function.
  • TimeTrigger: When you need to periodically call a function, such as monthly trigger for billing, you can set timetrigger with a fixed frequency (per minute, hour, day, etc). You can also customize cron (see below for expression syntax). The most fine-grained time interval supported by Cloud Functions is in minutes, whereas the most coarse-grained time interval is in months.
  • FDSTrigger: Integrated with Xiaomi FDS, you can write functions to manage FDS creation and deletion events. If you upload a photo in FDS, you can use FDSTrigger to trigger the function to compress the photo. For FDS operations, see FDS Document.

cron expression format:

Field name Value Special characters
Second 0-59 ,- /
Minute 0-59 ,- * /
Hour 0-23 ,- * /
Day 1-31 ,- * /
Month 1-12 ,- * /

results matching ""

    No results matching ""