The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as WAFV2 from "@distilled.cloud/aws/wafv2"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `wafv2:CreateAPIKey` — mint an API key for the |
| 7 | * CAPTCHA JavaScript integration, scoped to up to 5 token domains (e.g. |
| 8 | * onboarding a new tenant domain in a SaaS). The returned key is embedded |
| 9 | * in client-side JavaScript by design (it is not a secret credential). |
| 10 | * |
| 11 | * Provide `WAFv2.CreateAPIKeyHttp` on the hosting Lambda Function to |
| 12 | * satisfy the requirement. |
| 13 | * ### CAPTCHA API Keys |
| 14 | * **Example:** Mint a CAPTCHA API Key for a Domain |
| 15 | * ```typescript |
| 16 | * // init — grants wafv2:CreateAPIKey |
| 17 | * const createAPIKey = yield* AWS.WAFv2.CreateAPIKey(); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { APIKey } = yield* createAPIKey({ |
| 21 | * Scope: "REGIONAL", |
| 22 | * TokenDomains: ["example.com"], |
| 23 | * }); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface CreateAPIKey extends Binding.Service< |
| 29 | CreateAPIKey, |
| 30 | "AWS.WAFv2.CreateAPIKey", |
| 31 | () => Effect.Effect< |
| 32 | ( |
| 33 | request: WAFV2.CreateAPIKeyRequest, |
| 34 | ) => Effect.Effect<WAFV2.CreateAPIKeyResponse, WAFV2.CreateAPIKeyError> |
| 35 | > |
| 36 | > {} |
| 37 | |
| 38 | export const CreateAPIKey = Binding.Service<CreateAPIKey>("AWS.WAFv2.CreateAPIKey"); |
| 39 | |
| 40 | /** |
| 41 | * Runtime binding for `wafv2:GetDecryptedAPIKey` — read the token domains |
| 42 | * and creation time encoded in a CAPTCHA API key. |
| 43 | * |
| 44 | * Provide `WAFv2.GetDecryptedAPIKeyHttp` on the hosting Lambda Function to |
| 45 | * satisfy the requirement. |
| 46 | * ### CAPTCHA API Keys |
| 47 | * **Example:** Inspect an API Key |
| 48 | * ```typescript |
| 49 | * // init — grants wafv2:GetDecryptedAPIKey |
| 50 | * const getDecryptedAPIKey = yield* AWS.WAFv2.GetDecryptedAPIKey(); |
| 51 | * |
| 52 | * // runtime |
| 53 | * const { TokenDomains } = yield* getDecryptedAPIKey({ |
| 54 | * Scope: "REGIONAL", |
| 55 | * APIKey: apiKey, |
| 56 | * }); |
| 57 | * ``` |
| 58 | * |
| 59 | * @binding |
| 60 | */ |
| 61 | export interface GetDecryptedAPIKey extends Binding.Service< |
| 62 | GetDecryptedAPIKey, |
| 63 | "AWS.WAFv2.GetDecryptedAPIKey", |
| 64 | () => Effect.Effect< |
| 65 | ( |
| 66 | request: WAFV2.GetDecryptedAPIKeyRequest, |
| 67 | ) => Effect.Effect<WAFV2.GetDecryptedAPIKeyResponse, WAFV2.GetDecryptedAPIKeyError> |
| 68 | > |
| 69 | > {} |
| 70 | |
| 71 | export const GetDecryptedAPIKey = Binding.Service<GetDecryptedAPIKey>( |
| 72 | "AWS.WAFv2.GetDecryptedAPIKey", |
| 73 | ); |
| 74 | |
| 75 | /** |
| 76 | * Runtime binding for `wafv2:ListAPIKeys` — list the CAPTCHA API keys |
| 77 | * defined for a scope (also returns the CAPTCHA JavaScript integration |
| 78 | * URL). |
| 79 | * |
| 80 | * Provide `WAFv2.ListAPIKeysHttp` on the hosting Lambda Function to |
| 81 | * satisfy the requirement. |
| 82 | * ### CAPTCHA API Keys |
| 83 | * **Example:** List API Keys |
| 84 | * ```typescript |
| 85 | * // init — grants wafv2:ListAPIKeys |
| 86 | * const listAPIKeys = yield* AWS.WAFv2.ListAPIKeys(); |
| 87 | * |
| 88 | * // runtime |
| 89 | * const { APIKeySummaries } = yield* listAPIKeys({ Scope: "REGIONAL" }); |
| 90 | * ``` |
| 91 | * |
| 92 | * @binding |
| 93 | */ |
| 94 | export interface ListAPIKeys extends Binding.Service< |
| 95 | ListAPIKeys, |
| 96 | "AWS.WAFv2.ListAPIKeys", |
| 97 | () => Effect.Effect< |
| 98 | ( |
| 99 | request: WAFV2.ListAPIKeysRequest, |
| 100 | ) => Effect.Effect<WAFV2.ListAPIKeysResponse, WAFV2.ListAPIKeysError> |
| 101 | > |
| 102 | > {} |
| 103 | |
| 104 | export const ListAPIKeys = Binding.Service<ListAPIKeys>("AWS.WAFv2.ListAPIKeys"); |
| 105 | |
| 106 | /** |
| 107 | * Runtime binding for `wafv2:DeleteAPIKey` — delete a CAPTCHA API key |
| 108 | * (e.g. offboarding a tenant domain). |
| 109 | * |
| 110 | * Provide `WAFv2.DeleteAPIKeyHttp` on the hosting Lambda Function to |
| 111 | * satisfy the requirement. |
| 112 | * ### CAPTCHA API Keys |
| 113 | * **Example:** Delete an API Key |
| 114 | * ```typescript |
| 115 | * // init — grants wafv2:DeleteAPIKey |
| 116 | * const deleteAPIKey = yield* AWS.WAFv2.DeleteAPIKey(); |
| 117 | * |
| 118 | * // runtime |
| 119 | * yield* deleteAPIKey({ Scope: "REGIONAL", APIKey: apiKey }); |
| 120 | * ``` |
| 121 | * |
| 122 | * @binding |
| 123 | */ |
| 124 | export interface DeleteAPIKey extends Binding.Service< |
| 125 | DeleteAPIKey, |
| 126 | "AWS.WAFv2.DeleteAPIKey", |
| 127 | () => Effect.Effect< |
| 128 | ( |
| 129 | request: WAFV2.DeleteAPIKeyRequest, |
| 130 | ) => Effect.Effect<WAFV2.DeleteAPIKeyResponse, WAFV2.DeleteAPIKeyError> |
| 131 | > |
| 132 | > {} |
| 133 | |
| 134 | export const DeleteAPIKey = Binding.Service<DeleteAPIKey>("AWS.WAFv2.DeleteAPIKey"); |