1import type * as bda from "@distilled.cloud/aws/bedrock-data-automation";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { DataAutomationLibrary } from "./DataAutomationLibrary.ts";
5
6/**
7 * `GetDataAutomationLibraryIngestionJob` request with `libraryArn` injected
8 * from the bound {@link DataAutomationLibrary}.
9 */
10export interface GetDataAutomationLibraryIngestionJobRequest extends Omit<
11 bda.GetDataAutomationLibraryIngestionJobRequest,
12 "libraryArn"
13> {}
14
15/**
16 * Runtime binding for the `GetDataAutomationLibraryIngestionJob` operation
17 * (IAM action `bedrock:GetDataAutomationLibraryIngestionJob` on the library
18 * ARN) — poll the status of a library ingestion job from a deployed
19 * Function.
20 *
21 * Provide the implementation with
22 * `Effect.provide(AWS.BedrockDataAutomation.GetDataAutomationLibraryIngestionJobHttp)`.
23 * ### Library Ingestion
24 * **Example:** Poll An Ingestion Job
25 * ```typescript
26 * // deploy time — bind the library
27 * const getJob =
28 * yield* AWS.BedrockDataAutomation.GetDataAutomationLibraryIngestionJob(library);
29 *
30 * // runtime — check the job started by the ingestion binding
31 * const { job } = yield* getJob({ jobArn });
32 * if (job?.jobStatus === "COMPLETED") {
33 * yield* Effect.log(`ingestion results at ${job.outputConfiguration.s3Uri}`);
34 * }
35 * ```
36 *
37 * @binding
38 */
39export interface GetDataAutomationLibraryIngestionJob extends Binding.Service<
40 GetDataAutomationLibraryIngestionJob,
41 "AWS.BedrockDataAutomation.GetDataAutomationLibraryIngestionJob",
42 (
43 library: DataAutomationLibrary,
44 ) => Effect.Effect<
45 (
46 request: GetDataAutomationLibraryIngestionJobRequest,
47 ) => Effect.Effect<
48 bda.GetDataAutomationLibraryIngestionJobResponse,
49 bda.GetDataAutomationLibraryIngestionJobError
50 >
51 >
52> {}
53export const GetDataAutomationLibraryIngestionJob =
54 Binding.Service<GetDataAutomationLibraryIngestionJob>(
55 "AWS.BedrockDataAutomation.GetDataAutomationLibraryIngestionJob",
56 );