Huawei Trigger

Huawei Trigger

Certified

Trigger a flow when new objects appear in a Huawei OBS bucket

Polls an OBS bucket on a configurable interval and fires an execution when objects matching the filter are found. After triggering, action controls what happens to the matched objects:

  • DELETE — objects are deleted so they are not re-processed on the next poll.
  • MOVE — objects are moved to a different prefix/bucket before the next poll.
  • NONE — objects are left in place; combine with a narrow marker or regexp to avoid infinite re-triggering.

The trigger outputs the same structure as the Downloads task.

yaml
type: io.kestra.plugin.huawei.obs.Trigger
yaml
id: obs_trigger
namespace: company.team

tasks:
  - id: process
    type: io.kestra.plugin.core.log.Log
    message: "{{ trigger.objects | length }} new files arrived"

triggers:
  - id: watch
    type: io.kestra.plugin.huawei.obs.Trigger
    accessKeyId: "{{ secret('HUAWEI_AK') }}"
    secretAccessKey: "{{ secret('HUAWEI_SK') }}"
    region: "eu-west-101"
    bucket: "my-bucket"
    prefix: "inbox/"
    action: DELETE
    interval: PT60S

Trigger and move files to an archive prefix

yaml
id: obs_trigger_move
namespace: company.team

tasks:
  - id: process
    type: io.kestra.plugin.core.log.Log
    message: "Processing {{ trigger.objects | length }} files"

triggers:
  - id: watch
    type: io.kestra.plugin.huawei.obs.Trigger
    accessKeyId: "{{ secret('HUAWEI_AK') }}"
    secretAccessKey: "{{ secret('HUAWEI_SK') }}"
    region: "eu-west-101"
    bucket: "my-bucket"
    prefix: "inbox/"
    action: MOVE
    moveTo:
      keyPrefix: "processed/"
    interval: PT300S
Properties

OBS bucket to watch

Access Key (AK) used to authenticate with Huawei Cloud

Huawei Cloud access key used together with secretAccessKey to sign API requests. Required for AK/SK-based authentication; not required when providing a pre-obtained securityToken. Sensitive — always provide via {{ secret('NAME') }}.

DefaultDELETE
Possible Values
NONEDELETEMOVE

Action applied to matched objects after they have been downloaded

Use DELETE or MOVE to prevent the same objects from triggering again on the next poll. NONE is available but requires the caller to manage re-trigger avoidance (e.g. via a narrow regexp or an external marker).

Defaultfalse

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

Possible Values
OBSV2V4

Request signing algorithm

Controls how OBS client signs each request:

  • OBS — native Huawei OBS signing (default; use for real OBS endpoints).
  • V2 — S3 v2 HMAC signing; required for MinIO and other S3-compatible endpoints.
  • V4 — S3 v4 signing; not compatible with MinIO via the OBS SDK due to a date-format mismatch. Do not use V4 with S3-compatible endpoints.

A delimiter that groups keys

Keys containing the delimiter after the prefix are grouped under a common prefix in the response. Useful for emulating a folder hierarchy (e.g. delimiter: /).

Huawei Cloud Account Domain ID

Identifies the Huawei Cloud account (domain). Required when authenticating against global services such as IAM, or when requesting a domain-scoped IAM token.

Override for the OBS endpoint URL

