sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ DevOpsGuru/ DescribeInsight.ts

import type * as devopsguru from "@distilled.cloud/aws/devops-guru";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Runtime binding for `devops-guru:DescribeInsight`.
 *
 * Returns the details of a single insight — severity, status, time ranges, and the SSM OpsItem id when OpsCenter integration is enabled. The building block of an incident-response Function reacting to DevOps Guru notifications.
 * Provide the implementation with
 * `Effect.provide(AWS.DevOpsGuru.DescribeInsightHttp)`.
 * ### Inspecting Insights
 * **Example:** Read an Insight's Detail
 * ```typescript
 * // init — account-level binding, no resource argument
 * const describeInsight = yield* AWS.DevOpsGuru.DescribeInsight();
 *
 * // runtime
 * const { ReactiveInsight } = yield* describeInsight({ Id: insightId });
 * yield* Effect.log(`${ReactiveInsight?.Severity}: ${ReactiveInsight?.Name}`);
 * ```
 *
 * @binding
 */
export interface DescribeInsight extends Binding.Service<
  DescribeInsight,
  "AWS.DevOpsGuru.DescribeInsight",
  () => Effect.Effect<
    (
      request: devopsguru.DescribeInsightRequest,
    ) => Effect.Effect<devopsguru.DescribeInsightResponse, devopsguru.DescribeInsightError>
  >
> {}
export const DescribeInsight = Binding.Service<DescribeInsight>("AWS.DevOpsGuru.DescribeInsight");