1import type * as appsignals from "@distilled.cloud/aws/application-signals";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `application-signals:GetService`.
7 *
8 * Returns information about one service discovered by Application Signals,
9 * identified by its `KeyAttributes` (`Type`/`Name`/`Environment`). Provide
10 * the implementation with
11 * `Effect.provide(AWS.ApplicationSignals.GetServiceHttp)`.
12 * ### Discovering Services
13 * **Example:** Get a Discovered Service
14 * ```typescript
15 * // init — account-level, no resource argument
16 * const getService = yield* AWS.ApplicationSignals.GetService();
17 *
18 * // runtime
19 * const result = yield* getService({
20 * StartTime: new Date(Date.now() - 3600_000),
21 * EndTime: new Date(),
22 * KeyAttributes: {
23 * Type: "Service",
24 * Name: "checkout-service",
25 * Environment: "eks:prod",
26 * },
27 * });
28 * ```
29 *
30 * @binding
31 */
32export interface GetService extends Binding.Service<
33 GetService,
34 "AWS.ApplicationSignals.GetService",
35 () => Effect.Effect<
36 (
37 request: appsignals.GetServiceInput,
38 ) => Effect.Effect<appsignals.GetServiceOutput, appsignals.GetServiceError>
39 >
40> {}
41
42export const GetService = Binding.Service<GetService>(
43 "AWS.ApplicationSignals.GetService",
44);