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 Function Service on the left sidebar.
- At the top of the Function Service 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 contains the function management, trigger management, monitoring information, log query, and concurrency quota tabs:
- On the function details page, select Trigger Management on the left to enter the trigger browsing and operation page.
- Click in the status of the desired trigger to switch the enabled/disabled status of 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.