1import type * as glue from "@distilled.cloud/aws/glue";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Table } from "./Table.ts";
5
6export interface BatchGetPartitionRequest extends Omit<
7 glue.BatchGetPartitionRequest,
8 "DatabaseName" | "TableName" | "CatalogId"
9> {}
10
11/**
12 * Runtime binding for `glue:BatchGetPartition`.
13 *
14 * Reads up to 1000 partitions of the bound {@link Table} by their partition
15 * values in one call — the bulk variant of `GetPartition`. Values that don't
16 * resolve come back in `UnprocessedKeys`. The database/table names and
17 * catalog id are injected from the binding. Provide the implementation with
18 * `Effect.provide(AWS.Glue.BatchGetPartitionHttp)`.
19 * ### Managing Partitions
20 * **Example:** Bulk-Read Partitions
21 * ```typescript
22 * // init
23 * const batchGetPartition = yield* AWS.Glue.BatchGetPartition(table);
24 *
25 * // runtime
26 * const { Partitions } = yield* batchGetPartition({
27 * PartitionsToGet: [{ Values: ["2026-01-01"] }, { Values: ["2026-01-02"] }],
28 * });
29 * ```
30 *
31 * @binding
32 */
33export interface BatchGetPartition extends Binding.Service<
34 BatchGetPartition,
35 "AWS.Glue.BatchGetPartition",
36 (
37 table: Table,
38 ) => Effect.Effect<
39 (
40 request: BatchGetPartitionRequest,
41 ) => Effect.Effect<
42 glue.BatchGetPartitionResponse,
43 glue.BatchGetPartitionError
44 >
45 >
46> {}
47
48export const BatchGetPartition = Binding.Service<BatchGetPartition>(
49 "AWS.Glue.BatchGetPartition",
50);