The best way to control Claude Code, Codex and more from any computer or phone

main
ts 46 lines 1.61 KB
Raw
1 import type * as obs from "@distilled.cloud/aws/observabilityadmin";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `observabilityadmin:GetTelemetryEnrichmentStatus` —
7 * reads the status of the account's telemetry enrichment feature (resource
8 * tags added to telemetry). Fails with a typed
9 * `ResourceNotFoundException` when the account has never onboarded to
10 * enrichment.
11 *
12 * Provide `AWS.ObservabilityAdmin.GetTelemetryEnrichmentStatusHttp` on the
13 * hosting Lambda Function to satisfy the requirement.
14 * ### Reading Enrichment Status
15 * **Example:** Read the enrichment status, tolerating never-onboarded
16 * ```typescript
17 * // init — grants observabilityadmin:GetTelemetryEnrichmentStatus
18 * const getEnrichmentStatus = yield* AWS.ObservabilityAdmin.GetTelemetryEnrichmentStatus();
19 *
20 * // runtime
21 * const status = yield* getEnrichmentStatus().pipe(
22 * Effect.map((r) => r.Status ?? "Stopped"),
23 * Effect.catchTag("ResourceNotFoundException", () =>
24 * Effect.succeed("NotOnboarded"),
25 * ),
26 * );
27 * ```
28 *
29 * @binding
30 */
31 export interface GetTelemetryEnrichmentStatus extends Binding.Service<
32 GetTelemetryEnrichmentStatus,
33 "AWS.ObservabilityAdmin.GetTelemetryEnrichmentStatus",
34 () => Effect.Effect<
35 (
36 request?: obs.GetTelemetryEnrichmentStatusRequest,
37 ) => Effect.Effect<
38 obs.GetTelemetryEnrichmentStatusOutput,
39 obs.GetTelemetryEnrichmentStatusError
40 >
41 >
42 > {}
43
44 export const GetTelemetryEnrichmentStatus = Binding.Service<GetTelemetryEnrichmentStatus>(
45 "AWS.ObservabilityAdmin.GetTelemetryEnrichmentStatus",
46 );