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.
yaml
type: "io.kestra.plugin.redis.json.Set"
Set a JSON value.
yaml
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 }}"
}
Dynamic
YES
The redis key you want to set.
Dynamic
YES
The connection string.
Dynamic
YES
The value you want to set as type JSON.
Dynamic
NO
Default
false
Define if you get the older value in response, does not work with Redis 5.X.
Dynamic
NO
Default
{
"mustNotExist": "false",
"mustExist": "false"
}
Options available when setting a key in Redis.
See redis documentation.
Dynamic
YES
Default
$
JSON path to extract value (default is root '$')
Old value
The old value if you replaced an existing key Required Get to true
Dynamic
NO
Default
false
Only set the key if it already exist.
Dynamic
NO
Default
false
Only set the key if it does not already exist.