1import type * as dataexchange from "@distilled.cloud/aws/dataexchange";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { DataSet } from "./DataSet.ts";
5
6/**
7 * Runtime binding for `dataexchange:SendApiAsset`.
8 *
9 * Invokes an API asset of an entitled `API_GATEWAY_API` data set — the
10 * Data Exchange data plane proxies the request to the provider's API
11 * Gateway. The data set id is injected from the binding; pass the
12 * revision and asset ids of the API asset to call.
13 * Provide the implementation with
14 * `Effect.provide(AWS.DataExchange.SendApiAssetHttp)`.
15 * ### Calling API Assets
16 * **Example:** Call A Subscribed API Asset
17 * ```typescript
18 * const sendApiAsset = yield* AWS.DataExchange.SendApiAsset(dataSet);
19 *
20 * // runtime
21 * const response = yield* sendApiAsset({
22 * RevisionId: revisionId,
23 * AssetId: assetId,
24 * Method: "GET",
25 * Path: "/prices",
26 * });
27 * ```
28 *
29 * @binding
30 */
31export interface SendApiAsset extends Binding.Service<
32 SendApiAsset,
33 "AWS.DataExchange.SendApiAsset",
34 (
35 dataSet: DataSet,
36 ) => Effect.Effect<
37 (
38 request: Omit<dataexchange.SendApiAssetRequest, "DataSetId">,
39 ) => Effect.Effect<
40 dataexchange.SendApiAssetResponse,
41 dataexchange.SendApiAssetError
42 >
43 >
44> {}
45export const SendApiAsset = Binding.Service<SendApiAsset>(
46 "AWS.DataExchange.SendApiAsset",
47);