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

main
ts 47 lines 1.49 KB
Raw
1 import type * as glue from "@distilled.cloud/aws/glue";
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 BatchDeletePartitionRequest extends Omit<
7 glue.BatchDeletePartitionRequest,
8 "DatabaseName" | "TableName" | "CatalogId"
9 > {}
10
11 /**
12 * Runtime binding for `glue:BatchDeletePartition`.
13 *
14 * Deletes up to 25 partitions of the bound {@link Table} in one call — the
15 * bulk variant of `DeletePartition` for retention sweeps. Per-partition
16 * failures come back in the response's `Errors` list. The database/table
17 * names and catalog id are injected from the binding. Provide the
18 * implementation with `Effect.provide(AWS.Glue.BatchDeletePartitionHttp)`.
19 * ### Managing Partitions
20 * **Example:** Expire Old Partitions
21 * ```typescript
22 * // init
23 * const batchDeletePartition = yield* AWS.Glue.BatchDeletePartition(table);
24 *
25 * // runtime
26 * const { Errors } = yield* batchDeletePartition({
27 * PartitionsToDelete: expired.map((dt) => ({ Values: [dt] })),
28 * });
29 * ```
30 *
31 * @binding
32 */
33 export interface BatchDeletePartition extends Binding.Service<
34 BatchDeletePartition,
35 "AWS.Glue.BatchDeletePartition",
36 (
37 table: Table,
38 ) => Effect.Effect<
39 (
40 request: BatchDeletePartitionRequest,
41 ) => Effect.Effect<glue.BatchDeletePartitionResponse, glue.BatchDeletePartitionError>
42 >
43 > {}
44
45 export const BatchDeletePartition = Binding.Service<BatchDeletePartition>(
46 "AWS.Glue.BatchDeletePartition",
47 );