Bucket
Reference doc for the `sst.cloudflare.Bucket` component.
The Bucket
component lets you add a Cloudflare R2 Bucket to
your app.
Minimal example
Link to a worker
You can link the bucket to a worker.
Once linked, you can use the SDK to interact with the bucket.
Constructor
Parameters
-
name
string
-
args?
BucketArgs
-
opts?
ComponentResourceOptions
BucketArgs
transform?
transform.bucket?
Type R2BucketArgs
|
(
args
:
R2BucketArgs
,
opts
:
ComponentResourceOptions
,
name
:
string
)
=>
void
Transform the R2 Bucket resource.
Properties
name
Type Output
<
string
>
The generated name of the R2 Bucket.
nodes
nodes.bucket
Type R2Bucket
The Cloudflare R2 Bucket.
SDK
Use the SDK in your runtime to interact with your infrastructure.
Bindings
When you link a bucket to a worker, you can interact with it using these Bucket methods.