sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Detective/ GetMembers.ts

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

/**
 * Runtime binding for `detective:GetMembers`.
 *
 * Reads the membership details of specific accounts in the behavior graph —
 * status, volume usage, and per-package ingest states. Unknown accounts come
 * back in `UnprocessedAccounts`. The graph ARN is injected from the bound
 * {@link Graph}.
 * Provide the implementation with
 * `Effect.provide(AWS.Detective.GetMembersHttp)`.
 * ### Administering Member Accounts
 * **Example:** Check A Member's Status
 * ```typescript
 * // init
 * const getMembers = yield* AWS.Detective.GetMembers(graph);
 *
 * // runtime
 * const { MemberDetails } = yield* getMembers({
 *   AccountIds: ["111122223333"],
 * });
 * ```
 *
 * @binding
 */
export interface GetMembers extends Binding.Service<
  GetMembers,
  "AWS.Detective.GetMembers",
  (
    graph: Graph,
  ) => Effect.Effect<
    (
      request: Omit<detective.GetMembersRequest, "GraphArn">,
    ) => Effect.Effect<detective.GetMembersResponse, detective.GetMembersError>
  >
> {}
export const GetMembers = Binding.Service<GetMembers>("AWS.Detective.GetMembers");