Kv
Reference doc for the `sst.cloudflare.Kv` component.
The Kv
component lets you add a Cloudflare KV storage namespace to
your app.
Minimal example
Link to a worker
You can link KV to a worker.
Once linked, you can use the SDK to interact with the bucket.
Constructor
Parameters
-
name
string
-
args?
KvArgs
-
opts?
ComponentResourceOptions
KvArgs
transform?
Type Object
Transform how this component creates its underlying resources.
transform.namespace?
Type WorkersKvNamespaceArgs
|
(
args
:
WorkersKvNamespaceArgs
=>
void
)
Transform the R2 KV namespace resource.
Properties
id
Type Output
<
string
>
The generated id of the KV namespace.
nodes
nodes.namespace
Type WorkersKvNamespace
The Cloudflare KV namespace.