1import type * as ag from "@distilled.cloud/aws/api-gateway";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5export interface DeleteApiKeyRequest extends ag.DeleteApiKeyRequest {}
6
7/**
8 * Runtime binding for deleting an API Gateway API key
9 * (`apigateway:DELETE` on `/apikeys/{id}`). Account-scoped — takes no
10 * resource.
11 *
12 * Provide `ApiGateway.DeleteApiKeyHttp` on the Function effect to
13 * implement the binding.
14 *
15 * ### Managing API keys
16 * **Example:** Delete a key on account closure
17 * ```typescript
18 * // init
19 * const deleteApiKey = yield* ApiGateway.DeleteApiKey();
20 *
21 * // runtime
22 * yield* deleteApiKey({ apiKey: keyId }).pipe(
23 * Effect.catchTag("NotFoundException", () => Effect.void),
24 * );
25 * ```
26 *
27 * @binding
28 */
29export interface DeleteApiKey extends Binding.Service<
30 DeleteApiKey,
31 "AWS.ApiGateway.DeleteApiKey",
32 () => Effect.Effect<
33 (
34 request: DeleteApiKeyRequest,
35 ) => Effect.Effect<ag.DeleteApiKeyResponse, ag.DeleteApiKeyError>
36 >
37> {}
38export const DeleteApiKey = Binding.Service<DeleteApiKey>(
39 "AWS.ApiGateway.DeleteApiKey",
40);