🚀 New! Kestra raises $3 million to grow Learn more

Set Set

yaml
type: "io.kestra.core.tasks.states.Set"

Set a state in the state store.

Values will be merged:

  • If you provide a new key, the new key will be added
  • If you provide an existing key, the previous key will be overwrite

Examples

Set the default state for the current flow

yaml
id: setState
type: io.kestra.core.tasks.states.Set
data:
  '{{ inputs.store }}': '{{ outputs.download.md5 }}'

Set the myState state for the current flow

yaml
id: setState
type: io.kestra.core.tasks.states.Set
name: myState
data:
  '{{ inputs.store }}': '{{ outputs.download.md5 }}'

Properties

name

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Default: default

The name of state file

data

  • Type: object
  • Dynamic: ✔️
  • Required:

The data to save into the state

namespace

  • Type: boolean
  • Dynamic: ✔️
  • Required:
  • Default: false

Share state for the current namespace

By default, the state is isolated by namespace and flow, setting to true will allow to share the state between the same namespace

taskrunValue

  • Type: boolean
  • Dynamic: ✔️
  • Required:
  • Default: true

Isolate with taskrun.value the state

By default, the taskrun.value (during iteration with each) will isolated the state, setting to false will allow to use the same one for iteration.

Outputs

count

  • Type: integer
  • Default: 0

The count of properties found in the state

uri

  • Type: string

The uri of the current state