| 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 CreateSubscriptionRequestRequest extends Omit< |
| 7 | datazone.CreateSubscriptionRequestInput, |
| 8 | "domainIdentifier" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `datazone:CreateSubscriptionRequest`. |
| 13 | * |
| 14 | * Requests a subscription to a published listing in the bound domain on behalf of a project. The domain id is injected from the binding. |
| 15 | * Provide the implementation with |
| 16 | * `Effect.provide(AWS.DataZone.CreateSubscriptionRequestHttp)`. |
| 17 | * ### Subscription Workflows |
| 18 | * **Example:** Request Access to a Listing |
| 19 | * ```typescript |
| 20 | * // init — bind the operation to the domain |
| 21 | * const createSubscriptionRequest = yield* AWS.DataZone.CreateSubscriptionRequest(domain); |
| 22 | * |
| 23 | * // runtime |
| 24 | * yield* createSubscriptionRequest({ |
| 25 | * subscribedPrincipals: [{ project: { identifier: projectId } }], |
| 26 | * subscribedListings: [{ identifier: listingId }], |
| 27 | * requestReason: "nightly enrichment job needs read access", |
| 28 | * }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface CreateSubscriptionRequest extends Binding.Service< |
| 34 | CreateSubscriptionRequest, |
| 35 | "AWS.DataZone.CreateSubscriptionRequest", |
| 36 | ( |
| 37 | domain: Domain, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request: CreateSubscriptionRequestRequest, |
| 41 | ) => Effect.Effect< |
| 42 | datazone.CreateSubscriptionRequestOutput, |
| 43 | datazone.CreateSubscriptionRequestError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | export const CreateSubscriptionRequest = |
| 48 | Binding.Service<CreateSubscriptionRequest>( |
| 49 | "AWS.DataZone.CreateSubscriptionRequest", |
| 50 | ); |