Skip to content

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

Fields

FieldTypeRequiredDescription
namespace ConnectionstringFully-qualified Worker KV namespace (format: tenant:namespace, e.g. acme:deployments/my-deployment).
operation OperationOperationOperation to perform when emitting an event.

Connection

Show fields
FieldTypeRequiredDescription
namespacestringFully-qualified Worker KV namespace (format: tenant:namespace, e.g. acme:deployments/my-deployment).

Operation

Show fields
FieldTypeRequiredDescription
operationOperationOperation to perform when emitting an event.

Schema

Operation Options

OptionNameTypeDescription
setSetobject
set-if-absentSet If Absentobject
deleteDeleteobject
add-to-setAdd To Setobject
remove-from-setRemove From Setobject
ack-batchAck Batchobject

Operation - Set Fields

FieldTypeRequiredDescription
keystringKey to set within the namespace.
value-fieldfield (string)JSON pointer (or dotted path) to extract value from event; defaults to entire event.
Examples: data_field
ttl-msnumber (integer)Optional TTL in milliseconds.
Examples: 42, 1.2e-10

Operation - Set If Absent Fields

FieldTypeRequiredDescription
keystringKey to set when currently missing.
value-fieldfield (string)JSON pointer (or dotted path) to extract value from event; defaults to entire event.
Examples: data_field
ttl-msnumber (integer)Optional TTL in milliseconds.
Examples: 42, 1.2e-10

Operation - Delete Fields

FieldTypeRequiredDescription
keystringKey to delete within the namespace.

Operation - Add To Set Fields

FieldTypeRequiredDescription
setstringWorkset name to add members to.
member-fieldfield (string)Pointer selecting the member identifier (defaults to full event).
Examples: data_field
value-fieldfield (string)Pointer selecting the payload to store with the member (defaults to full event).
Examples: data_field
lease-ttl-msnumber (integer)Optional lease TTL in milliseconds (used when immediately leasing member).
Examples: 42, 1.2e-10

Operation - Remove From Set Fields

FieldTypeRequiredDescription
setstringWorkset name to delete from.
member-fieldfield (string)Pointer selecting the member identifier (defaults to full event).
Examples: data_field

Operation - Ack Batch Fields

FieldTypeRequiredDescription
setstringWorkset name associated with the batch handle.
batch-handle-fieldfield (string)Pointer selecting the batch handle emitted by the corresponding input.
Examples: data_field