| 1 | import type * as datazone from "@distilled.cloud/aws/datazone"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Domain } from "./Domain.ts"; |
| 5 | |
| 6 | export interface CreateAssetRevisionRequest extends Omit< |
| 7 | datazone.CreateAssetRevisionInput, |
| 8 | "domainIdentifier" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `datazone:CreateAssetRevision`. |
| 13 | * |
| 14 | * Creates a new revision of an existing asset in the bound domain, e.g. after a schema change. The domain id is injected from the binding. |
| 15 | * Provide the implementation with |
| 16 | * `Effect.provide(AWS.DataZone.CreateAssetRevisionHttp)`. |
| 17 | * ### Publishing Assets |
| 18 | * **Example:** Revise an Asset |
| 19 | * ```typescript |
| 20 | * // init — bind the operation to the domain |
| 21 | * const createAssetRevision = yield* AWS.DataZone.CreateAssetRevision(domain); |
| 22 | * |
| 23 | * // runtime |
| 24 | * yield* createAssetRevision({ identifier: assetId, name: "daily-orders" }); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface CreateAssetRevision extends Binding.Service< |
| 30 | CreateAssetRevision, |
| 31 | "AWS.DataZone.CreateAssetRevision", |
| 32 | ( |
| 33 | domain: Domain, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request: CreateAssetRevisionRequest, |
| 37 | ) => Effect.Effect< |
| 38 | datazone.CreateAssetRevisionOutput, |
| 39 | datazone.CreateAssetRevisionError |
| 40 | > |
| 41 | > |
| 42 | > {} |
| 43 | export const CreateAssetRevision = Binding.Service<CreateAssetRevision>( |
| 44 | "AWS.DataZone.CreateAssetRevision", |
| 45 | ); |