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

main
ts 38 lines 1.33 KB
Raw
1 import type * as DynamoDB from "@distilled.cloud/aws/dynamodb";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Table } from "./Table.ts";
5
6 export interface DescribeExportRequest extends DynamoDB.DescribeExportInput {}
7
8 /**
9 * Runtime binding for `dynamodb:DescribeExport`.
10 *
11 * Bind this operation to a `Table` inside a function runtime to get a callable
12 * that reads the status of one of the bound table's S3 exports by ARN. The
13 * IAM grant covers every export of the bound table (`{tableArn}/export/*`).
14 * Provide the `DescribeExportHttp` layer on the Function to satisfy the
15 * binding.
16 * ### Exporting to S3
17 * **Example:** Poll an Export Until It Completes
18 * ```typescript
19 * const describeExport = yield* AWS.DynamoDB.DescribeExport(table);
20 *
21 * const response = yield* describeExport({ ExportArn: exportArn });
22 * const status = response.ExportDescription?.ExportStatus;
23 * ```
24 *
25 * @binding
26 */
27 export interface DescribeExport extends Binding.Service<
28 DescribeExport,
29 "AWS.DynamoDB.DescribeExport",
30 <T extends Table>(
31 table: T,
32 ) => Effect.Effect<
33 (
34 request: DescribeExportRequest,
35 ) => Effect.Effect<DynamoDB.DescribeExportOutput, DynamoDB.DescribeExportError>
36 >
37 > {}
38 export const DescribeExport = Binding.Service<DescribeExport>("AWS.DynamoDB.DescribeExport");