Skip to content

Type Alias: AttachRequest

type AttachRequest =
| Omit<ConnectDatabaseRequest, "engine">
| {
accountId: string;
databaseId: string;
engine: "d1";
name?: string;
token: string;
};

Defined in: packages/sdk/src/index.ts:353

Body for client.attach() — a Postgres connection string, or a Cloudflare D1’s API token + account id + database id (GLOBAL-043). Secrets ride the body only.