
Alibaba Cloud Trigger
CertifiedTrigger a flow when objects appear in an OSS bucket
Alibaba Cloud Trigger
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.
type: io.kestra.plugin.alibaba.oss.TriggerExamples
Process the CSV files of a prefix and move them to an archive prefix
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
accessKeyId *string
AccessKey ID
The AccessKey ID used to authenticate against Alibaba Cloud.
accessKeySecret *string
AccessKey secret
The AccessKey secret paired with the AccessKey ID.
action *string
DELETEMOVEAction
What to do with each object once it is downloaded: DELETE removes it, MOVE copies it under moveToPrefix and removes the original.
bucket *string
Bucket
The name of the OSS bucket to poll.
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
endpointOverride string
Endpoint override
Custom http or https endpoint URL. When set, it takes precedence over the endpoint derived from region.
interval string
PT1MdurationPolling interval
maxFiles integerstring
25Maximum number of files
Maximum number of objects processed per poll, between 1 and 1000. The rest is picked up by the next polls.
moveToBucket string
Move destination bucket
The bucket objects are moved to when action is MOVE. Defaults to bucket.
moveToPrefix string
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.
pathStyleAccess booleanstring
falsePath-style access
Address buckets as <endpoint>/<bucket> instead of <bucket>.<endpoint>. Useful with custom endpoints such as a local emulator.
prefix string
Prefix
Only objects whose key starts with this prefix are picked up.
regexp string
Regular expression
Only objects whose full key matches this regular expression are picked up.
region string
Region
The Alibaba Cloud region ID, for example cn-hangzhou. The service endpoint is derived from it unless endpointOverride is set.
securityToken string
Security token
Optional Security Token Service (STS) token, required when using temporary credentials.
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA 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.
Outputs
objects array
The objects that triggered the execution
io.kestra.plugin.alibaba.oss.Trigger-TriggeredObject
Whether the delete or move failed
When true, the object is still in the bucket and is reported again by the next poll.
ETag
Object key
date-timeLast modified time
Size in bytes
uriURI of the downloaded object in Kestra internal storage