Skip to content

Commit e2531df

Browse files
Oxyjunmaxvp
authored andcommitted
Using WranglerCommand component for Hyperdrive (#24597)
1 parent 2691cc1 commit e2531df

File tree

1 file changed

+6
-124
lines changed

1 file changed

+6
-124
lines changed

src/content/partials/workers/wrangler-commands/hyperdrive.mdx

Lines changed: 6 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -2,132 +2,14 @@
22
{}
33
---
44

5-
import { AnchorHeading, Type, MetaInfo, Render } from "~/components";
5+
import { AnchorHeading, Type, MetaInfo, Render, WranglerCommand } from "~/components";
66

7-
<AnchorHeading title="`create`" slug="hyperdrive-create" depth={3} />
7+
<WranglerCommand command="hyperdrive create" />
88

9-
Create a new Hyperdrive configuration.
9+
<WranglerCommand command="hyperdrive update" />
1010

11-
```txt
12-
wrangler hyperdrive create <CONFIG_NAME> [OPTIONS]
13-
```
11+
<WranglerCommand command="hyperdrive list" />
1412

15-
- `CONFIG_NAME` <Type text="string" /> <MetaInfo text="required" />
16-
- The name of the Hyperdrive configuration to create.
17-
- `--connection-string` <Type text="string" /> <MetaInfo text="optional" />
18-
- The database connection string in the form `postgres://user:password@hostname:port/database`.
19-
- `--origin-host` <Type text="string" /> <MetaInfo text="optional" />
20-
- The hostname or IP address Hyperdrive should connect to.
21-
- `--origin-port` <Type text="number" /> <MetaInfo text="optional" />
22-
- The database port to connect to.
23-
- `--origin-scheme` <Type text="string" /> <MetaInfo text="optional" />
24-
- The scheme used to connect to the origin database, for example, postgresql or postgres.
25-
- `--database` <Type text="string" /> <MetaInfo text="optional" />
26-
- The database (name) to connect to. For example, Postgres or defaultdb.
27-
- `--origin-user` <Type text="string" /> <MetaInfo text="optional" />
28-
- The username used to authenticate to the database.
29-
- `--origin-password` <Type text="string" /> <MetaInfo text="optional" />
30-
- The password used to authenticate to the database.
31-
- `--access-client-id` <Type text="string" /> <MetaInfo text="optional" />
32-
- The Client ID of the Access token to use when connecting to the origin database, must be set with a Client Access Secret. Mutually exclusive with `origin-port`.
33-
- `--access-client-secret` <Type text="string" /> <MetaInfo text="optional" />
34-
- The Client Secret of the Access token to use when connecting to the origin database, must be set with a Client Access ID. Mutually exclusive with `origin-port`.
35-
- `--caching-disabled` <Type text="boolean" /> <MetaInfo text="optional" />
36-
- Disables the caching of SQL responses.
37-
- `--max-age` <Type text="number" /> <MetaInfo text="optional" />
38-
- Specifies max duration for which items should persist in the cache, cannot be set when caching is disabled.
39-
- `--swr` <Type text="number" /> <MetaInfo text="optional" />
40-
- Stale While Revalidate - Indicates the number of seconds cache may serve the response after it becomes stale, cannot be set when caching is disabled.
41-
- `--ca-certificate-id` <Type text="string" /> <MetaInfo text="optional" />
42-
- Sets custom CA certificate when connecting to origin database.
43-
- `--mtls-certificate-id` <Type text="string" /> <MetaInfo text="optional" />
44-
- Sets custom mTLS client certificates when connecting to origin database.
45-
- `--sslmode` <Type text="string" /> <MetaInfo text="optional" />
46-
- Sets SSL mode for CA verification. Must be `require` | `verify-ca` | `verify-full`.
47-
- `--origin-connection-limit` <Type text="number" /> <MetaInfo text="optional" />
48-
- The (soft) maximum number of connections that Hyperdrive may establish to the origin database.
13+
<WranglerCommand command="hyperdrive delete" />
4914

50-
<Render file="wrangler-commands/global-flags" product="workers" />
51-
52-
<AnchorHeading title="`update`" slug="hyperdrive-update" depth={3} />
53-
54-
Update an existing Hyperdrive configuration.
55-
56-
```txt
57-
wrangler hyperdrive update <ID> [OPTIONS]
58-
```
59-
60-
- `ID` <Type text="string" /> <MetaInfo text="required" />
61-
- The ID of the Hyperdrive configuration to update.
62-
- `--name` <Type text="string" /> <MetaInfo text="optional" />
63-
- The new name of the Hyperdrive configuration.
64-
- `--connection-string` <Type text="string" /> <MetaInfo text="optional" />
65-
- The database connection string in the form `postgres://user:password@hostname:port/database`.
66-
- `--origin-host` <Type text="string" /> <MetaInfo text="optional" />
67-
- The new database hostname or IP address Hyperdrive should connect to.
68-
- `--origin-port` <Type text="string" /> <MetaInfo text="optional" />
69-
- The new database port to connect to.
70-
- `--origin-scheme` <Type text="string" /> <MetaInfo text="optional" />
71-
- The scheme used to connect to the origin database, for example, postgresql or postgres.
72-
- `--database` <Type text="string" /> <MetaInfo text="optional" />
73-
- The new database (name) to connect to. For example, Postgres or defaultdb.
74-
- `--origin-user` <Type text="string" /> <MetaInfo text="optional" />
75-
- The new username used to authenticate to the database.
76-
- `--origin-password` <Type text="string" /> <MetaInfo text="optional" />
77-
- The new password used to authenticate to the database.
78-
- `--access-client-id` <Type text="string" /> <MetaInfo text="optional" />
79-
- The Client ID of the Access token to use when connecting to the origin database, must be set with a Client Access Secret. Mutually exclusive with `origin-port`.
80-
- `--access-client-secret` <Type text="string" /> <MetaInfo text="optional" />
81-
- The Client Secret of the Access token to use when connecting to the origin database, must be set with a Client Access ID. Mutually exclusive with `origin-port`.
82-
- `--caching-disabled` <Type text="boolean" /> <MetaInfo text="optional" />
83-
- Disables the caching of SQL responses.
84-
- `--max-age` <Type text="number" /> <MetaInfo text="optional" />
85-
- Specifies max duration for which items should persist in the cache, cannot be set when caching is disabled.
86-
- `--swr` <Type text="number" /> <MetaInfo text="optional" />
87-
- Stale While Revalidate - Indicates the number of seconds cache may serve the response after it becomes stale, cannot be set when caching is disabled.
88-
- `--ca-certificate-id` <Type text="string" /> <MetaInfo text="optional" />
89-
- Sets custom CA certificate when connecting to origin database.
90-
- `--mtls-certificate-id` <Type text="string" /> <MetaInfo text="optional" />
91-
- Sets custom mTLS client certificates when connecting to origin database.
92-
- `--sslmode` <Type text="string" /> <MetaInfo text="optional" />
93-
- Sets SSL mode for CA verification. Must be `require` | `verify-ca` | `verify-full`.
94-
- `--origin-connection-limit` <Type text="number" /> <MetaInfo text="optional" />
95-
- The (soft) maximum number of connections that Hyperdrive may establish to the origin database.
96-
97-
<Render file="wrangler-commands/global-flags" product="workers" />
98-
99-
<AnchorHeading title="`list`" slug="hyperdrive-list" depth={3} />
100-
101-
List all Hyperdrive configurations.
102-
103-
```txt
104-
wrangler hyperdrive list
105-
```
106-
107-
<Render file="wrangler-commands/global-flags" product="workers" />
108-
109-
<AnchorHeading title="`delete`" slug="hyperdrive-delete" depth={3} />
110-
111-
Delete an existing Hyperdrive configuration.
112-
113-
```txt
114-
wrangler hyperdrive delete <ID>
115-
```
116-
117-
- `ID` <Type text="string" /> <MetaInfo text="required" />
118-
- The name of the Hyperdrive configuration to delete.
119-
120-
<Render file="wrangler-commands/global-flags" product="workers" />
121-
122-
<AnchorHeading title="`get`" slug="hyperdrive-get" depth={3} />
123-
124-
Get an existing Hyperdrive configuration.
125-
126-
```txt
127-
wrangler hyperdrive get <ID>
128-
```
129-
130-
- `ID` <Type text="string" /> <MetaInfo text="required" />
131-
- The name of the Hyperdrive configuration to get.
132-
133-
<Render file="wrangler-commands/global-flags" product="workers" />
15+
<WranglerCommand command="hyperdrive get" />

0 commit comments

Comments
 (0)