| 1 | import type * as bda from "@distilled.cloud/aws/bedrock-data-automation"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { DataAutomationLibrary } from "./DataAutomationLibrary.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `GetDataAutomationLibraryEntity` request with `libraryArn` injected from |
| 8 | * the bound {@link DataAutomationLibrary}. |
| 9 | */ |
| 10 | export interface GetDataAutomationLibraryEntityRequest extends Omit< |
| 11 | bda.GetDataAutomationLibraryEntityRequest, |
| 12 | "libraryArn" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for the `GetDataAutomationLibraryEntity` operation (IAM |
| 17 | * action `bedrock:GetDataAutomationLibraryEntity` on the library ARN) — |
| 18 | * read a single entity (e.g. a `VOCABULARY` entry with its phrases) from the |
| 19 | * bound library. |
| 20 | * |
| 21 | * Provide the implementation with |
| 22 | * `Effect.provide(AWS.BedrockDataAutomation.GetDataAutomationLibraryEntityHttp)`. |
| 23 | * ### Library Entities |
| 24 | * **Example:** Read A Vocabulary Entity |
| 25 | * ```typescript |
| 26 | * // deploy time — bind the library |
| 27 | * const getEntity = |
| 28 | * yield* AWS.BedrockDataAutomation.GetDataAutomationLibraryEntity(library); |
| 29 | * |
| 30 | * // runtime — fetch the entity written by an ingestion job |
| 31 | * const { entity } = yield* getEntity({ |
| 32 | * entityType: "VOCABULARY", |
| 33 | * entityId, |
| 34 | * }); |
| 35 | * ``` |
| 36 | * |
| 37 | * @binding |
| 38 | */ |
| 39 | export interface GetDataAutomationLibraryEntity extends Binding.Service< |
| 40 | GetDataAutomationLibraryEntity, |
| 41 | "AWS.BedrockDataAutomation.GetDataAutomationLibraryEntity", |
| 42 | ( |
| 43 | library: DataAutomationLibrary, |
| 44 | ) => Effect.Effect< |
| 45 | ( |
| 46 | request: GetDataAutomationLibraryEntityRequest, |
| 47 | ) => Effect.Effect< |
| 48 | bda.GetDataAutomationLibraryEntityResponse, |
| 49 | bda.GetDataAutomationLibraryEntityError |
| 50 | > |
| 51 | > |
| 52 | > {} |
| 53 | export const GetDataAutomationLibraryEntity = |
| 54 | Binding.Service<GetDataAutomationLibraryEntity>( |
| 55 | "AWS.BedrockDataAutomation.GetDataAutomationLibraryEntity", |
| 56 | ); |