Creates a trigger.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request syntax
POST /2023-03-30/functions/{functionName}/triggers
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
functionName | string | Yes | The function name. | my-func |
body | CreateTriggerInput | Yes | The trigger configurations. |
Response parameters
Examples
Sample success responses
JSON
format
{
"createdTime": "2020-08-20T02:28:21Z",
"description": "test_description",
"httpTrigger": {
"urlInternet": "https://svc-func-xxxxxxxx.cn-hangzhou.fcapp.run",
"urlIntranet": "https://svc-func-xxxxxxxx.cn-hangzhou-vpc.fcapp.run"
},
"invocationRole": "acs:ram::151641468453****:role/my-role",
"lastModifiedTime": "2020-04-23T06:32:43Z",
"qualifier": "LATEST",
"sourceArn": "acs:oss:cn-hangzhou:151641468453****:my-bucket",
"status": "OK",
"targetArn": "acs:oss:cn-hangzhou:151641468453****:my-bucket",
"triggerConfig": "{\n \"events\": [\n \"oss:ObjectCreated:*\"\n ],\n \"filter\": {\n \"key\": {\n \"prefix\": \"/prefix\",\n \"suffix\": \".zip\"\n }\n }\n}",
"triggerId": "546959b5-ce1a-4991-8891-df7a02b25086",
"triggerName": "defaultTrigger",
"triggerType": "http"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||
---|---|---|---|---|---|---|---|---|
2024-02-22 | The internal configuration of the API is changed, but the call is not affected | see changesets | ||||||
| ||||||||
2023-08-30 | API Description Update | see changesets | ||||||
| ||||||||
2023-08-30 | API Description Update. The response structure of the API has changed | see changesets | ||||||
| ||||||||
2023-07-05 | The request parameters of the API has changed | see changesets | ||||||
| ||||||||
2023-06-28 | Add Operation | see changesets |