Skip to content

Commit 8cd419a

Browse files
committed
Updated docs for new wrangler commands
1 parent a8392d1 commit 8cd419a

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/content/docs/pipelines/destinations/r2.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ If this is your first time using Pipelines, follow the instructions in the [get
1818
To create or update a Pipeline using Wrangler, run the following command in a terminal:
1919

2020
```sh
21-
npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME]
21+
npx wrangler pipelines create [PIPELINE-NAME] --r2-bucket [R2-BUCKET-NAME]
2222
```
2323

2424
After running this command, you'll be prompted to authorize Cloudflare Workers Pipelines to create R2 API tokens on your behalf. These tokens are required by your Pipeline. Your Pipeline uses the tokens when loading data into your bucket. You can approve the request through the browser link which will open automatically.
2525

2626
If you prefer not to authenticate this way, you may pass your [R2 API Tokens](/r2/api/s3/tokens/) to Wrangler:
2727
```sh
28-
npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME] --access-key-id [ACCESS-KEY-ID] --secret-access-key [SECRET-ACCESS-KEY]
28+
npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME] --r2-access-key-id [ACCESS-KEY-ID] --r2-secret-access-key [SECRET-ACCESS-KEY]
2929
```
3030

3131
## Deliver partitioned data
@@ -46,7 +46,7 @@ You can specify an optional prefix for all the output files stored in your speci
4646

4747
To modify the prefix for a Pipeline using Wrangler:
4848
```sh
49-
wrangler pipelines update <pipeline-name> --prefix "test"
49+
wrangler pipelines update <pipeline-name> --r2-prefix "test"
5050
```
5151

5252
All the output records generated by your pipeline will be stored under the prefix "test", and will look like this:

src/content/docs/pipelines/get-started.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ To create a Pipeline using Wrangler, run the following command in a terminal, an
4343
- The name of the R2 bucket you created in step 1
4444

4545
```sh
46-
npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME]
46+
npx wrangler pipelines create [PIPELINE-NAME] --r2-bucket [R2-BUCKET-NAME] --batch-max-seconds 5 --compression none
4747
```
4848

4949
After running this command, you'll be prompted to authorize Cloudflare Workers Pipelines to create R2 API tokens on your behalf. These tokens are required by your Pipeline. Your Pipeline uses the tokens when loading data into your bucket. You can approve the request through the browser link which will open automatically.
5050

5151
If you prefer not to authenticate this way, you may pass your [R2 API Tokens](/r2/api/s3/tokens/) to Wrangler:
5252
```sh
53-
npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME] --access-key-id [ACCESS-KEY-ID] --secret-access-key [SECRET-ACCESS-KEY]
53+
npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME] --r2-access-key-id [ACCESS-KEY-ID] --r2-secret-access-key [SECRET-ACCESS-KEY]
5454
```
5555

5656
When choosing a name for your Pipeline:
@@ -60,6 +60,8 @@ When choosing a name for your Pipeline:
6060
3. The name cannot contain special characters outside dashes (`-`).
6161
4. The name must start and end with a letter or a number.
6262

63+
You'll notice that we have set two optional flags while creating the pipeline: `--batch-max-seconds` and `--compression`. We've added these flags to make it faster for you to see the output of your first Pipeline. For production use cases, we recommend keeping the default settings.
64+
6365
Once you create your Pipeline, you will receive a HTTP endpoint which you can post data to. You should see output as shown below:
6466

6567
```sh output
@@ -68,7 +70,7 @@ Once you create your Pipeline, you will receive a HTTP endpoint which you can po
6870
✅ Successfully created pipeline [PIPELINE-NAME] with ID [PIPELINE-ID]
6971

7072
You can now send data to your pipeline with:
71-
curl "https://<PIPELINE-ID>.pipelines.cloudflare.com/" -d '[{ ...JSON_DATA... }]'
73+
curl "https://<PIPELINE-ID>.pipelines.cloudflare.com/" -d '[{ "foo":"bar }]'
7274
```
7375

7476
## 3. Post data to your pipeline
@@ -87,7 +89,7 @@ Pipelines handle batching the data, so you can continue posting data to the Pipe
8789

8890
## 4. Verify in R2
8991

90-
Go to the R2 bucket you created in step 1 via [the Cloudflare dashboard](https://dash.cloudflare.com/). You should see a prefix for today's date. Click through, and you will see a file created containing the JSON data you posted in step 3.
92+
Go to the R2 bucket you created in step 1 via [the Cloudflare dashboard](https://dash.cloudflare.com/). You should see a prefix for today's date. Click through, and you will see a file created containing the JSON data you posted in step 3. You will be able to preview the file, and verify that the data you posted in step 2 is present in the file.
9193

9294
## Summary
9395

src/content/docs/pipelines/sources/http.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Pipelines support ingesting data via HTTP. When you create a new Pipeline, you'l
1414

1515

1616
```sh
17-
$ npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME] --access-key-id [ACCESS-KEY-ID] --secret-access-key [SECRET-ACCESS-KEY]
17+
$ npx wrangler pipelines create [PIPELINE-NAME] --r2-bucket [R2-BUCKET-NAME]
1818

1919
🌀 Creating pipeline named "[PIPELINE-NAME]"
2020
✅ Successfully created pipeline [PIPELINE-NAME] with ID [PIPELINE-ID]
@@ -27,16 +27,16 @@ You can now send data to your pipeline with:
2727
By default, ingestion via HTTP is turned on for all Pipelines. You can turn it off by setting `--http false` when creating or updating a Pipeline.
2828

2929
```sh
30-
$ npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME] --access-key-id [ACCESS-KEY-ID] --secret-access-key [SECRET-ACCESS-KEY] --http false
30+
$ npx wrangler pipelines create [PIPELINE-NAME] --r2-bucket [R2-BUCKET-NAME] --enable-http false
3131
```
3232

3333
Ingestion URLs are tied to your Pipeline ID. Turning HTTP off, and then turning it back on, will not change the URL.
3434

3535
## Authentication
3636
You can secure your HTTP ingestion endpoint using Cloudflare API tokens. By default, authentication is turned off. To enable authentication, use `--authentication true` while creating or updating a Pipeline.
3737

38-
```
39-
$ npx wrangler pipelines create [PIPELINE-NAME] --r2 [R2-BUCKET-NAME] --access-key-id [ACCESS-KEY-ID] --secret-access-key [SECRET-ACCESS-KEY] --authentication true
38+
```sh
39+
$ npx wrangler pipelines create [PIPELINE-NAME] --r2-bucket [R2-BUCKET-NAME] --require-http-auth true
4040
```
4141

4242
Once authentication is turned on, you will need to include a Cloudflare API token in your request headers.

0 commit comments

Comments
 (0)