From b03296da39252bb34fb81c9d75b7d4254bbda6d2 Mon Sep 17 00:00:00 2001 From: Phillip Jones Date: Fri, 25 Oct 2024 19:35:06 -0700 Subject: [PATCH 1/3] Documented Wrangler commands for listing, adding, removing, and updating R2 bucket custom domains --- .../docs/workers/wrangler/commands.mdx | 74 ++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx index 5c83a133acd38e6..b28352c6f9171a3 100644 --- a/src/content/docs/workers/wrangler/commands.mdx +++ b/src/content/docs/workers/wrangler/commands.mdx @@ -932,6 +932,74 @@ List R2 bucket in the current account. wrangler r2 bucket list ``` +### `domain add` + +Connect a [custom domain](/r2/buckets/public-buckets/#custom-domains) to an R2 bucket. + +```txt +wrangler r2 bucket domain add [OPTIONS] +``` + +- `NAME` + - The name of the R2 bucket to connect a custom domain to. +- `--domain` + - The custom domain to connect to the R2 bucket. +- `--zone-id` + - The [zone ID](/fundamentals/setup/find-account-and-zone-ids/) associated with the custom domain. +- `--enabled` + - Whether to enable public access at the custom domain (default is enabled). +- `--min-tls` + - Set the minimum TLS version for the custom domain (defaults to 1.0 if not set). +- `--jurisdiction` + - The jurisdiction where the bucket exists, if a jurisdiction has been specified. Refer to [jurisdictional restrictions](/r2/reference/data-location/#jurisdictional-restrictions). + +### `domain remove` + +Remove a [custom domain](/r2/buckets/public-buckets/#custom-domains) from an R2 bucket. + +```txt +wrangler r2 bucket domain remove [OPTIONS] +``` + +- `NAME` + - The name of the R2 bucket to remove the custom domain from. +- `--domain` + - The custom domain to remove from the R2 bucket. +- `--jurisdiction` + - The jurisdiction where the bucket exists, if a jurisdiction has been specified. Refer to [jurisdictional restrictions](/r2/reference/data-location/#jurisdictional-restrictions). + +### `domain update` + +Update settings for a [custom domain](/r2/buckets/public-buckets/#custom-domains) connected to an R2 bucket. + +```txt +wrangler r2 bucket domain update [OPTIONS] +``` + +- `NAME` + - The name of the R2 bucket associated with the custom domain to update. +- `--domain` + - The custom domain whose settings will be updated. +- `--enabled` + - Enable or disable public access at the custom domain. +- `--min-tls` + - Update the minimum TLS version for the custom domain. +- `--jurisdiction` + - The jurisdiction where the bucket exists, if a jurisdiction has been specified. Refer to [jurisdictional restrictions](/r2/reference/data-location/#jurisdictional-restrictions). + +### `domain list` + +List [custom domains](/r2/buckets/public-buckets/#custom-domains) for an R2 bucket. + +```txt +wrangler r2 bucket domain list [OPTIONS] +``` + +- `NAME` + - The name of the R2 bucket whose connected custom domains will be listed. +- `--jurisdiction` + - The jurisdiction where the bucket exists, if a jurisdiction has been specified. Refer to [jurisdictional restrictions](/r2/reference/data-location/#jurisdictional-restrictions). + ### `notification create` Create an [event notification](/r2/buckets/event-notifications/) rule for an R2 bucket. @@ -998,7 +1066,7 @@ wrangler r2 bucket sippy enable [OPTIONS] - `--r2-secret-access-key` - Your R2 Secret Access Key. Requires read and write access. - `--jurisdiction` - - The jurisdiction where this R2 bucket is located, if a jurisdiction has been specified. Refer to [Jurisdictional Restrictions](/r2/reference/data-location/#jurisdictional-restrictions). + - The jurisdiction where the bucket exists, if a jurisdiction has been specified. Refer to [jurisdictional restrictions](/r2/reference/data-location/#jurisdictional-restrictions). - **AWS S3 provider-specific options:** - `--key-id` - Your AWS Access Key ID. Requires [read and list access](/r2/data-migration/sippy/#amazon-s3). @@ -1270,7 +1338,7 @@ wrangler workflows list ``` - `--page` - - Show a specific page from the listing. You can configure page size using "per-page". + - Show a specific page from the listing. You can configure page size using "per-page". - `--per-page` - Configure the maximum number of Workflows to show per page. @@ -1306,6 +1374,7 @@ wrangler workflows instances describe [OPTIONS] # Passing `latest` instead of an explicit ID will describe the most recently queued instance wrangler workflows instances describe my-workflow latest ``` + ```sh output Workflow Name: my-workflow Instance Id: 51c73fc8-7fd5-47d9-bd82-9e301506ee72 @@ -1371,6 +1440,7 @@ wrangler workflows describe [OPTIONS] ### `trigger` Trigger (create) a Workflow instance. + ```sh wrangler workflows trigger [OPTIONS] ``` From 3f3b4d867a66b9e01c4aebc6df9d73c9acdf1a69 Mon Sep 17 00:00:00 2001 From: Phillip Jones Date: Fri, 25 Oct 2024 21:50:47 -0700 Subject: [PATCH 2/3] Added documentation for force option in R2 bucket domain remove command --- src/content/docs/workers/wrangler/commands.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx index b28352c6f9171a3..de8439f70b0594e 100644 --- a/src/content/docs/workers/wrangler/commands.mdx +++ b/src/content/docs/workers/wrangler/commands.mdx @@ -967,6 +967,8 @@ wrangler r2 bucket domain remove [OPTIONS] - The custom domain to remove from the R2 bucket. - `--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 removing the custom domain. ### `domain update` From 25424f9a905dde5e843ecfabd9e03d3cfcc0fba5 Mon Sep 17 00:00:00 2001 From: Phillip Jones Date: Mon, 28 Oct 2024 08:22:07 -0700 Subject: [PATCH 3/3] Remove documentation for enabled option in R2 bucket domain commands --- src/content/docs/workers/wrangler/commands.mdx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx index de8439f70b0594e..330359590e37418 100644 --- a/src/content/docs/workers/wrangler/commands.mdx +++ b/src/content/docs/workers/wrangler/commands.mdx @@ -946,12 +946,12 @@ wrangler r2 bucket domain add [OPTIONS] - The custom domain to connect to the R2 bucket. - `--zone-id` - The [zone ID](/fundamentals/setup/find-account-and-zone-ids/) associated with the custom domain. -- `--enabled` - - Whether to enable public access at the custom domain (default is enabled). - `--min-tls` - Set the minimum TLS version for the custom domain (defaults to 1.0 if not set). - `--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 adding the custom domain. ### `domain remove` @@ -982,8 +982,6 @@ wrangler r2 bucket domain update [OPTIONS] - The name of the R2 bucket associated with the custom domain to update. - `--domain` - The custom domain whose settings will be updated. -- `--enabled` - - Enable or disable public access at the custom domain. - `--min-tls` - Update the minimum TLS version for the custom domain. - `--jurisdiction` @@ -1376,7 +1374,6 @@ wrangler workflows instances describe [OPTIONS] # Passing `latest` instead of an explicit ID will describe the most recently queued instance wrangler workflows instances describe my-workflow latest ``` - ```sh output Workflow Name: my-workflow Instance Id: 51c73fc8-7fd5-47d9-bd82-9e301506ee72 @@ -1442,7 +1439,6 @@ wrangler workflows describe [OPTIONS] ### `trigger` Trigger (create) a Workflow instance. - ```sh wrangler workflows trigger [OPTIONS] ```