Huawei PutEvents

Huawei PutEvents

Certified

Publish events to Huawei Cloud EventGrid (EG)

Publishes one or more CloudEvents-1.0-formatted events to an EventGrid custom channel via putEvents — the Huawei Cloud equivalent of io.kestra.plugin.aws.eventbridge.PutEvents.

events accepts a single event, an inline list of events, or a URI pointing to serialized events in Kestra internal storage (e.g. produced by a previous task), following the same structured-data conventions as io.kestra.plugin.huawei.dms.kafka.Produce#from. Every event requires source and type; id is auto-generated and specversion defaults to 1.0 when omitted.

EventGrid's per-request batch size cap is not documented, so events are sent in batches of at most 10 (matching the AWS EventBridge equivalent) rather than in one unbounded request; the per-event results are aggregated back together by submission order.

Authentication uses AK/SK request signing. Provide accessKeyId and secretAccessKey via {{ secret('NAME') }}, or configure temporaryCredentials for inline IAM credential exchange.

yaml
type: io.kestra.plugin.huawei.eventgrid.PutEvents

Publish an order-created event to an EventGrid channel.

yaml
id: eventgrid_put_events
namespace: company.team

tasks:
  - id: put_events
    type: io.kestra.plugin.huawei.eventgrid.PutEvents
    accessKeyId: "{{ secret('HUAWEI_AK') }}"
    secretAccessKey: "{{ secret('HUAWEI_SK') }}"
    region: eu-west-101
    channelId: "{{ secret('HUAWEI_EG_CHANNEL_ID') }}"
    events:
      - source: my-order-service
        type: com.mycompany.order.created
        subject: "order/12345"
        data:
          orderId: 12345
          amount: 42.50
Properties

EventGrid channel ID

The ID of the EventGrid custom channel to publish events to.

Events to publish

A single event, a list of events, or a URI pointing to serialized events in Kestra internal storage (e.g. produced by a previous task). Every event requires source and type per the CloudEvents 1.0 specification.

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') }}.

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.

EventGrid endpoint URL override

Overrides the default endpoint derived from region and endpointSuffix. Use this for private endpoints, non-standard deployments, or tests. When set, endpointSuffix is ignored.

Format: https://eg.<region>.myhuaweicloud.com (without trailing slash).

Huawei Cloud domain suffix

Controls the top-level domain used when deriving the EventGrid endpoint from region. Defaults to myhuaweicloud.com. Set to myhuaweicloud.eu for the Huawei Cloud European sovereign cloud.

Ignored when endpointOverride is set.

Defaulttrue

Fail when EventGrid rejects at least one event

If true (default), the task throws when putEvents reports one or more failed events. Set to false to inspect the per-event results in the output instead — the task then completes with a WARNING state when at least one event was rejected.

Reference (ref) of the pluginDefaults to apply to this task.

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.

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.

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.

Configure once via pluginDefaults to apply transparently to every task in a namespace without per-task credential wiring:

pluginDefaults: 
  - type: io.kestra.plugin.huawei.obs
    values: 
      region: eu-west-101
      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.

Default0

Total number of events submitted

Default0

Number of events EventGrid rejected

Formaturi

URI of the ION file in Kestra internal storage containing per-event results

Each entry has index, eventId (when accepted), and errorCode/errorMsg (when rejected).

Unitevents

Number of events successfully accepted by EventGrid.