| 1 | import type * as dataexchange from "@distilled.cloud/aws/dataexchange"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Revision } from "./Revision.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `dataexchange:GetRevision`. |
| 8 | * |
| 9 | * Reads the bound revision's detail — comment, finalized state, and |
| 10 | * revocation status. The data set and revision ids are injected from |
| 11 | * the binding. |
| 12 | * Provide the implementation with |
| 13 | * `Effect.provide(AWS.DataExchange.GetRevisionHttp)`. |
| 14 | * ### Reading Revisions & Assets |
| 15 | * **Example:** Check A Revision's State |
| 16 | * ```typescript |
| 17 | * const getRevision = yield* AWS.DataExchange.GetRevision(revision); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const detail = yield* getRevision(); |
| 21 | * yield* Effect.log(`finalized: ${detail.Finalized}`); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface GetRevision extends Binding.Service< |
| 27 | GetRevision, |
| 28 | "AWS.DataExchange.GetRevision", |
| 29 | ( |
| 30 | revision: Revision, |
| 31 | ) => Effect.Effect< |
| 32 | () => Effect.Effect< |
| 33 | dataexchange.GetRevisionResponse, |
| 34 | dataexchange.GetRevisionError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | export const GetRevision = Binding.Service<GetRevision>( |
| 39 | "AWS.DataExchange.GetRevision", |
| 40 | ); |