Alibaba Cloud Trigger

Alibaba Cloud Trigger

Certified

Trigger a flow when objects appear in an OSS bucket

Polls a bucket on a fixed interval, downloads the matching objects into Kestra internal storage and starts one execution with all of them. Each downloaded object is then deleted or moved so that it is not picked up again. Objects are downloaded first, and the execution is started even if the delete or move of some of them fails: those objects are reported again by the next poll. An object that cannot be downloaded is left in place and skipped.

yaml
type: io.kestra.plugin.alibaba.oss.Trigger

Process the CSV files of a prefix and move them to an archive prefix

yaml
id: oss_trigger
namespace: company.team

tasks:
  - id: each
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.objects | jq('.[].uri') }}"
    tasks:
      - id: log
        type: io.kestra.plugin.core.log.Log
        message: "{{ taskrun.value }}"

triggers:
  - id: watch
    type: io.kestra.plugin.alibaba.oss.Trigger
    interval: PT1M
    accessKeyId: "{{ secret('ALIBABA_ACCESS_KEY_ID') }}"
    accessKeySecret: "{{ secret('ALIBABA_ACCESS_KEY_SECRET') }}"
    region: cn-hangzhou
    bucket: my-bucket
    prefix: landing/
    regexp: ".*\\.csv"
    action: MOVE
    moveToPrefix: archive/
Properties

AccessKey ID

The AccessKey ID used to authenticate against Alibaba Cloud.

AccessKey secret

The AccessKey secret paired with the AccessKey ID.

Possible Values
DELETEMOVE

Action

What to do with each object once it is downloaded: DELETE removes it, MOVE copies it under moveToPrefix and removes the original.

Bucket

The name of the OSS bucket to poll.

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

Endpoint override

Custom http or https endpoint URL. When set, it takes precedence over the endpoint derived from region.

DefaultPT1M
Formatduration

Polling interval

Default25

Maximum number of files

Maximum number of objects processed per poll, between 1 and 1000. The rest is picked up by the next polls.

Move destination bucket

The bucket objects are moved to when action is MOVE. Defaults to bucket.

Move destination prefix

Prefix prepended to the original key when action is MOVE. Required for MOVE. The task fails when a moved key in the same bucket would still match prefix and regexp, because such objects would be picked up again.

Defaultfalse

Path-style access

Address buckets as <endpoint>/<bucket> instead of <bucket>.<endpoint>. Useful with custom endpoints such as a local emulator.

Prefix

Only objects whose key starts with this prefix are picked up.

Regular expression

Only objects whose full key matches this regular expression are picked up.

Region

The Alibaba Cloud region ID, for example cn-hangzhou. The service endpoint is derived from it unless endpointOverride is set.

Security token

Optional Security Token Service (STS) token, required when using temporary credentials.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

The objects that triggered the execution

Definitions
actionFailedboolean

Whether the delete or move failed

When true, the object is still in the bucket and is reported again by the next poll.

etagstring

ETag

keystring

Object key

lastModifiedstring
Formatdate-time

Last modified time

sizeinteger

Size in bytes

uristring
Formaturi

URI of the downloaded object in Kestra internal storage