sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Lambda/ ListFunctions.ts

import type * as Lambda from "@distilled.cloud/aws/lambda";
import * as Binding from "alchemy/Binding";
import * as Effect from "effect/Effect";

export interface ListFunctionsRequest extends Lambda.ListFunctionsRequest {}

/**
 * Runtime binding for `lambda:ListFunctions`.
 *
 * An account-level binding — call it with no arguments to get a callable
 * that lists function configurations in the region. Provide the
 * `ListFunctionsHttp` layer on the Function to satisfy the binding.
 * ### Function Metadata
 * **Example:** List functions in the region
 * ```typescript
 * const listFunctions = yield* AWS.Lambda.ListFunctions();
 *
 * const response = yield* listFunctions({ MaxItems: 50 });
 * const names = response.Functions?.map((f) => f.FunctionName);
 * ```
 *
 * @binding
 */
export interface ListFunctions extends Binding.Service<
  ListFunctions,
  "AWS.Lambda.ListFunctions",
  () => Effect.Effect<
    (
      request?: ListFunctionsRequest,
    ) => Effect.Effect<Lambda.ListFunctionsResponse, Lambda.ListFunctionsError>
  >
> {}
export const ListFunctions = Binding.Service<ListFunctions>("AWS.Lambda.ListFunctions");