1import type * as DynamoDB from "@distilled.cloud/aws/dynamodb";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Table } from "./Table.ts";
5
6export 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 */
27export 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<
36 DynamoDB.DescribeExportOutput,
37 DynamoDB.DescribeExportError
38 >
39 >
40> {}
41export const DescribeExport = Binding.Service<DescribeExport>(
42 "AWS.DynamoDB.DescribeExport",
43);