You can disable a trigger to temporarily prevent a function from being triggered by an event occurring at the event source.
This can be done in the console.
Enabling/Disabling Trigger in Console
- Log in to the SCF Console and select Functions on the left sidebar.
- At the top of the Functions page, select the region and namespace where the function for which to enable/disable a trigger resides, as shown below:
The function list contains the function name, monitoring information, runtime environment, creation time, and modification time.
- Click the function name to enter the function details page.
The function details page consists of four tabs: Function Management, Trigger Management, Monitoring information, and Log Query.
- Select the Trigger Management tab on the left to browse and operate on triggers.
- Click next to Status to enable or disable the trigger, as shown below:
Setting the Enables/Disabled Status of Trigger During Creation
When you create a trigger, you can set its enabled/disabled status, and the trigger will be in the set status once created.
For example, when creating a timer trigger, if you want the trigger to take effect later as needed, you can deselect "Enable Now". After the trigger is created, you can enable it by switching its enabled/disabled status.
At present, the enabled/disabled status switch is not supported for certain triggers, and the "Enable" button is not displayed for them in the console. When this is supported for them subsequently, the status and button will be displayed accordingly.