| 1 | import type * as Lambda from "@distilled.cloud/aws/lambda"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | export interface ListFunctionsRequest extends Lambda.ListFunctionsRequest {} |
| 6 | |
| 7 | /** |
| 8 | * Runtime binding for `lambda:ListFunctions`. |
| 9 | * |
| 10 | * An account-level binding — call it with no arguments to get a callable |
| 11 | * that lists function configurations in the region. Provide the |
| 12 | * `ListFunctionsHttp` layer on the Function to satisfy the binding. |
| 13 | * ### Function Metadata |
| 14 | * **Example:** List functions in the region |
| 15 | * ```typescript |
| 16 | * const listFunctions = yield* AWS.Lambda.ListFunctions(); |
| 17 | * |
| 18 | * const response = yield* listFunctions({ MaxItems: 50 }); |
| 19 | * const names = response.Functions?.map((f) => f.FunctionName); |
| 20 | * ``` |
| 21 | * |
| 22 | * @binding |
| 23 | */ |
| 24 | export interface ListFunctions extends Binding.Service< |
| 25 | ListFunctions, |
| 26 | "AWS.Lambda.ListFunctions", |
| 27 | () => Effect.Effect< |
| 28 | ( |
| 29 | request?: ListFunctionsRequest, |
| 30 | ) => Effect.Effect<Lambda.ListFunctionsResponse, Lambda.ListFunctionsError> |
| 31 | > |
| 32 | > {} |
| 33 | export const ListFunctions = Binding.Service<ListFunctions>( |
| 34 | "AWS.Lambda.ListFunctions", |
| 35 | ); |