Full URL of the OBS endpoint to connect to instead of the region-derived default (https://obs.<region>.myhuaweicloud.com). Required when using S3-compatible endpoints such as MinIO (e.g. http://localhost: 9000). Trailing slashes are stripped automatically.

Defaultmyhuaweicloud.com

Domain suffix for the region-derived OBS endpoint

Suffix appended to build https://obs.<region>.<endpointSuffix> when no endpointOverride is set. Defaults to myhuaweicloud.com. Set to myhuaweicloud.eu for the European sovereign region (e.g. eu-west-101). Ignored when endpointOverride is set.

DefaultPT1M
Formatduration

Polling interval

How often the trigger polls the bucket for new objects, as an ISO-8601 duration (e.g. PT60S, PT5M). Defaults to 60 seconds.

Marker to start listing from (exclusive)

Returned objects will appear after this key in lexicographic order. Use the nextMarker from a previous response to paginate.

Default1000

Maximum number of keys to return per page (default 1000)

The SDK may return fewer keys than requested if the page boundary falls mid-prefix. ObsService.list iterates all pages automatically so the total result set is not bounded by this value — it only affects the page size sent to OBS.

Destination bucket and key-prefix when action is MOVE

Definitions
bucketstring

Destination bucket. Defaults to the source bucket when not set

keyPrefixstring

Key prefix prepended to the original object key in the destination

The final destination key is built as <keyPrefix><originalKey>. For example, with keyPrefix: processed/ and a source key data/file.csv, the destination key becomes processed/data/file.csv. Leave blank to preserve the original key structure.

Use path-style access for object keys

When true, the bucket name is placed in the URL path (http://host/bucket/key) instead of the virtual-hosted style (http://bucket.host/key). Required for MinIO and most S3-compatible endpoints. Default is false (virtual-hosted style, as used by real OBS).

Limits the response to keys that begin with the specified prefix

Huawei Cloud Project ID

Identifies the region-scoped project against which most regional services authenticate. Mutually exclusive with domainId for global services such as IAM.

Client-side regular expression applied to the full object key after server-side listing

Only objects whose key matches this pattern (evaluated with String.matches) are included in the output. Applied after prefix/delimiter filtering done by OBS, so the regexp sees the complete key including any prefix.

Huawei Cloud region

Region identifier such as eu-west-101, ap-southeast-1, or cn-north-4.

Secret Key (SK) used to authenticate with Huawei Cloud

Huawei Cloud secret key paired with accessKeyId. Required for AK/SK-based authentication. Sensitive — always provide via {{ secret('NAME') }}.

Pre-obtained Huawei Cloud IAM token used as bearer credential for downstream API calls

When set, downstream Huawei tasks send this value in the X-Auth-Token header instead of signing requests with AK/SK. Sensitive.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

Inline IAM credential exchange

When set, the connection layer calls the Huawei IAM STS API once per task execution and uses the returned temporary AK/SK + security token instead of the static accessKeyId and secretAccessKey properties.

Set it on each task that should exchange credentials, alongside the task's other connection properties:

temporaryCredentials: 
  authMethod: PASSWORD
  username: my-iam-user
  password: "{{ secret('HUAWEI_IAM_PASSWORD') }}"
  domainName: my-account-domain
  durationSeconds: 3600

**Long-running tasks: ** the exchange runs once at execution start. For RealtimeTrigger or long-running Consume tasks that outlive durationSeconds, credentials will expire mid-run. Use long-lived AK/SK properties or refresh externally in that case.

Definitions
authMethodstring
DefaultPASSWORD
Possible Values
PASSWORDTOKEN

Authentication method

Controls which credentials are used to obtain the session token before exchanging for temporary STS credentials.

  • PASSWORD (default): provide username, password, and domainName.
  • TOKEN: provide an existing iamToken (X-Auth-Token).
domainNamestring

Account domain name (PASSWORD method only)

The Huawei Cloud account name (domain name) that owns the IAM user. Required when authMethod is PASSWORD. Visible in the Huawei Cloud console under My Credentials → Domain Name.

durationSecondsintegerstring
Default900

Lifetime of the temporary credentials in seconds

How long the returned temporary AK/SK/security-token should remain valid. Huawei Cloud accepts values between 900 (15 minutes) and 86400 (24 hours). Defaults to 900 seconds.

endpointSuffixstring
Defaultmyhuaweicloud.com

Huawei Cloud IAM endpoint suffix

Domain suffix used to build the IAM endpoint URL when no explicit endpoint override is set. Defaults to myhuaweicloud.com. Set to myhuaweicloud.eu for the European sovereign cloud (region eu-west-101 / EU-Dublin).

iamTokenstring

IAM token to exchange (TOKEN method only)

An existing Huawei Cloud X-Auth-Token to exchange for temporary STS credentials. Required when authMethod is TOKEN. Sensitive — always provide via {{ secret('NAME') }}.

passwordstring

IAM password (PASSWORD method only)

Password for the IAM user identified by username. Required when authMethod is PASSWORD. Sensitive — always provide via {{ secret('NAME') }}.

projectNamestring

Project name for project-scoped tokens (PASSWORD method only)

Overrides the project name used for scope=PROJECT token requests. Defaults to the task's region value when omitted, which is correct for most regions.

scopestring
DefaultPROJECT
Possible Values
PROJECTDOMAIN

Token scope (PASSWORD method only)

Scope of the session token obtained during password authentication.

  • PROJECT (default): token is scoped to the project matching projectName (or the task's region when projectName is omitted). Use for most downstream tasks.
  • DOMAIN: token is scoped to the domain.
usernamestring

IAM username (PASSWORD method only)

Huawei Cloud IAM username. Required when authMethod is PASSWORD.

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.

List of downloaded objects with internal storage URIs

Each entry includes the original OBS metadata plus the uri field pointing to the downloaded file in Kestra internal storage.

Definitions
etagstring

ETag of the object, as returned by OBS

keystring

Object key (full path within the bucket)

lastModifiedstring
Formatdate-time

Last-modified timestamp (UTC)

ownerstring

Display name of the object owner, or null when not available

sizeinteger

Object size in bytes

uristring
Formaturi

Kestra internal storage URI of the downloaded object

Populated only by tasks that download the object content (e.g. Downloads, Trigger). Null when produced by listing-only operations.

SubTypestring

Map of object key to Kestra internal storage URI

Convenient for downstream tasks that need to look up a file by its original OBS key.