| 1 | import type * as personalize from "@distilled.cloud/aws/personalize"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `personalize:CreateCampaign` — Deploys a trained solution version as a live campaign that serves |
| 7 | * real-time recommendations — the final step of the MLOps loop. |
| 8 | * Provide the implementation with |
| 9 | * `Effect.provide(AWS.Personalize.CreateCampaignHttp)`. |
| 10 | * |
| 11 | * ### Retraining Loop |
| 12 | * **Example:** Deploy a Campaign |
| 13 | * ```typescript |
| 14 | * // init |
| 15 | * const createCampaign = yield* Personalize.CreateCampaign(); |
| 16 | * |
| 17 | * const { campaignArn } = yield* createCampaign({ |
| 18 | * name: "recommendations", |
| 19 | * solutionVersionArn, |
| 20 | * }); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface CreateCampaign extends Binding.Service< |
| 26 | CreateCampaign, |
| 27 | "AWS.Personalize.CreateCampaign", |
| 28 | () => Effect.Effect< |
| 29 | ( |
| 30 | request: personalize.CreateCampaignRequest, |
| 31 | ) => Effect.Effect< |
| 32 | personalize.CreateCampaignResponse, |
| 33 | personalize.CreateCampaignError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const CreateCampaign = Binding.Service<CreateCampaign>( |
| 38 | "AWS.Personalize.CreateCampaign", |
| 39 | ); |