This topic describes how to create, update, and delete triggers in the Function Compute console.

Note One-way integrated triggers, including API Gateway triggers and Message Queue for Apache Kafka connectors, can be configured only in event sources and cannot be modified in the Function Compute console. Therefore, managed triggers described in this topic do not include one-way integrated triggers.

Prerequisites

Create a trigger

Update the configurations of a trigger

  1. Log on to the Function Compute console.
  2. In the left-side navigation pane, click Services and Functions.
  3. In the top navigation bar, select the region where your Kubernetes cluster is deployed.
  4. Find the specified function in the specified service and click the name of the function.
    Note If the service has multiple versions, select the LATEST version.
  5. On the details page of the function, click the Triggers tab. On the Triggers tab, find the trigger that you want to manage and click Modify in the Actions column.
  6. In the Modify Trigger panel, modify the configurations of the trigger as required and click OK.
    Parameters that you can modify for different types of triggers:
    • Time trigger: You can modify the Trigger Mode, Interval, and Trigger Message parameters. For more information, see the parameter description in the Create a trigger section of the Configure a time trigger topic. edit-timertrigger
    • OSS event trigger: You can modify the Object Prefix, Object Suffix, and Trigger Event parameters. In addition, you can create and select a new role. For more information, see the parameter description in the Create a trigger section of the Configure an OSS trigger topic. edit-osstrigger
    • Log Service trigger: You can modify the Trigger Interval, Retries, Trigger Log, and Invocation Parameters parameters. In addition, you can create and select a new role. For more information, see the parameter description in the Create a trigger section of the Configure a Log Service trigger topic. edit-slstrigger
    • Alibaba Cloud CDN event trigger: You can modify the Domain Name and Description parameters. In addition, you can create and select a new role. For more information, see the parameter description in the Create a trigger section of the Configure an Alibaba Cloud CDN trigger topic. edit-cdntrigger
    • HTTP Trigger: You can modify the Authentication and Request Method parameters. edit-httptrigger
      The following table describes the parameters.
      Parameter Description Example
      Authentication Specifies whether authentication is required and whether anonymous access is supported. Valid values:
      • Yes: Authentication is required, and anonymous access is not supported. In this case, security is high. For more information, see Configure signature authentication.
      • No: No authentication is required, and anonymous access is supported. In this case, security is low. All users can send HTTP requests to invoke the function.
      Yes
      Request Method The HTTP method that can be used to trigger the HTTP trigger. Valid values:
      • GET
      • POST
      • PUT
      • DELETE
      • HEAD
      • PATCH
      • GET
      • POST
    • Message Queue for Apache RocketMQ trigger: You can modify the Apache RocketMQ Instance, Topic, Tag, Group ID, and Consumer Offset parameters. For more information, see the parameter description in the Step 1: Create a trigger section of the RocketMQ trigger topic.
    • Message Queue for RabbitMQ trigger: You can modify the RabbitMQ Instance, vhost, and Queue parameters. For more information, see the parameter description in the Step 1: Create a trigger section of the RabbitMQ trigger topic.
    • MNS queue trigger: You can modify only the Queue Name parameter. For more information, see the parameter description in the Step 1: Create a trigger section of the MNS queue trigger topic.
    • Alibaba Cloud service event source trigger: In this example, for an Elastic Compute Service (ECS) trigger, you can modify only the Event Type parameter. For more information, see the parameter description in the Step 1: Create a trigger section of the Alibaba Cloud event source trigger topic.
Note You cannot modify created MNS topic triggers and Tablestore triggers.

Delete a trigger

  1. Log on to the Function Compute console.
  2. In the left-side navigation pane, click Services and Functions.
  3. In the top navigation bar, select the region where your Kubernetes cluster is deployed.
  4. Find the specified function in the specified service and click the name of the function.
    Note If the service has multiple versions, select the LATEST version.
  5. On the details page of the function, click the Triggers tab. In the trigger list, find the trigger that you want to delete and choose More > Delete or click Delete in the Actions column.
  6. In the Submit message, read the note and click Delete.