Queries the list of triggers for a specified function.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:ListTriggers |
get |
*All Resource
|
None | None |
Request syntax
GET /2021-04-06/services/{serviceName}/functions/{functionName}/triggers HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| serviceName |
string |
Yes |
The name of the service. |
demo-service |
| functionName |
string |
Yes |
The name of the function. |
demo-function |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| limit |
integer |
No |
The maximum number of resources to return. If this parameter is not specified, the default value is 20. The maximum value is 100. The number of returned results may be less than the specified value but never exceeds it. |
20 |
| nextToken |
string |
No |
The token used to retrieve more results. You do not need to provide this parameter for the first query. The token for subsequent queries is obtained from the returned results. |
f-trigger |
| prefix |
string |
No |
The prefix that the names of returned resources must start with. |
a |
| startKey |
string |
No |
Specifies that the results are returned in alphabetical order starting from the value of startKey (inclusive). |
a-trigger |
| X-Fc-Account-Id |
string |
No |
The Alibaba Cloud account ID. |
188077086902**** |
| X-Fc-Date |
string |
No |
The time when the client initiated the request. The format is EEE,d MMM yyyy HH:mm:ss GMT. |
Wed, 11 May 2022 09:00:00 GMT |
| X-Fc-Trace-Id |
string |
No |
The custom request ID. |
my-test-trace-id |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct for querying triggers. |
||
| nextToken |
string |
The token used to retrieve more results. If this value is not returned, no more results exist. |
f-trigger |
| triggers |
array<object> |
The list of triggers. |
|
|
object |
The trigger details. |
||
| createdTime |
string |
The time when the trigger was created. |
2022-10-20T02:52:03Z |
| invocationRole |
string |
The Alibaba Cloud Resource Name (ARN) of the RAM role used by the event source to invoke the function. |
acs:ram::123456xxxx:role/fc-test |
| lastModifiedTime |
string |
The time when the trigger was last modified. |
2022-10-20T03:17:09Z |
| qualifier |
string |
The version or alias of the service. |
LATEST |
| sourceArn |
string |
The Alibaba Cloud Resource Name (ARN) of the event source. |
acs:oss:cn-shanghai:123456xxxx:mybucket |
| triggerConfig |
string |
The trigger configuration. The configuration varies based on the trigger type. For more information, see the following data structures:
|
{"events": ["oss:ObjectCreated:*"], "filter": {"key": {"prefix": "/prefix", "suffix": ".zip"}}} |
| triggerName |
string |
The name of the trigger. |
demoTrigger |
| triggerType |
string |
The type of the trigger, such as oss, log, tablestore, timer, http, cdn_events, mns_topic, or eventbridge. |
oss |
| description |
string |
The description of the trigger. |
trigger for test |
| triggerId |
string |
The unique ID of the trigger. |
3e270f2f-cef2-421a-bc86-ff4e8088**** |
| domainName |
string |
The domain name. You can concatenate the domain name with the Function Compute domain to invoke the function of the corresponding trigger version over HTTP. For example, |
demo-service-demo-function-jkhksh |
| urlInternet |
string |
The public domain name address. You can access the HTTP trigger over the Internet by using the HTTP or HTTPS protocol. |
https://svc-func-xxxxxxxx.cn-hangzhou.fcapp.run |
| urlIntranet |
string |
The private domain name address. You can access the HTTP trigger within a VPC by using the HTTP or HTTPS protocol. |
https://svc-func-xxxxxxxx.cn-hangzhou-vpc.fcapp.run |
Examples
Success response
JSON format
{
"nextToken": "f-trigger",
"triggers": [
{
"createdTime": "2016-08-15T15:00:00.000+0000",
"invocationRole": "acs:ram::123456xxxx:role/fc-test",
"lastModifiedTime": "016-08-15T17:00:00.000+0000",
"qualifier": "LATEST",
"sourceArn": "acs:oss:cn-shanghai:123456xxxx:mybucket",
"triggerConfig": "{\"events\": [\"oss:ObjectCreated:*\"], \"filter\": {\"key\": {\"prefix\": \"/prefix\", \"suffix\": \".zip\"}}}",
"triggerName": "demoTrigger",
"triggerType": "oss",
"description": "trigger for test",
"triggerId": "3e270f2f-cef2-421a-bc86-ff4e8088****",
"domainName": "demo-service-demo-function-jkhksh",
"urlInternet": "https://svc-func-xxxxxxxx.cn-hangzhou.fcapp.run",
"urlIntranet": "https://svc-func-xxxxxxxx.cn-hangzhou-vpc.fcapp.run"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.