1import type * as datazone from "@distilled.cloud/aws/datazone";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Domain } from "./Domain.ts";
5
6export interface GetAssetRequest extends Omit<
7 datazone.GetAssetInput,
8 "domainIdentifier"
9> {}
10
11/**
12 * Runtime binding for `datazone:GetAsset`.
13 *
14 * Reads an asset in the bound domain — its forms, glossary terms, and latest revision. The domain id is injected from the binding.
15 * Provide the implementation with
16 * `Effect.provide(AWS.DataZone.GetAssetHttp)`.
17 * ### Searching the Catalog
18 * **Example:** Read an Asset
19 * ```typescript
20 * // init — bind the operation to the domain
21 * const getAsset = yield* AWS.DataZone.GetAsset(domain);
22 *
23 * // runtime
24 * const asset = yield* getAsset({ identifier: assetId });
25 * ```
26 *
27 * @binding
28 */
29export interface GetAsset extends Binding.Service<
30 GetAsset,
31 "AWS.DataZone.GetAsset",
32 (
33 domain: Domain,
34 ) => Effect.Effect<
35 (
36 request: GetAssetRequest,
37 ) => Effect.Effect<datazone.GetAssetOutput, datazone.GetAssetError>
38 >
39> {}
40export const GetAsset = Binding.Service<GetAsset>("AWS.DataZone.GetAsset");