| 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 GetSubscriptionRequest extends Omit< |
| 7 | datazone.GetSubscriptionInput, |
| 8 | "domainIdentifier" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `datazone:GetSubscription`. |
| 13 | * |
| 14 | * Reads a subscription in the bound domain. The domain id is injected from the binding. |
| 15 | * Provide the implementation with |
| 16 | * `Effect.provide(AWS.DataZone.GetSubscriptionHttp)`. |
| 17 | * ### Subscription Workflows |
| 18 | * **Example:** Read a Subscription |
| 19 | * ```typescript |
| 20 | * // init — bind the operation to the domain |
| 21 | * const getSubscription = yield* AWS.DataZone.GetSubscription(domain); |
| 22 | * |
| 23 | * // runtime |
| 24 | * const sub = yield* getSubscription({ identifier: subscriptionId }); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface GetSubscription extends Binding.Service< |
| 30 | GetSubscription, |
| 31 | "AWS.DataZone.GetSubscription", |
| 32 | ( |
| 33 | domain: Domain, |
| 34 | ) => Effect.Effect< |
| 35 | ( |
| 36 | request: GetSubscriptionRequest, |
| 37 | ) => Effect.Effect< |
| 38 | datazone.GetSubscriptionOutput, |
| 39 | datazone.GetSubscriptionError |
| 40 | > |
| 41 | > |
| 42 | > {} |
| 43 | export const GetSubscription = Binding.Service<GetSubscription>( |
| 44 | "AWS.DataZone.GetSubscription", |
| 45 | ); |