Updated on 2023-10-19 GMT+08:00

remove trigger

remove trigger is used to delete a specified trigger.

You can run remove trigger -h or remove trigger --help to view the documentation.

Parameter Parsing

Table 1 Parameter description

Parameter Name

Abbreviation

Required in YAML

Required in CLI

Description

region

-

No

Yes

Region

function-name

-

No

Yes

Function name

version-name

-

No

No

Version. Default: latest

trigger-type

-

No

Yes

Trigger type

trigger-name

-

No

Yes

Trigger name. APIG: API name; OBS: bucket name; TIMER: trigger name

assume-yes

y

No

No

During interaction, y is selected by default.

This command also supports some global parameters, such as -a/--access and --debug. For details, see Global Parameters of Serverless Devs.

Examples

  • If you have a resource description file (YAML), run s remove trigger to delete a trigger declared in the file.
  • If you use CLI (without a YAML resource description file), specify the name and region of the service. For example, s cli fgs remove trigger --region cn-north-4 --function-name fgs-test --trigger-type APIG --trigger-name fgs-test-trigger.
Execution result of the preceding command:
Trigger [fgs-test-trigger] deleted.