@devries-cameron20 / t3code Mirror · read-only
Fork 0

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, 06:00 UTC

main
ts 39 lines 1.36 KB
Raw
1 import type * as account from "@distilled.cloud/aws/account";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `account:ListRegions`.
7 *
8 * Lists every Region available to the calling account together with its
9 * opt-in status (`ENABLED`, `DISABLED`, `ENABLED_BY_DEFAULT`, …), optionally
10 * filtered by `RegionOptStatusContains`. Account Management is an account
11 * singleton, so the binding takes no resource argument. Provide the
12 * implementation with `Effect.provide(AWS.Account.ListRegionsHttp)`.
13 * ### Reading Region Opt Status
14 * **Example:** List the Enabled-by-Default Regions
15 * ```typescript
16 * // init — account-level binding, no resource argument
17 * const listRegions = yield* AWS.Account.ListRegions();
18 *
19 * // runtime
20 * const { Regions } = yield* listRegions({
21 * RegionOptStatusContains: ["ENABLED_BY_DEFAULT"],
22 * });
23 * for (const region of Regions ?? []) {
24 * console.log(region.RegionName, region.RegionOptStatus);
25 * }
26 * ```
27 *
28 * @binding
29 */
30 export interface ListRegions extends Binding.Service<
31 ListRegions,
32 "AWS.Account.ListRegions",
33 () => Effect.Effect<
34 (
35 request?: account.ListRegionsRequest,
36 ) => Effect.Effect<account.ListRegionsResponse, account.ListRegionsError>
37 >
38 > {}
39 export const ListRegions = Binding.Service<ListRegions>("AWS.Account.ListRegions");