R2Bucket
Creates and manages Cloudflare R2 Buckets for object storage with S3-compatible API.Props
string
Name of the bucket. Names can only contain lowercase letters (a-z), numbers (0-9), and hyphens (-).
string
Optional location hint for the bucket. Indicates the primary geographical location data will be accessed from.
Standard | InfrequentAccess
Optional storage class for the bucket.
default | eu | fedramp
Optional jurisdiction for the bucket. Determines the regulatory jurisdiction the bucket data falls under.
boolean
default:"false"
Whether to allow public access through the r2.dev subdomain. Only for development purposes - use custom domains for production.
string | R2BucketCustomDomainOptions | (string | R2BucketCustomDomainOptions)[]
The custom domain(s) to attach to the bucket.
boolean
default:"true"
Whether to delete the bucket when the resource is removed from Alchemy.
boolean
default:"false"
Whether to empty the bucket and delete all objects during resource deletion.
boolean
default:"false"
Whether to adopt an existing bucket with the same name if it exists.
R2BucketCORSRule[]
CORS rules for the bucket.
R2BucketLifecycleRule[]
Lifecycle rules for the bucket.
boolean
Enable data catalog for bucket.
Output
string
The name of the bucket.
string
Location of the bucket.
Date
Time at which the bucket was created.
string
The
r2.dev subdomain for the bucket, if devDomain is true.string[]
The custom domains for the bucket, if applicable.
r2_bucket
Type identifier for the binding.