The best way to control Claude Code, Codex and more from any computer or phone

main
ts 33 lines 1.18 KB
Raw
1 import type * as s3tables from "@distilled.cloud/aws/s3tables";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Table } from "./Table.ts";
5
6 /**
7 * Runtime binding for the `GetTable` operation (IAM action
8 * `s3tables:GetTable` on the table ARN).
9 *
10 * Reads the bound {@link Table}'s details — its current `versionToken`,
11 * `metadataLocation`, `warehouseLocation`, and format. The version token and
12 * metadata location are the inputs to the Iceberg commit protocol (see
13 * {@link UpdateTableMetadataLocation}). Provide the implementation with
14 * `Effect.provide(AWS.S3Tables.GetTableHttp)`.
15 * ### Reading Table Metadata
16 * **Example:** Read the table's current version
17 * ```typescript
18 * const getTable = yield* AWS.S3Tables.GetTable(table);
19 *
20 * const { versionToken, metadataLocation, warehouseLocation } =
21 * yield* getTable();
22 * ```
23 *
24 * @binding
25 */
26 export interface GetTable extends Binding.Service<
27 GetTable,
28 "AWS.S3Tables.GetTable",
29 (
30 table: Table,
31 ) => Effect.Effect<() => Effect.Effect<s3tables.GetTableResponse, s3tables.GetTableError>>
32 > {}
33 export const GetTable = Binding.Service<GetTable>("AWS.S3Tables.GetTable");