Labels Labels

yaml
type: "io.kestra.core.tasks.executions.Labels"

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

Examples

Add labels based on a webhook payload

yaml
id: webhook-based-labels
namespace: com.company
tasks:
  - id: update-labels-with-map
    type: io.kestra.core.tasks.executions.Labels
    labels:
      customerId: "{{trigger.body.customerId}}"
  - id: by-list
    type: io.kestra.core.tasks.executions.Labels
    labels:
      - key: orderId
        value: "{{trigger.body.orderId}}"
      - key: orderType
        value: "{{trigger.body.orderType}}"
triggers:
  - id: webhook
    key: order-webhook
    type: io.kestra.core.models.triggers.types.Webhook
    conditions:
      - type: io.kestra.core.models.conditions.types.VariableCondition
        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

Definitions

io.kestra.core.models.Label

Properties

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