Skip to content

Commit 0e09b6e

Browse files
authored
Implementing partials for R2 Wrangler commands. (#19218)
1 parent 5a33f31 commit 0e09b6e

File tree

20 files changed

+520
-567
lines changed

20 files changed

+520
-567
lines changed

src/content/changelogs/r2.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ entries:
1919
- Public buckets accessible via custom domain now support Smart [Tiered Cache](/r2/buckets/public-buckets/#caching).
2020
- publish_date: "2024-11-19"
2121
description: |-
22-
- R2 [`bucket lifecycle` command](/workers/wrangler/commands/#lifecycle-add) added to Wrangler. Supports listing, adding, and removing object lifecycle rules.
22+
- R2 [`bucket lifecycle` command](/workers/wrangler/commands/#r2-bucket-lifecycle-add) added to Wrangler. Supports listing, adding, and removing object lifecycle rules.
2323
- publish_date: "2024-11-14"
2424
description: |-
25-
- R2 [`bucket info` command](/workers/wrangler/commands/#info-2) added to Wrangler. Displays location of bucket and common metrics.
25+
- R2 [`bucket info` command](/workers/wrangler/commands/r2-bucket-info) added to Wrangler. Displays location of bucket and common metrics.
2626
- publish_date: "2024-11-08"
2727
description: |-
28-
- R2 [`bucket dev-url` command](/workers/wrangler/commands/#dev-url-enable) added to Wrangler. Supports enabling, disabling, and getting status of bucket's [r2.dev public access URL](/r2/buckets/public-buckets/#enable-managed-public-access).
28+
- R2 [`bucket dev-url` command](/workers/wrangler/commands/#r2-bucket-dev-url-enable) added to Wrangler. Supports enabling, disabling, and getting status of bucket's [r2.dev public access URL](/r2/buckets/public-buckets/#enable-managed-public-access).
2929
- publish_date: "2024-11-06"
3030
description: |-
31-
- R2 [`bucket domain` command](/workers/wrangler/commands/#domain-add) added to Wrangler. Supports listing, adding, removing, and updating [R2 bucket custom domains](/r2/buckets/public-buckets/#custom-domains).
31+
- R2 [`bucket domain` command](/workers/wrangler/commands/#r2-bucket-domain-add) added to Wrangler. Supports listing, adding, removing, and updating [R2 bucket custom domains](/r2/buckets/public-buckets/#custom-domains).
3232
- publish_date: "2024-11-01"
3333
description: |-
3434
- Add `minTLS` to response of [list custom domains](/api/resources/r2/subresources/buckets/subresources/domains/subresources/custom/methods/list/) endpoint.

src/content/docs/ai-gateway/tutorials/deploy-aig-worker.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default {
9494
};
9595
```
9696

97-
To make this work, you need to use [`wrangler secret put`](/workers/wrangler/commands/#put-3) to set your `OPENAI_API_KEY`. This will save the API key to your environment so your Worker can access it when deployed. This key is the API key you created earlier in the OpenAI dashboard:
97+
To make this work, you need to use [`wrangler secret put`](/workers/wrangler/commands/#put) to set your `OPENAI_API_KEY`. This will save the API key to your environment so your Worker can access it when deployed. This key is the API key you created earlier in the OpenAI dashboard:
9898

9999
```sh title="Save your API key to your Workers env"
100100
npx wrangler secret put OPENAI_API_KEY

src/content/docs/learning-paths/workers/get-started/c3-and-wrangler.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You will use C3 for new project creation.
2929

3030
[Wrangler](/workers/wrangler/) is a command-line tool for building with Cloudflare developer products.
3131

32-
With Wrangler, you can [develop](/workers/wrangler/commands/#dev) your Worker locally and remotely, [roll back](/workers/wrangler/commands/#rollback) to a previous deployment of your Worker, [delete](/workers/wrangler/commands/#delete-3) a Worker and its bound Developer Platform resources, and more. Refer to [Wrangler Commands](/workers/wrangler/commands/) to view the full reference of Wrangler commands.
32+
With Wrangler, you can [develop](/workers/wrangler/commands/#dev) your Worker locally and remotely, [roll back](/workers/wrangler/commands/#rollback) to a previous deployment of your Worker, [delete](/workers/wrangler/commands/#delete-1) a Worker and its bound Developer Platform resources, and more. Refer to [Wrangler Commands](/workers/wrangler/commands/) to view the full reference of Wrangler commands.
3333

3434
When you run C3 to create your project, C3 will install the latest version of Wrangler and you do not need to install Wrangler again. You can [update Wrangler](/workers/wrangler/install-and-update/#update-wrangler) to a newer version in your project to access new Wrangler capabilities and features.
3535

src/content/docs/r2/buckets/create-buckets.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The R2 support in Wrangler allows you to manage buckets and perform basic operat
1717

1818
## Bucket-Level Operations
1919

20-
Create a bucket with the [`r2 bucket create`](/workers/wrangler/commands/#create-4) command:
20+
Create a bucket with the [`r2 bucket create`](/workers/wrangler/commands/#r2-bucket-create) command:
2121

2222
```sh
2323
wrangler r2 bucket create your-bucket-name
@@ -31,13 +31,13 @@ The placeholder text is only for the example.
3131

3232
:::
3333

34-
List buckets in the current account with the [`r2 bucket list`](/workers/wrangler/commands/#list-5) command:
34+
List buckets in the current account with the [`r2 bucket list`](/workers/wrangler/commands/#r2-bucket-list) command:
3535

3636
```sh
3737
wrangler r2 bucket list
3838
```
3939

40-
Delete a bucket with the [`r2 bucket delete`](/workers/wrangler/commands/#delete-7) command. Note that the bucket must be empty and all objects must be deleted.
40+
Delete a bucket with the [`r2 bucket delete`](/workers/wrangler/commands/#r2-bucket-delete) command. Note that the bucket must be empty and all objects must be deleted.
4141

4242
```sh
4343
wrangler r2 bucket delete BUCKET_TO_DELETE

src/content/docs/r2/buckets/event-notifications.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To begin, install [`npm`](https://docs.npmjs.com/getting-started). Then [install
3131

3232
#### Enable event notifications on your R2 bucket
3333

34-
Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login). Then add an [event notification rule](/r2/buckets/event-notifications/#event-notification-rules) to your bucket by running the [`r2 bucket notification create` command](/workers/wrangler/commands/#notification-create).
34+
Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login). Then add an [event notification rule](/r2/buckets/event-notifications/#event-notification-rules) to your bucket by running the [`r2 bucket notification create` command](/workers/wrangler/commands/#r2-bucket-notification-create).
3535

3636
```sh
3737
npx wrangler r2 bucket notification create <BUCKET_NAME> --event-type <EVENT_TYPE> --queue <QUEUE_NAME>

src/content/docs/r2/buckets/object-lifecycles.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ For example, you can create an object lifecycle rule to delete objects after 90
1616
- An object is no longer billable once it has been deleted.
1717
- Buckets have a default lifecycle rule to expire multipart uploads seven days after initiation.
1818
- When an object is transitioned from Standard storage to Infrequent Access storage, a [Class A operation](/r2/pricing/#class-a-operations) is incurred.
19-
- When rules conflict and specify both a storage class transition and expire transition within a 24 hour period, the expire (or delete) lifecycle transition takes precedence over transitioning storage class.
19+
- When rules conflict and specify both a storage class transition and expire transition within a 24 hour period, the expire (or delete) lifecycle transition takes precedence over transitioning storage class.
2020

2121
## Configure lifecycle rules for your bucket
2222

@@ -39,13 +39,13 @@ When you create an object lifecycle rule, you can specify which prefix you would
3939
1. Install [`npm`](https://docs.npmjs.com/getting-started).
4040
2. Install [Wrangler, the Developer Platform CLI](/workers/wrangler/install-and-update/).
4141
3. Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login).
42-
4. Add a lifecycle rule to your bucket by running the [`r2 bucket lifecycle add` command](/workers/wrangler/commands/#lifecycle-add).
42+
4. Add a lifecycle rule to your bucket by running the [`r2 bucket lifecycle add` command](/workers/wrangler/commands/#r2-bucket-lifecycle-add).
4343

4444
```sh
4545
npx wrangler r2 bucket lifecycle add <BUCKET_NAME> [OPTIONS]
4646
```
4747

48-
Alternatively you can set the entire lifecycle configuration for a bucket from a JSON file using the [`r2 bucket lifecycle set` command](/workers/wrangler/commands/#lifecycle-set).
48+
Alternatively you can set the entire lifecycle configuration for a bucket from a JSON file using the [`r2 bucket lifecycle set` command](/workers/wrangler/commands/#r2-bucket-lifecycle-set).
4949

5050
```sh
5151
npx wrangler r2 bucket lifecycle set <BUCKET_NAME> --file <FILE_PATH>
@@ -142,7 +142,7 @@ await client
142142

143143
### Wrangler
144144

145-
To get the list of lifecycle rules associated with your bucket, run the [`r2 bucket lifecycle list` command](/workers/wrangler/commands/#lifecycle-list).
145+
To get the list of lifecycle rules associated with your bucket, run the [`r2 bucket lifecycle list` command](/workers/wrangler/commands/#r2-bucket-lifecycle-list).
146146

147147
```sh
148148
npx wrangler r2 bucket lifecycle list <BUCKET_NAME>
@@ -186,7 +186,7 @@ console.log(
186186

187187
### Wrangler
188188

189-
To remove a specific lifecycle rule from your bucket, run the [`r2 bucket lifecycle remove` command](/workers/wrangler/commands/#lifecycle-remove).
189+
To remove a specific lifecycle rule from your bucket, run the [`r2 bucket lifecycle remove` command](/workers/wrangler/commands/#r2-bucket-lifecycle-remove).
190190

191191
```sh
192192
npx wrangler r2 bucket lifecycle remove <BUCKET_NAME> --id <RULE_ID>

src/content/docs/r2/data-migration/sippy.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To begin, install [`npm`](https://docs.npmjs.com/getting-started). Then [install
5656

5757
#### Enable Sippy on your R2 bucket
5858

59-
Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login). Then run the [`r2 bucket sippy enable` command](/workers/wrangler/commands/#sippy-enable):
59+
Log in to Wrangler with the [`wrangler login` command](/workers/wrangler/commands/#login). Then run the [`r2 bucket sippy enable` command](/workers/wrangler/commands/#r2-bucket-sippy-enable):
6060

6161
```sh
6262
npx wrangler r2 bucket sippy enable <BUCKET_NAME>
@@ -127,7 +127,7 @@ You can optionally select a time window to query. This defaults to the last 24 h
127127

128128
### Wrangler
129129

130-
To disable Sippy, run the [`r2 bucket sippy disable` command](/workers/wrangler/commands/#sippy-disable):
130+
To disable Sippy, run the [`r2 bucket sippy disable` command](/workers/wrangler/commands/#r2-bucket-sippy-disable):
131131

132132
```sh
133133
npx wrangler r2 bucket sippy disable <BUCKET_NAME>

src/content/docs/r2/tutorials/summarize-pdf.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ The queue handler now adds the summary to the R2 bucket as a text file.
455455

456456
## 9. Enable event notifications
457457

458-
Your `queue` handler is ready to handle incoming event notification messages. You need to enable event notifications with the [`wrangler r2 bucket notification create` command](/workers/wrangler/commands/#notification-create) for your bucket. The following command creates an event notification for the `object-create` event type for the `pdf` suffix:
458+
Your `queue` handler is ready to handle incoming event notification messages. You need to enable event notifications with the [`wrangler r2 bucket notification create` command](/workers/wrangler/commands/#r2-bucket-notification-create) for your bucket. The following command creates an event notification for the `object-create` event type for the `pdf` suffix:
459459

460460
```sh
461461
npx wrangler r2 bucket notification create <R2_BUCKET_NAME> --event-type object-create --queue pdf-summarizer --suffix "pdf"

src/content/docs/r2/tutorials/upload-logs-event-notifications.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ npx wrangler deploy
148148

149149
## 8. Enable event notifications
150150

151-
Now that you have your consumer Worker ready to handle incoming event notification messages, you need to enable event notifications with the [`wrangler r2 bucket notification create` command](/workers/wrangler/commands/#notification-create) for `example-upload-bucket`:
151+
Now that you have your consumer Worker ready to handle incoming event notification messages, you need to enable event notifications with the [`wrangler r2 bucket notification create` command](/workers/wrangler/commands/#r2-bucket-notification-create) for `example-upload-bucket`:
152152

153153
```sh
154154
npx wrangler r2 bucket notification create example-upload-bucket --event-type object-create --queue example-event-notification-queue

src/content/docs/workers/configuration/secrets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ To add a secret via the dashboard:
5555

5656
#### Via Wrangler
5757

58-
Secrets can be deleted through [`wrangler secret delete`](/workers/wrangler/commands/#delete-7) or [`wrangler versions secret delete`](/workers/wrangler/commands/#secret-delete) commands.
58+
Secrets can be deleted through [`wrangler secret delete`](/workers/wrangler/commands/#delete-2) or [`wrangler versions secret delete`](/workers/wrangler/commands/#secret-delete) commands.
5959

6060
`wrangler secret delete` creates a new version of the Worker and deploys it immediately.
6161

0 commit comments

Comments
 (0)