sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ AIOps/ GetInvestigationGroup.ts

import type * as aiops from "@distilled.cloud/aws/aiops";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";
import type { InvestigationGroup } from "./InvestigationGroup.ts";

/**
 * Runtime binding for `aiops:GetInvestigationGroup`.
 *
 * Reads the bound {@link InvestigationGroup}'s full configuration — the
 * telemetry-access role, retention period, encryption, tag key boundaries,
 * chatbot notification channels, and cross-account configurations — so an
 * ops function can audit or report on the Region's investigation setup. The
 * group's ARN is injected from the binding. Provide the implementation with
 * `Effect.provide(AWS.AIOps.GetInvestigationGroupHttp)`.
 * ### Reading the Investigation Group
 * **Example:** Inspect the Group's Configuration
 * ```typescript
 * // init — grants aiops:GetInvestigationGroup on the group
 * const getInvestigationGroup = yield* AWS.AIOps.GetInvestigationGroup(group);
 *
 * // runtime
 * const detail = yield* getInvestigationGroup();
 * yield* Effect.log(
 *   `${detail.name} retains investigations for ${detail.retentionInDays} days`,
 * );
 * ```
 *
 * @binding
 */
export interface GetInvestigationGroup extends Binding.Service<
  GetInvestigationGroup,
  "AWS.AIOps.GetInvestigationGroup",
  (
    group: InvestigationGroup,
  ) => Effect.Effect<
    () => Effect.Effect<aiops.GetInvestigationGroupResponse, aiops.GetInvestigationGroupError>
  >
> {}
export const GetInvestigationGroup = Binding.Service<GetInvestigationGroup>(
  "AWS.AIOps.GetInvestigationGroup",
);