Skip to content

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).

// init — account-level binding, no resource argument
const listRoots = yield* AWS.Organizations.ListRoots();
// runtime
const { Roots } = yield* listRoots();
const rootId = Roots?.[0]?.Id;