INTEGRITY Cloudflare Docs

R2

Manage your R2 configurations using Wrangler.

r2 bucket

Interact with buckets in an R2 store.

r2 bucket create

Create a new R2 bucket

npx wrangler r2 bucket create [NAME]

Global flags

r2 bucket info

Get information about an R2 bucket

npx wrangler r2 bucket info [BUCKET]

Global flags

r2 bucket delete

Delete an R2 bucket

npx wrangler r2 bucket delete [BUCKET]

Global flags

r2 bucket list

List R2 buckets

npx wrangler r2 bucket list

Global flags

r2 bucket catalog enable

Enable the data catalog on an R2 bucket

npx wrangler r2 bucket catalog enable [BUCKET]

Global flags

r2 bucket catalog disable

Disable the data catalog for an R2 bucket

npx wrangler r2 bucket catalog disable [BUCKET]

Global flags

r2 bucket catalog get

Get the status of the data catalog for an R2 bucket

npx wrangler r2 bucket catalog get [BUCKET]

Global flags

r2 bucket catalog compaction enable

Enable automatic file compaction for your R2 data catalog or a specific table

npx wrangler r2 bucket catalog compaction enable [BUCKET] [NAMESPACE] [TABLE]

Global flags

Examples:

# Enable catalog-level compaction (requires token)
npx wrangler r2 bucket catalog compaction enable my-bucket --token <TOKEN>

# Enable table-level compaction
npx wrangler r2 bucket catalog compaction enable my-bucket my-namespace my-table --target-size 256

r2 bucket catalog compaction disable

Disable automatic file compaction for your R2 data catalog or a specific table

npx wrangler r2 bucket catalog compaction disable [BUCKET] [NAMESPACE] [TABLE]

Global flags

Examples:

# Disable catalog-level compaction
npx wrangler r2 bucket catalog compaction disable my-bucket

# Disable table-level compaction
npx wrangler r2 bucket catalog compaction disable my-bucket my-namespace my-table

r2 bucket catalog snapshot-expiration enable

Enable automatic snapshot expiration for your R2 data catalog or a specific table

npx wrangler r2 bucket catalog snapshot-expiration enable [BUCKET] [NAMESPACE] [TABLE]

Global flags

r2 bucket catalog snapshot-expiration disable

Disable automatic snapshot expiration for your R2 data catalog or a specific table

npx wrangler r2 bucket catalog snapshot-expiration disable [BUCKET] [NAMESPACE] [TABLE]

Global flags

r2 bucket cors set

Set the CORS configuration for an R2 bucket from a JSON file

npx wrangler r2 bucket cors set [BUCKET]

Global flags

r2 bucket cors delete

Clear the CORS configuration for an R2 bucket

npx wrangler r2 bucket cors delete [BUCKET]

Global flags

r2 bucket cors list

List the CORS rules for an R2 bucket

npx wrangler r2 bucket cors list [BUCKET]

Global flags

r2 bucket dev-url enable

Enable public access via the r2.dev URL for an R2 bucket

npx wrangler r2 bucket dev-url enable [BUCKET]

Global flags

r2 bucket dev-url disable

Disable public access via the r2.dev URL for an R2 bucket

npx wrangler r2 bucket dev-url disable [BUCKET]

Global flags

r2 bucket dev-url get

Get the r2.dev URL and status for an R2 bucket

npx wrangler r2 bucket dev-url get [BUCKET]

Global flags

r2 bucket domain add

Connect a custom domain to an R2 bucket

npx wrangler r2 bucket domain add [BUCKET]

Global flags

r2 bucket domain remove

Remove a custom domain from an R2 bucket

npx wrangler r2 bucket domain remove [BUCKET]

Global flags

r2 bucket domain update

Update settings for a custom domain connected to an R2 bucket

npx wrangler r2 bucket domain update [BUCKET]

Global flags

r2 bucket domain get

Get custom domain connected to an R2 bucket

npx wrangler r2 bucket domain get [BUCKET]

Global flags

r2 bucket domain list

List custom domains for an R2 bucket

npx wrangler r2 bucket domain list [BUCKET]

Global flags

r2 bucket lifecycle add

Add a lifecycle rule to an R2 bucket

npx wrangler r2 bucket lifecycle add [BUCKET] [NAME] [PREFIX]

Global flags

r2 bucket lifecycle remove

Remove a lifecycle rule from an R2 bucket

npx wrangler r2 bucket lifecycle remove [BUCKET]

Global flags

r2 bucket lifecycle list

List lifecycle rules for an R2 bucket

npx wrangler r2 bucket lifecycle list [BUCKET]

Global flags

r2 bucket lifecycle set

Set the lifecycle configuration for an R2 bucket from a JSON file

npx wrangler r2 bucket lifecycle set [BUCKET]

Global flags

r2 bucket lock add

Add a lock rule to an R2 bucket

npx wrangler r2 bucket lock add [BUCKET] [NAME] [PREFIX]

Global flags

r2 bucket lock remove

Remove a bucket lock rule from an R2 bucket

npx wrangler r2 bucket lock remove [BUCKET]

Global flags

r2 bucket lock list

List lock rules for an R2 bucket

npx wrangler r2 bucket lock list [BUCKET]

Global flags

r2 bucket lock set

Set the lock configuration for an R2 bucket from a JSON file

npx wrangler r2 bucket lock set [BUCKET]

Global flags

r2 bucket notification create

Create an event notification rule for an R2 bucket

npx wrangler r2 bucket notification create [BUCKET]

Global flags

r2 bucket notification delete

Delete an event notification rule from an R2 bucket

npx wrangler r2 bucket notification delete [BUCKET]

Global flags

r2 bucket notification list

List event notification rules for an R2 bucket

npx wrangler r2 bucket notification list [BUCKET]

Global flags

r2 bucket sippy enable

Enable Sippy on an R2 bucket

npx wrangler r2 bucket sippy enable [NAME]

Global flags

r2 bucket sippy disable

Disable Sippy on an R2 bucket

npx wrangler r2 bucket sippy disable [NAME]

Global flags

r2 bucket sippy get

Check the status of Sippy on an R2 bucket

npx wrangler r2 bucket sippy get [NAME]

Global flags

r2 object

Interact with R2 objects.

r2 object get

Fetch an object from an R2 bucket

npx wrangler r2 object get [OBJECTPATH]

Global flags

r2 object put

Create an object in an R2 bucket

npx wrangler r2 object put [OBJECTPATH]

Global flags

r2 object delete

Delete an object in an R2 bucket

npx wrangler r2 object delete [OBJECTPATH]

Global flags

R2 SQL

r2 sql query

Execute SQL query against R2 Data Catalog

npx wrangler r2 sql query [WAREHOUSE] [QUERY]

Global flags