ListRoots
Source:
src/AWS/Organizations/ListRoots.ts
Runtime binding for organizations:ListRoots.
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.
Account-level operation — Organizations is a management-account-scoped
global service, so the binding takes no resource argument. Provide the
implementation with Effect.provide(AWS.Organizations.ListRootsHttp).
Reading the Organization Tree
Section titled “Reading the Organization Tree”// init — account-level binding, no resource argumentconst listRoots = yield* AWS.Organizations.ListRoots();
// runtimeconst { Roots } = yield* listRoots();const rootId = Roots?.[0]?.Id;