You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
Trigger management
Creating APIG triggers
Copy page
Download PDF
Creating APIG triggers
veFaaS allows you to use Volcano Engine APIG as an event source. The function logic can be triggered via public or private HTTP/HTTPS traffic, thereby providing the business capabilities of functions. This topic describes how to create APIG triggers.​
Background information​
APIG triggers are two-way integrated triggers, which can be configured in both the veFaaS console and the APIG console. An APIG trigger on the veFaaS side corresponds to a function-type Upstream and a group of routes that point to the Upstream on the APIG side.​
Prerequisites​
  • The function must have completed at least one full release. For details, see Releasing functions.​
Limits​
  • You can create up to 20 triggers for each function.​
  • On the veFaaS side, you can create only one APIG trigger for a function under the same gateway instance. In addition, an APIG trigger can only be bound to one route with 100% weight.​
  • After an APIG trigger is created, you cannot change the gateway instance and gateway service to which it belongs, as well as modifying the trigger name and route name.​
  • For each APIG trigger, up to 5 gateway services and 200 routes can be displayed. If the upper limit is exceeded, go to the APIG console to view.​
  • Before deleting a function, you need to delete all APIG triggers first.​
  • Recommended operation platform​
  • To create a single route with 100% weight that points to the target function, we recommend creating the APIG trigger on the veFaaS side. In this scenario, you can perform creation, editing, and deletion operations on the veFaaS side.​
  • For more requirements, such as connecting one route to multiple functions for multi-version/multi-environment management, or connecting multiple routes to one function, perform the operation in the APIG console. For details, see Creating veFaaS-type Upstreams and Creating routes. In this scenario, you can only view bound route information on the veFaaS side, instead of performing creation, editing, or deletion operations.​
Procedure​
  1. Log in to the veFaaS console.​
  1. In the top navigation bar, select the target region.​
  1. In the function list, find the function for which you want to create a trigger and click its name.​
  1. On the function details page, click Create trigger on the Trigger tab.​
  1. In the Create trigger panel, specify the parameters as required.​
  • Basic configurations​
  • ​
    Parameter​
    Description​
    Trigger type​
    In this scenario, select APIG.​
    Trigger name​
    Specify a custom name for the trigger. Trigger names cannot be repeated under the same function. The trigger name cannot be modified after being created.​
    APIG instance​
    Select the gateway instance to which the trigger belongs.​
    Gateway service​
    Select the gateway service to which the trigger belongs.​
    ​
  • Gateway routing​
  • Bind a route with 100% weight to the current APIG trigger.​
  • ​
    Parameter​
    Description​
    Route name​
    Specify a custom route name. The route name cannot be modified after being created.​
    Path​
    Set the request path allowed to access the function. It can be matched only by a prefix and must start with a forward slash (/).​
    Weight​
    Display the weight of the current route. On the veFaaS side, you can only configure routes with 100% weight.​
    Request method​
    Select the method of requesting access to the function. The following six request methods are supported: POST, GET, PUT, DELETE, HEAD, and OPTIONS. Select an appropriate method based on your business requirements.​
    Timeout​
    Specify the maximum period to wait for the function to respond to a request after the APIG trigger forwards the request to the function. After you enable this feature, you need to specify a specific timeout period. Select whether to enable this feature based on your business requirements.​
    • After enabling the timeout feature, you can control the request timeout period for the APIG trigger independently. If you also set the timeout period for the current function on the veFaaS side, the short timeout period will take effect.​
    • If you disable Timeout, the APIG trigger will have no timeout limit.​
    Cross-domain switch​
    Enable cross-origin access by adding Access-Control-Allow-Origin: * in the response header. If your function supports cross-domain access, enable Cross-domain switch. This ensures secure transmission of cross-domain data.​
    ​
  1. Click Confirm to create the APIG trigger.​
What to do next​
  • For the method of modifying the configurations of the APIG trigger, see Managing triggers.​
Last updated: 2026.08.19 14:06:06