The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type * as config from "@distilled.cloud/aws/config-service"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `config:SelectResourceConfig` — run a SQL `SELECT` |
| 7 | * query (AWS Config advanced query) against the current configuration |
| 8 | * state of recorded resources. |
| 9 | * |
| 10 | * Provide `Config.SelectResourceConfigHttp` on the hosting Lambda Function to |
| 11 | * satisfy the requirement. |
| 12 | * ### Querying with SQL |
| 13 | * **Example:** Query Resource State with SQL |
| 14 | * ```typescript |
| 15 | * // init — grants config:SelectResourceConfig |
| 16 | * const selectResourceConfig = yield* AWS.Config.SelectResourceConfig(); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const result = yield* selectResourceConfig({ |
| 20 | * Expression: |
| 21 | * "SELECT resourceId WHERE resourceType = 'AWS::S3::Bucket'", |
| 22 | * }); |
| 23 | * console.log(result.Results); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface SelectResourceConfig extends Binding.Service< |
| 29 | SelectResourceConfig, |
| 30 | "AWS.Config.SelectResourceConfig", |
| 31 | () => Effect.Effect< |
| 32 | ( |
| 33 | request: config.SelectResourceConfigRequest, |
| 34 | ) => Effect.Effect<config.SelectResourceConfigResponse, config.SelectResourceConfigError> |
| 35 | > |
| 36 | > {} |
| 37 | |
| 38 | export const SelectResourceConfig = Binding.Service<SelectResourceConfig>( |
| 39 | "AWS.Config.SelectResourceConfig", |
| 40 | ); |