1import type * as SVC from "@distilled.cloud/aws/databrew";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Recipe } from "./Recipe.ts";
5
6export interface PublishRecipeRequest extends Omit<
7 SVC.PublishRecipeRequest,
8 "Name"
9> {}
10
11/**
12 * Runtime binding for `databrew:PublishRecipe` — snapshots the bound
13 * recipe's `LATEST_WORKING` steps as the next numbered published version
14 * (recipe jobs consume the latest published version by default).
15 * ### Publishing Recipes
16 * **Example:** Publish a New Version
17 * ```typescript
18 * const publishRecipe = yield* AWS.DataBrew.PublishRecipe(recipe);
19 *
20 * const { Name } = yield* publishRecipe({ Description: "nightly cut" });
21 * ```
22 *
23 * @binding
24 */
25export interface PublishRecipe extends Binding.Service<
26 PublishRecipe,
27 "AWS.DataBrew.PublishRecipe",
28 <R extends Recipe>(
29 recipe: R,
30 ) => Effect.Effect<
31 (
32 request?: PublishRecipeRequest,
33 ) => Effect.Effect<SVC.PublishRecipeResponse, SVC.PublishRecipeError>
34 >
35> {}
36export const PublishRecipe = Binding.Service<PublishRecipe>(
37 "AWS.DataBrew.PublishRecipe",
38);