Trigger Configuration Description

Last updated: 2020-04-17 15:02:29

    When you call the trigger API CreateTrigger, the corresponding TriggerDesc parameter will be the trigger description, which can be used as instructed in this document.

    Timer Trigger

    Please see Cron Expression.


    Triggered once every minute:

    0 * * * * * *

    API Gateway Trigger

    Name Type Required Description
    api ApigwApi No Creates API configuration for an API gateway
    service ApigwService No Creates service configuration for an API gateway
    release ApigwRelease No Release environment for a created API gateway


    Name Type Required Description
    authRequired String No Whether authentication is required. Valid values: TRUE, FALSE. Default value: FALSE
    requestConfig ApigwApiRequestConfing No Configuration of request backend API
    isIntegratedResponse String No Whether to use integrated response. 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



    CKafka Trigger

    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, only latest can be entered


    {"maxMsgNum":"10", "offset":"latest"}

    COS Trigger

    Name Type Required Description
    event String Yes COS event type
    filter CosFilter 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 event conflict rules

    • Core concept: an event can trigger a function invocation at most once. If an event is bound to another product, it cannot be bound to a function.
    • Set at most one prefix filter and one suffix filter.
    • If the cos:ObjectCreated:* event is set but no prefix/suffix is set, subsequent binding to any event that starts with cos:ObjectCreated will fail.
    • The filter will be valid only if both the prefix and suffix are matched, and if there are conflicts with both the prefix and suffix, subsequent binding will fail.



    When TriggerDesc is used as a trigger description, the JSON string must be continuous with no spaces contained.

    CMQ Trigger

    TriggerDesc is not required.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback