Set a JSON type value for a given Redis key.
Set a JSON type value for a new key or update the current key value with a new one.
type: "io.kestra.plugin.redis.json.Set"Examples
Set a JSON value.
id: redis_json_set
namespace: company.team
inputs:
  - id: key_name
    type: STRING
    displayName: Key Name
  - id: key_value
    type: STRING
    displayName: Key Value
tasks:
  - id: set
    type: io.kestra.plugin.redis.json.Set
    url: redis://:redis@localhost:6379/0
    key: "{{ inputs.key_name }}"
    value: |
      {
        "name": "{{ inputs.key_value }}"
      }
Properties
key *Requiredstring
The redis key you want to set.
url *Requiredstring
The connection string.
value *Requiredobject
The value you want to set as type JSON.
get booleanstring
falseDefine if you get the older value in response, does not work with Redis 5.X.
options Non-dynamicSet-Options
{
  "mustNotExist": "false",
  "mustExist": "false"
}Options available when setting a key in Redis.
See redis documentation.
path string
$JSON path to extract value (default is root '$')
Outputs
oldValue object
Old value
The old value if you replaced an existing key Required Get to true
Definitions
io.kestra.plugin.redis.json.Set-Options
mustExist booleanstring
falseOnly set the key if it already exist.
mustNotExist booleanstring
falseOnly set the key if it does not already exist.