@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 56 lines 1.97 KB
Raw
1 import type * as bda from "@distilled.cloud/aws/bedrock-data-automation";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { DataAutomationLibrary } from "./DataAutomationLibrary.ts";
5
6 /**
7 * `GetDataAutomationLibraryIngestionJob` request with `libraryArn` injected
8 * from the bound {@link DataAutomationLibrary}.
9 */
10 export 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 */
39 export 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 > {}
53 export const GetDataAutomationLibraryIngestionJob =
54 Binding.Service<GetDataAutomationLibraryIngestionJob>(
55 "AWS.BedrockDataAutomation.GetDataAutomationLibraryIngestionJob",
56 );