diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx index 688dbf9f236adc..287e98312bef09 100644 --- a/src/content/docs/workers/wrangler/commands.mdx +++ b/src/content/docs/workers/wrangler/commands.mdx @@ -1012,6 +1012,57 @@ wrangler r2 bucket list +### `cors set` + +Set the [CORS configuration](/r2/buckets/cors/) for an R2 bucket from a JSON file. + +```txt +wrangler r2 bucket cors set [OPTIONS] +``` + +- `NAME` + - The name of the R2 bucket to set the CORS configuration for. +- `--file` + - Path to the JSON file containing CORS configuration (file must be in format of request body of [put bucket CORS policy API](/api/operations/r2-put-bucket-cors-policy)). +- `--jurisdiction` + - The jurisdiction where the bucket exists, if a jurisdiction has been specified. Refer to [jurisdictional restrictions](/r2/reference/data-location/#jurisdictional-restrictions). +- `--force` + - Skip confirmation when setting CORS configuration. + + + +### `cors delete` + +Clear the [CORS configuration](/r2/buckets/cors/) for an R2 bucket. + +```txt +wrangler r2 bucket cors delete [OPTIONS] +``` + +- `NAME` + - The name of the R2 bucket to delete the CORS configuration for. +- `--jurisdiction` + - The jurisdiction where the bucket exists, if a jurisdiction has been specified. Refer to [jurisdictional restrictions](/r2/reference/data-location/#jurisdictional-restrictions). +- `--force` + - Skip confirmation when clearing the CORS configuration. + + + +### `cors list` + +List the [CORS configuration](/r2/buckets/cors/) rules for an R2 bucket. + +```txt +wrangler r2 bucket cors list [OPTIONS] +``` + +- `NAME` + - The name of the R2 bucket to list the CORS rules for. +- `--jurisdiction` + - The jurisdiction where the bucket exists, if a jurisdiction has been specified. Refer to [jurisdictional restrictions](/r2/reference/data-location/#jurisdictional-restrictions). + + + ### `dev-url enable` Enable public access via the [r2.dev URL](/r2/buckets/public-buckets/#enable-managed-public-access) for an R2 bucket. @@ -1137,59 +1188,6 @@ wrangler r2 bucket domain list [OPTIONS] -### `notification create` - -Create an [event notification](/r2/buckets/event-notifications/) rule for an R2 bucket. - -```txt -wrangler r2 bucket notification create [OPTIONS] -``` - -- `NAME` - - The name of the R2 bucket to create an event notification rule for. -- `--event-type` - - The [type of event(s)](/r2/buckets/event-notifications/#event-types) that will trigger event notifications. -- `--queue` - - The name of the queue that will receive event notification messages. -- `--prefix` - - The prefix that an object must match to emit event notifications (note: regular expressions are not supported). -- `--suffix` - - The suffix that an object must match to emit event notifications (note: regular expressions are not supported). -- `--description` - - A description that can be used to identify the event notification rule after creation. - - - -### `notification delete` - -Remove an event notification rule from a bucket's [event notification](/r2/buckets/event-notifications/) configuration. - -```txt -wrangler r2 bucket notification delete [OPTIONS] -``` - -- `NAME` - - The name of the R2 bucket to delete an event notification rule for. -- `--queue` - - The name of the queue that corresponds to the event notification rule. If no `rule` is provided, all event notification rules associated with the queue will be deleted. -- `--rule` - - The ID of the event notification rule to delete. - - - -### `notification list` - -List the [event notification](/r2/buckets/event-notifications/) rules for a bucket. - -```txt -wrangler r2 bucket notification list -``` - -- `NAME` - - The name of the R2 bucket to get event notification rules for. - - - ### `lifecycle add` Add an [object lifecycle](/r2/buckets/object-lifecycles/) rule to an R2 bucket. @@ -1267,6 +1265,61 @@ wrangler r2 bucket lifecycle set [OPTIONS] - Path to the JSON file containing lifecycle configuration (file must be in format of request body of [put object lifecycle configuration API](/api/operations/r2-put-bucket-lifecycle-configuration)). - `--jurisdiction` - The jurisdiction where the bucket exists, if a jurisdiction has been specified. Refer to [jurisdictional restrictions](/r2/reference/data-location/#jurisdictional-restrictions). +- `--force` + - Skip confirmation when setting object lifecycle configuration. + + + +### `notification create` + +Create an [event notification](/r2/buckets/event-notifications/) rule for an R2 bucket. + +```txt +wrangler r2 bucket notification create [OPTIONS] +``` + +- `NAME` + - The name of the R2 bucket to create an event notification rule for. +- `--event-type` + - The [type of event(s)](/r2/buckets/event-notifications/#event-types) that will trigger event notifications. +- `--queue` + - The name of the queue that will receive event notification messages. +- `--prefix` + - The prefix that an object must match to emit event notifications (note: regular expressions are not supported). +- `--suffix` + - The suffix that an object must match to emit event notifications (note: regular expressions are not supported). +- `--description` + - A description that can be used to identify the event notification rule after creation. + + + +### `notification delete` + +Remove an event notification rule from a bucket's [event notification](/r2/buckets/event-notifications/) configuration. + +```txt +wrangler r2 bucket notification delete [OPTIONS] +``` + +- `NAME` + - The name of the R2 bucket to delete an event notification rule for. +- `--queue` + - The name of the queue that corresponds to the event notification rule. If no `rule` is provided, all event notification rules associated with the queue will be deleted. +- `--rule` + - The ID of the event notification rule to delete. + + + +### `notification list` + +List the [event notification](/r2/buckets/event-notifications/) rules for a bucket. + +```txt +wrangler r2 bucket notification list +``` + +- `NAME` + - The name of the R2 bucket to get event notification rules for. @@ -2063,7 +2116,7 @@ wrangler queues info ``` - `name` - - The name of the queue to inspect. + - The name of the queue to inspect. ### `consumer`