TriggerDesc
parameter will be the trigger description, which can be used as instructed in this document.0 */5 * * * * *
Name | Type | Required | Description |
api | No | API configuration of the created API gateway | |
service | No | Service configuration of the created API gateway | |
release | No | Release environment for the created API gateway |
Name | Type | Required | Description |
authRequired | String | No | Whether authentication is required. Valid values: TRUE, FALSE. Default value: FALSE |
requestConfig | No | Configuration of request backend API | |
isIntegratedResponse | String | No | Whether to use integrated response. Valid values: TRUE, FALSE. Default value: FALSE |
IsBase64Encoded | String | No | Whether to enable Base64-encoding. Valid values: TRUE, FALSE. Default value: FALSE |
Name | Type | Required | Description |
method | String | No | Method configuration of request backend API. Valid values: ANY , GET , HEAD , POST , PUT , DELETE |
Name | Type | Required | Description |
serviceId | String | No | Apigw Service ID (if this parameter is not passed in, a new service will be created) |
Name | Type | Required | Description |
environmentName | String | Yes | Release environment. Valid values: release , test , prepub . If this parameter is left empty, release will be used by default |
{"api":{"authRequired":"FALSE","requestConfig":{"method":"ANY"},"isIntegratedResponse":"FALSE"},"service":{"serviceName":"SCF_API_SERVICE"},"release":{"environmentName":"release"}}
Name | Type | Required | Description |
maxMsgNum | String | Yes | A function invocation will be triggered once every time maxMsgNum CKafka messages are aggregated within 5 seconds |
offset | String | Yes | offset is the position where consumption of CKafka messages starts. Currently, three values are supported: latest , earliest , and millisecond-level timestamp |
retry | String | Yes | Maximum number of retries when the function reports an error |
{"maxMsgNum":100,"offset":"latest","retry":10000}
{"maxMsgNum":999,"offset":"1595927203000","retry":10}
TriggerName
field needs to be defined as the instanceId
and topicName
of the target CKafka instance in the following format: [instanceId]-[topicName]
. Below is a sample request:TriggerName: "ckafka-8tfxzia3-test"
Name | Type | Required | Description |
event | String | Yes | |
filter | Yes | COS filename filter |
Name | Type | Required | Description |
Prefix | String | No | Prefix rule of file filter |
Suffix | String | No | Suffix rule of file filter, which must begin with . |
cos:ObjectCreated:*
event is set but no prefix/suffix is set, subsequent binding to any event that starts with cos:ObjectCreated
will fail.{"event":"cos:ObjectCreated:*","filter":{"Prefix":"","Suffix":""}}
TriggerDesc
is used as a trigger description, the JSON string must be continuous with no spaces contained.TriggerName
field needs to be defined as the XML API access domain name of the target COS bucket. Below is an example:TriggerName: "xxx.cos.ap-guangzhou.myqcloud.com"
Name | Type | Required | Description |
filterType | String | No | Message filter type. 1: tag; 2: route match |
filterKey | String | No | When filterType is 1 , it indicates the message filter tag; when filterType is 2 , it indicates the Binding Key |
{"filterType":1,"filterKey":["test"]}
{"filterType":2,"filterKey":["#test"]}
TriggerName
field needs to be defined as CMQ Topic
. Below is an example:TriggerName: "Tabortest"
Was this page helpful?