The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as ag from "@distilled.cloud/aws/api-gateway"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { UsagePlan } from "./UsagePlan.ts"; |
| 5 | |
| 6 | export interface GetUsagePlanKeysRequest extends Omit<ag.GetUsagePlanKeysRequest, "usagePlanId"> {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for listing the API keys enrolled in a |
| 10 | * {@link UsagePlan} (`apigateway:GET` on `/usageplans/{id}/keys`). |
| 11 | * |
| 12 | * Provide `ApiGateway.GetUsagePlanKeysHttp` on the Function effect to |
| 13 | * implement the binding. |
| 14 | * |
| 15 | * ### Managing plan keys |
| 16 | * **Example:** List enrolled keys |
| 17 | * ```typescript |
| 18 | * // init |
| 19 | * const getUsagePlanKeys = yield* ApiGateway.GetUsagePlanKeys(plan); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const page = yield* getUsagePlanKeys({ limit: 100 }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface GetUsagePlanKeys extends Binding.Service< |
| 28 | GetUsagePlanKeys, |
| 29 | "AWS.ApiGateway.GetUsagePlanKeys", |
| 30 | <P extends UsagePlan>( |
| 31 | usagePlan: P, |
| 32 | ) => Effect.Effect< |
| 33 | (request?: GetUsagePlanKeysRequest) => Effect.Effect<ag.UsagePlanKeys, ag.GetUsagePlanKeysError> |
| 34 | > |
| 35 | > {} |
| 36 | export const GetUsagePlanKeys = Binding.Service<GetUsagePlanKeys>( |
| 37 | "AWS.ApiGateway.GetUsagePlanKeys", |
| 38 | ); |