Labels Labels

yaml
type: "io.kestra.plugin.core.execution.Labels"

Allow to add or overwrite labels for the current execution at runtime.

Trying to pass a system label (a label starting with system_) will fail the task.

Examples

Add labels based on a webhook payload

yaml
id: webhook_based_labels
namespace: company.team
tasks:
  - id: update_labels_with_map
    type: io.kestra.plugin.core.execution.Labels
    labels:
      customerId: "{{ trigger.body.customerId }}"
  - id: by_list
    type: io.kestra.plugin.core.execution.Labels
    labels:
      - key: order_id
        value: "{{ trigger.body.orderId }}"
      - key: order_type
        value: "{{ trigger.body.orderType }}"
triggers:
  - id: webhook
    key: order_webhook
    type: io.kestra.plugin.core.trigger.Webhook
    conditions:
      - type: io.kestra.plugin.core.condition.ExpressionCondition
        expression: "{{ trigger.body.customerId is defined and trigger.body.orderId is defined and trigger.body.orderType is defined }}"

Properties

labels

  • Type:
    • string
    • array
    • object
  • SubType: string
  • Dynamic: ✔️
  • Required: ✔️

Labels to add to the current execution.

The value should result in a list of labels or a labelKey:labelValue map

Outputs

Definitions

io.kestra.core.models.Label

Properties

key
  • Type: string
  • Dynamic:
  • Required: ✔️
value
  • Type: string
  • Dynamic:
  • Required: ✔️

Was this page helpful?