|
| 1 | +--- |
| 2 | +{} |
| 3 | +--- |
| 4 | + |
| 5 | +import { AnchorHeading } from "~/components"; |
| 6 | + |
| 7 | +<AnchorHeading title="`create`" slug="hyperdrive-create" depth={3} /> |
| 8 | + |
| 9 | +Create a new Hyperdrive configuration. |
| 10 | + |
| 11 | +```txt |
| 12 | +wrangler hyperdrive create <CONFIG_NAME> [OPTIONS] |
| 13 | +``` |
| 14 | + |
| 15 | +- `CONFIG_NAME` string required |
| 16 | + - The name of the Hyperdrive configuration to create. |
| 17 | +- `--connection-string` string optional |
| 18 | + - The database connection string in the form `postgres://user:password@hostname:port/database`. |
| 19 | +- `--host` string optional |
| 20 | + - The hostname or IP address Hyperdrive should connect to. |
| 21 | +- `--port` number optional |
| 22 | + - The database port to connect to. |
| 23 | +- `--scheme` string optional |
| 24 | + - The scheme used to connect to the origin database, for example, postgresql or postgres. |
| 25 | +- `--database` string optional |
| 26 | + - The database (name) to connect to. For example, Postgres or defaultdb. |
| 27 | +- `--user` string optional |
| 28 | + - The username used to authenticate to the database. |
| 29 | +- `--password` string optional |
| 30 | + - The password used to authenticate to the database. |
| 31 | +- `--access-client-id` string 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 `port`. |
| 33 | +- `--access-client-secret` string 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 `port`. |
| 35 | +- `--caching-disabled` boolean optional |
| 36 | + - Disables the caching of SQL responses. |
| 37 | +- `--max-age` number optional |
| 38 | + - Specifies max duration for which items should persist in the cache, cannot be set when caching is disabled. |
| 39 | +- `--swr` number 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 | + |
| 42 | +<AnchorHeading title="`update`" slug="hyperdrive-update" depth={3} /> |
| 43 | + |
| 44 | +Update an existing Hyperdrive configuration. |
| 45 | + |
| 46 | +```txt |
| 47 | +wrangler hyperdrive update <ID> [OPTIONS] |
| 48 | +``` |
| 49 | + |
| 50 | +- `ID` string required |
| 51 | + - The ID of the Hyperdrive configuration to update. |
| 52 | +- `--name` string optional |
| 53 | + - The new name of the Hyperdrive configuration. |
| 54 | +- `--origin-host` string optional |
| 55 | + - The new database hostname or IP address Hyperdrive should connect to. |
| 56 | +- `--origin-port` string optional |
| 57 | + - The new database port to connect to. |
| 58 | +- `--database` string optional |
| 59 | + - The new database (name) to connect to. For example, Postgres or defaultdb. |
| 60 | +- `--origin-user` string optional |
| 61 | + - The new username used to authenticate to the database. |
| 62 | +- `--origin-password` string optional |
| 63 | + - The new password used to authenticate to the database. |
| 64 | +- `--access-client-id` string optional |
| 65 | + - 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`. |
| 66 | +- `--access-client-secret` string optional |
| 67 | + - 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`. |
| 68 | +- `--caching-disabled` boolean optional |
| 69 | + - Disables the caching of SQL responses. |
| 70 | +- `--max-age` number optional |
| 71 | + - Specifies max duration for which items should persist in the cache, cannot be set when caching is disabled. |
| 72 | +- `--swr` number optional |
| 73 | + - Stale While Revalidate - Indicates the number of seconds cache may serve the response after it becomes stale, cannot be set when caching is disabled. |
| 74 | + |
| 75 | +<AnchorHeading title="`list`" slug="hyperdrive-list" depth={3} /> |
| 76 | + |
| 77 | +List all Hyperdrive configurations. |
| 78 | + |
| 79 | +```txt |
| 80 | +wrangler hyperdrive list |
| 81 | +``` |
| 82 | + |
| 83 | +<AnchorHeading title="`delete`" slug="hyperdrive-delete" depth={3} /> |
| 84 | + |
| 85 | +Delete an existing Hyperdrive configuration. |
| 86 | + |
| 87 | +```txt |
| 88 | +wrangler hyperdrive delete <ID> |
| 89 | +``` |
| 90 | + |
| 91 | +- `ID` string required |
| 92 | + - The name of the Hyperdrive configuration to delete. |
| 93 | + |
| 94 | +<AnchorHeading title="`get`" slug="hyperdrive-get" depth={3} /> |
| 95 | + |
| 96 | +Get an existing Hyperdrive configuration. |
| 97 | + |
| 98 | +```txt |
| 99 | +wrangler hyperdrive get <ID> |
| 100 | +``` |
| 101 | + |
| 102 | +- `ID` string required |
| 103 | + - The name of the Hyperdrive configuration to get. |
0 commit comments