
Alibaba Cloud Downloads
CertifiedDownload several objects from an OSS bucket
Alibaba Cloud Downloads
Download several objects from an OSS bucket
Lists the objects of a bucket by prefix and regular expression, downloads them into Kestra internal storage, and can then leave, delete or move each of them. Objects are downloaded first and only then deleted or moved, so nothing is removed from the bucket before it is safely in internal storage. An object that cannot be downloaded is skipped and left in place; the task only fails when none of the matching objects can be downloaded. If the delete or move of an object fails, the task keeps going and flags that object with actionFailed.
type: io.kestra.plugin.alibaba.oss.DownloadsExamples
Download the CSV files of a prefix and move them to an archive prefix
id: oss_downloads
namespace: company.team
tasks:
- id: downloads
type: io.kestra.plugin.alibaba.oss.Downloads
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.
bucket *string
Bucket
The name of the OSS bucket.
action string
NONENONEDELETEMOVEAction
What to do with each object once it is downloaded: NONE leaves it, DELETE removes it, MOVE copies it under moveToPrefix and removes the original.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150endpointOverride string
Endpoint override
Custom http or https endpoint URL. When set, it takes precedence over the endpoint derived from region.
maxFiles integerstring
25Maximum number of files
Maximum number of objects downloaded, between 1 and 1000 (default 25). A warning is logged when more objects match.
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 matched again by the next run.
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 downloaded.
regexp string
Regular expression
Only objects whose full key matches this Java regular expression are downloaded. It is limited to 256 characters and evaluation is time-boxed to guard against catastrophic backtracking.
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.
Outputs
objects array
The downloaded objects
io.kestra.plugin.alibaba.oss.Downloads-DownloadedObject
Whether the delete or move failed
When true, the object is still in the bucket.
ETag
Object key
date-timeLast modified time
Size in bytes
uriURI of the downloaded object in Kestra internal storage