Wrangler commands (9)·续2

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

r2 bucket lifecycle list

List lifecycle rules for an R2 bucket

npmyarnpnpm

npx wrangler r2 bucket lifecycle list <BUCKET>
yarn wrangler r2 bucket lifecycle list <BUCKET>
pnpm wrangler r2 bucket lifecycle list <BUCKET>
  • <BUCKET> string required

The name of the R2 bucket to list lifecycle rules for - --jurisdiction string alias: --J

The jurisdiction where the bucket exists

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

r2 bucket lifecycle set

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

npmyarnpnpm

npx wrangler r2 bucket lifecycle set <BUCKET>
yarn wrangler r2 bucket lifecycle set <BUCKET>
pnpm wrangler r2 bucket lifecycle set <BUCKET>
  • <BUCKET> string required

The name of the R2 bucket to set lifecycle configuration for - --file string required

Path to the JSON file containing lifecycle configuration - --jurisdiction string alias: --J

The jurisdiction where the bucket exists - --force boolean alias: --ydefault: false

Skip confirmation and Basin Catalog validation prompt

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

r2 bucket lock add

Add a lock rule to an R2 bucket

npmyarnpnpm

npx wrangler r2 bucket lock add <BUCKET> [NAME] [PREFIX]
yarn wrangler r2 bucket lock add <BUCKET> [NAME] [PREFIX]
pnpm wrangler r2 bucket lock add <BUCKET> [NAME] [PREFIX]
  • <BUCKET> string required

The name of the R2 bucket to add a bucket lock rule to - [NAME] string alias: --id

A unique name for the bucket lock rule, used to identify and manage it. - [PREFIX] string Prefix condition for the bucket lock rule (set to "" for all prefixes) - --retention-days number Number of days which objects will be retained for - --retention-date string Date after which objects will be retained until (YYYY-MM-DD) - --retention-indefinite boolean Retain objects indefinitely - --jurisdiction string alias: --J

The jurisdiction where the bucket exists - --force boolean alias: --ydefault: false

Skip confirmation

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

r2 bucket lock remove

Remove a bucket lock rule from an R2 bucket

npmyarnpnpm

npx wrangler r2 bucket lock remove <BUCKET>
yarn wrangler r2 bucket lock remove <BUCKET>
pnpm wrangler r2 bucket lock remove <BUCKET>
  • <BUCKET> string required

The name of the R2 bucket to remove a bucket lock rule from - --name string alias: --idrequired

The unique name of the bucket lock rule to remove - --jurisdiction string alias: --J

The jurisdiction where the bucket exists

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

r2 bucket lock list

List lock rules for an R2 bucket

npmyarnpnpm

npx wrangler r2 bucket lock list <BUCKET>
yarn wrangler r2 bucket lock list <BUCKET>
pnpm wrangler r2 bucket lock list <BUCKET>
  • <BUCKET> string required

The name of the R2 bucket to list lock rules for - --jurisdiction string alias: --J

The jurisdiction where the bucket exists

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

r2 bucket lock set

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

npmyarnpnpm

npx wrangler r2 bucket lock set <BUCKET>
yarn wrangler r2 bucket lock set <BUCKET>
pnpm wrangler r2 bucket lock set <BUCKET>
  • <BUCKET> string required

The name of the R2 bucket to set lock configuration for - --file string required

Path to the JSON file containing lock configuration - --jurisdiction string alias: --J

The jurisdiction where the bucket exists - --force boolean alias: --ydefault: false

Skip confirmation

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

r2 bucket notification create

Create an event notification rule for an R2 bucket

npmyarnpnpm

npx wrangler r2 bucket notification create <BUCKET>
yarn wrangler r2 bucket notification create <BUCKET>
pnpm wrangler r2 bucket notification create <BUCKET>
  • <BUCKET> string required

The name of the R2 bucket to create an event notification rule for - --event-types "object-create" | "object-delete" alias: --event-typerequired

The type of event(s) that will emit event notifications - --prefix string The prefix that an object must match to emit event notifications (note: regular expressions not supported) - --suffix string The suffix that an object must match to emit event notifications (note: regular expressions not supported) - --queue string required

The name of the queue that will receive event notification messages - --jurisdiction string alias: --J

The jurisdiction where the bucket exists - --description string A description that can be used to identify the event notification rule after creation

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

r2 bucket notification delete

Delete an event notification rule from an R2 bucket

npmyarnpnpm

npx wrangler r2 bucket notification delete <BUCKET>
yarn wrangler r2 bucket notification delete <BUCKET>
pnpm wrangler r2 bucket notification delete <BUCKET>
  • <BUCKET> string required

The name of the R2 bucket to delete an event notification rule for - --queue string required

The name of the queue that corresponds to the event notification rule. If no rule is provided, all event notification rules associated with the bucket and queue will be deleted - --rule string The ID of the event notification rule to delete - --jurisdiction string alias: --J

The jurisdiction where the bucket exists

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

r2 bucket notification list

List event notification rules for an R2 bucket

npmyarnpnpm

npx wrangler r2 bucket notification list <BUCKET>
yarn wrangler r2 bucket notification list <BUCKET>
pnpm wrangler r2 bucket notification list <BUCKET>
  • <BUCKET> string required

The name of the R2 bucket to get event notification rules for - --jurisdiction string alias: --J

The jurisdiction where the bucket exists

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e