| 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 { Job } from "./Job.ts"; |
| 5 | |
| 6 | export interface ResetJobBookmarkRequest extends Omit< |
| 7 | glue.ResetJobBookmarkRequest, |
| 8 | "JobName" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `glue:ResetJobBookmark`. |
| 13 | * |
| 14 | * Resets the bound {@link Job}'s bookmark entry so the next bookmarked run |
| 15 | * reprocesses the source data from the beginning — the standard remediation |
| 16 | * after a bad deploy consumed data incorrectly. The job name is injected |
| 17 | * from the binding. Provide the implementation with |
| 18 | * `Effect.provide(AWS.Glue.ResetJobBookmarkHttp)`. |
| 19 | * ### Job Bookmarks |
| 20 | * **Example:** Reset the Bookmark |
| 21 | * ```typescript |
| 22 | * // init |
| 23 | * const resetJobBookmark = yield* AWS.Glue.ResetJobBookmark(job); |
| 24 | * |
| 25 | * // runtime |
| 26 | * yield* resetJobBookmark(); |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface ResetJobBookmark extends Binding.Service< |
| 32 | ResetJobBookmark, |
| 33 | "AWS.Glue.ResetJobBookmark", |
| 34 | ( |
| 35 | job: Job, |
| 36 | ) => Effect.Effect< |
| 37 | ( |
| 38 | request?: ResetJobBookmarkRequest, |
| 39 | ) => Effect.Effect< |
| 40 | glue.ResetJobBookmarkResponse, |
| 41 | glue.ResetJobBookmarkError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const ResetJobBookmark = Binding.Service<ResetJobBookmark>( |
| 47 | "AWS.Glue.ResetJobBookmark", |
| 48 | ); |