1import type * as SD from "@distilled.cloud/aws/servicediscovery";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Service } from "./Service.ts";
5
6/**
7 * Runtime binding for `servicediscovery:GetServiceAttributes` — reads the
8 * custom key/value attributes stored on the bound {@link Service} (declared
9 * via the Service resource's `attributes` prop or written out-of-band).
10 * Use it to distribute small pieces of service-level configuration to
11 * consumers without an extra config store. Provide the implementation with
12 * `Effect.provide(AWS.CloudMap.GetServiceAttributesHttp)`.
13 * ### Service Attributes
14 * **Example:** Read the Service's Attributes
15 * ```typescript
16 * const getServiceAttributes =
17 * yield* AWS.CloudMap.GetServiceAttributes(service);
18 *
19 * const { ServiceAttributes } = yield* getServiceAttributes();
20 * console.log(ServiceAttributes?.Attributes?.tier);
21 * ```
22 *
23 * @binding
24 */
25export interface GetServiceAttributes extends Binding.Service<
26 GetServiceAttributes,
27 "AWS.CloudMap.GetServiceAttributes",
28 <S extends Service>(
29 service: S,
30 ) => Effect.Effect<
31 () => Effect.Effect<
32 SD.GetServiceAttributesResponse,
33 SD.GetServiceAttributesError
34 >
35 >
36> {}
37export const GetServiceAttributes = Binding.Service<GetServiceAttributes>(
38 "AWS.CloudMap.GetServiceAttributes",
39);