The best way to control Claude Code, Codex and more from any computer or phone

main
ts 34 lines 1.25 KB
Raw
1 import type * as organizations from "@distilled.cloud/aws/organizations";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `organizations:ListRoots`.
7 *
8 * Lists the roots of the organization, including the policy types enabled on each root. The root id is the starting point for walking the organization tree.
9 * Account-level operation — Organizations is a management-account-scoped
10 * global service, so the binding takes no resource argument. Provide the
11 * implementation with `Effect.provide(AWS.Organizations.ListRootsHttp)`.
12 * ### Reading the Organization Tree
13 * **Example:** Find the Root Id
14 * ```typescript
15 * // init — account-level binding, no resource argument
16 * const listRoots = yield* AWS.Organizations.ListRoots();
17 *
18 * // runtime
19 * const { Roots } = yield* listRoots();
20 * const rootId = Roots?.[0]?.Id;
21 * ```
22 *
23 * @binding
24 */
25 export interface ListRoots extends Binding.Service<
26 ListRoots,
27 "AWS.Organizations.ListRoots",
28 () => Effect.Effect<
29 (
30 request?: organizations.ListRootsRequest,
31 ) => Effect.Effect<organizations.ListRootsResponse, organizations.ListRootsError>
32 >
33 > {}
34 export const ListRoots = Binding.Service<ListRoots>("AWS.Organizations.ListRoots");