Worker KV
Worker KV (worker-kv)
Mutate the deployments-managed Worker KV store.
Storage json raw
Minimal example
output: worker-kv: namespace: ~ operation: set: key: ~JSON
{ "output": { "worker-kv": { "namespace": null, "operation": { "set": { "key": null } } } }}Contents
Connection
Connection
| Field | Type | Required | Description |
|---|---|---|---|
namespace | string | ✅ | Fully-qualified Worker KV namespace (format: tenant:namespace, e.g. acme:deployments/my-deployment). |
Operation
Operation
| Field | Type | Required | Description |
|---|---|---|---|
operation | Worker KV Output Operation | ✅ | Operation to perform when emitting an event. Allowed values: set, set-if-absent, delete, add-to-set, remove-from-set, ack-batch |
Schema
- Worker KV Output Operation Options
- Worker KV Output Operation - Set Fields
- Worker KV Output Operation - Set If Absent Fields
- Worker KV Output Operation - Delete Fields
- Worker KV Output Operation - Add To Set Fields
- Worker KV Output Operation - Remove From Set Fields
- Worker KV Output Operation - Ack Batch Fields
Worker KV Output Operation Options
| Option | Name | Type | Description |
|---|---|---|---|
set | Set | object | |
set-if-absent | Set If Absent | object | |
delete | Delete | object | |
add-to-set | Add To Set | object | |
remove-from-set | Remove From Set | object | |
ack-batch | Ack Batch | object |
Worker KV Output Operation - Set Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | string | ✅ | Key to set within the namespace. |
value-field | field (string) | JSON pointer (or dotted path) to extract value from event; defaults to entire event. Examples: data_field | |
ttl-ms | number (integer) | Optional TTL in milliseconds. Examples: 42, 1.2e-10 |
Worker KV Output Operation - Set If Absent Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | string | ✅ | Key to set when currently missing. |
value-field | field (string) | JSON pointer (or dotted path) to extract value from event; defaults to entire event. Examples: data_field | |
ttl-ms | number (integer) | Optional TTL in milliseconds. Examples: 42, 1.2e-10 |
Worker KV Output Operation - Delete Fields
| Field | Type | Required | Description |
|---|---|---|---|
key | string | ✅ | Key to delete within the namespace. |
Worker KV Output Operation - Add To Set Fields
| Field | Type | Required | Description |
|---|---|---|---|
set | string | ✅ | Workset name to add members to. |
member-field | field (string) | Pointer selecting the member identifier (defaults to full event). Examples: data_field | |
value-field | field (string) | Pointer selecting the payload to store with the member (defaults to full event). Examples: data_field | |
lease-ttl-ms | number (integer) | Optional lease TTL in milliseconds (used when immediately leasing member). Examples: 42, 1.2e-10 |
Worker KV Output Operation - Remove From Set Fields
| Field | Type | Required | Description |
|---|---|---|---|
set | string | ✅ | Workset name to delete from. |
member-field | field (string) | Pointer selecting the member identifier (defaults to full event). Examples: data_field |
Worker KV Output Operation - Ack Batch Fields
| Field | Type | Required | Description |
|---|---|---|---|
set | string | ✅ | Workset name associated with the batch handle. |
batch-handle-field | field (string) | ✅ | Pointer selecting the batch handle emitted by the corresponding input. Examples: data_field |