| 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 { Blueprint } from "./Blueprint.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `CreateBlueprintVersion` request with `blueprintArn` injected from the |
| 8 | * bound {@link Blueprint}. |
| 9 | */ |
| 10 | export interface CreateBlueprintVersionRequest extends Omit< |
| 11 | bda.CreateBlueprintVersionRequest, |
| 12 | "blueprintArn" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * Runtime binding for the `CreateBlueprintVersion` operation (IAM action |
| 17 | * `bedrock:CreateBlueprintVersion` on the blueprint ARN) — snapshot the |
| 18 | * bound blueprint's current schema as an immutable version from a deployed |
| 19 | * Function. |
| 20 | * |
| 21 | * Provide the implementation with |
| 22 | * `Effect.provide(AWS.BedrockDataAutomation.CreateBlueprintVersionHttp)`. |
| 23 | * ### Blueprint Management |
| 24 | * **Example:** Snapshot The Blueprint |
| 25 | * ```typescript |
| 26 | * // deploy time — bind the blueprint |
| 27 | * const createVersion = |
| 28 | * yield* AWS.BedrockDataAutomation.CreateBlueprintVersion(blueprint); |
| 29 | * |
| 30 | * // runtime — freeze the current schema as a new version |
| 31 | * const { blueprint: version } = yield* createVersion({}); |
| 32 | * yield* Effect.log(`created version ${version.blueprintVersion}`); |
| 33 | * ``` |
| 34 | * |
| 35 | * @binding |
| 36 | */ |
| 37 | export interface CreateBlueprintVersion extends Binding.Service< |
| 38 | CreateBlueprintVersion, |
| 39 | "AWS.BedrockDataAutomation.CreateBlueprintVersion", |
| 40 | ( |
| 41 | blueprint: Blueprint, |
| 42 | ) => Effect.Effect< |
| 43 | ( |
| 44 | request: CreateBlueprintVersionRequest, |
| 45 | ) => Effect.Effect< |
| 46 | bda.CreateBlueprintVersionResponse, |
| 47 | bda.CreateBlueprintVersionError |
| 48 | > |
| 49 | > |
| 50 | > {} |
| 51 | export const CreateBlueprintVersion = Binding.Service<CreateBlueprintVersion>( |
| 52 | "AWS.BedrockDataAutomation.CreateBlueprintVersion", |
| 53 | ); |