All Products
Search
Document Center

Function Compute:ListTriggers

更新时间:Aug 20, 2025

You can call this operation to view the list of triggers.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample codes.

Request headers

This operation uses only common request headers. For more information, see Common parameters.

Request syntax

GET /services/{serviceName}/functions/{functionName}/triggers 

Request parameters

ParameterTypePositionRequiredExampleDescription
serviceNameStringPathYesservice_name

The name of the service.

functionNameStringPathYesfunction_name

The name of the function.

limitIntegerQueryNo20

The maximum number of resources to return. Default value: 20. Maximum value: 100. The number of returned resources is smaller than or equal to the specified number.

nextTokenIntegerQueryNonext_trigger

The token used to obtain more results. If the number of resources exceeds the limit, the nextToken parameter is returned. Include this parameter in subsequent invocations to obtain more results. You do not need to provide this parameter in the first invocation.

prefixStringQueryNoprefix_text

The prefix that the names of returned resources must contain.

startKeyStringQueryNostart_key

The starting position of the result list. Results are sorted in the alphabetical order and those results following startKey (inclusive) are listed.

Response parameters

ParameterTypeExampleDescription
nextTokenStringnext_trigger

The token used to obtain more results. If this value is not returned, all results are returned.

triggersArray

The definition of the trigger.

createdTimeString2020-04-08T01:48:21Z

The time when the trigger was created.

invocationRoleStringacs:ram::198611****4430:role/aliyunosseventnotificationrole

The role required when the trigger source such as OSS invokes the function. For more information, see Overview.

lastModifiedTimeString2020-04-08T01:48:21Z

The last time when the trigger was updated.

qualifierStringnull

The version of the service. For more information, see Manage versions.

sourceArnStringacs:oss:cn-shanghai:12345:mybucket

The Alibaba Cloud Resource Name (ARN) of the event source for the trigger.

triggerConfigStringtrue

The configurations of the trigger. The configurations vary with trigger types.

triggerNameStringtrigger_name

The name of the trigger.

triggerTypeStringoss

The type of the trigger. Valid values:

Examples

Sample requests

GET /2016-08-15/services/service_name/functions/function_name/triggers HTTP/1.1 
Common request headers

Sample success responses

JSON format

{
  "triggers": [
    {
      "triggerName": "trigger_name",
      "description": "test_description",
      "triggerId": "b883122b-6f86-4889-bb69-1729a4***",
      "sourceArn": "acs:oss:cn-shanghai:12345:mybucket",
      "triggerType": "oss",
      "invocationRole": "acs:ram::198611****4430:role/aliyunosseventnotificationrole",
      "qualifier":null,
      "triggerConfig": {
        "events": [
          "oss:ObjectCreated:*"
        ],
        "filter": {
          "key": {
            "prefix": "prefix_text",
            "suffix": ".zip"
          }
        }
      },
      "createdTime": "2020-04-08T01:48:21Z",
      "lastModifiedTime": "2020-04-08T01:48:21Z"
    }
  ]
}

Error codes

For a list of error codes, visit the API Error Center.