| 1 | import type * as glue from "@distilled.cloud/aws/glue"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Table } from "./Table.ts"; |
| 5 | |
| 6 | export interface BatchUpdatePartitionRequest extends Omit< |
| 7 | glue.BatchUpdatePartitionRequest, |
| 8 | "DatabaseName" | "TableName" | "CatalogId" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `glue:BatchUpdatePartition`. |
| 13 | * |
| 14 | * Rewrites up to 100 partitions of the bound {@link Table} in one call — the |
| 15 | * bulk variant of `UpdatePartition`. Per-partition failures come back in the |
| 16 | * response's `Errors` list. The database/table names and catalog id are |
| 17 | * injected from the binding. Provide the implementation with |
| 18 | * `Effect.provide(AWS.Glue.BatchUpdatePartitionHttp)`. |
| 19 | * ### Managing Partitions |
| 20 | * **Example:** Bulk-Update Partition Parameters |
| 21 | * ```typescript |
| 22 | * // init |
| 23 | * const batchUpdatePartition = yield* AWS.Glue.BatchUpdatePartition(table); |
| 24 | * |
| 25 | * // runtime |
| 26 | * const { Errors } = yield* batchUpdatePartition({ |
| 27 | * Entries: [ |
| 28 | * { |
| 29 | * PartitionValueList: ["2026-01-01"], |
| 30 | * PartitionInput: { |
| 31 | * Values: ["2026-01-01"], |
| 32 | * Parameters: { compacted: "true" }, |
| 33 | * }, |
| 34 | * }, |
| 35 | * ], |
| 36 | * }); |
| 37 | * ``` |
| 38 | * |
| 39 | * @binding |
| 40 | */ |
| 41 | export interface BatchUpdatePartition extends Binding.Service< |
| 42 | BatchUpdatePartition, |
| 43 | "AWS.Glue.BatchUpdatePartition", |
| 44 | ( |
| 45 | table: Table, |
| 46 | ) => Effect.Effect< |
| 47 | ( |
| 48 | request: BatchUpdatePartitionRequest, |
| 49 | ) => Effect.Effect< |
| 50 | glue.BatchUpdatePartitionResponse, |
| 51 | glue.BatchUpdatePartitionError |
| 52 | > |
| 53 | > |
| 54 | > {} |
| 55 | |
| 56 | export const BatchUpdatePartition = Binding.Service<BatchUpdatePartition>( |
| 57 | "AWS.Glue.BatchUpdatePartition", |
| 58 | ); |