1import type * as organizations from "@distilled.cloud/aws/organizations";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `organizations:DescribeOrganization`.
7 *
8 * Retrieves information about the organization that the calling account belongs to — its id, ARN, feature set, and management account. Available from any account in the organization.
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.DescribeOrganizationHttp)`.
12 * ### Reading the Organization Tree
13 * **Example:** Read the Organization
14 * ```typescript
15 * // init — account-level binding, no resource argument
16 * const describeOrganization = yield* AWS.Organizations.DescribeOrganization();
17 *
18 * // runtime
19 * const { Organization } = yield* describeOrganization();
20 * console.log(Organization?.Id, Organization?.MasterAccountId);
21 * ```
22 *
23 * @binding
24 */
25export interface DescribeOrganization extends Binding.Service<
26 DescribeOrganization,
27 "AWS.Organizations.DescribeOrganization",
28 () => Effect.Effect<
29 (
30 request?: organizations.DescribeOrganizationRequest,
31 ) => Effect.Effect<
32 organizations.DescribeOrganizationResponse,
33 organizations.DescribeOrganizationError
34 >
35 >
36> {}
37export const DescribeOrganization = Binding.Service<DescribeOrganization>(
38 "AWS.Organizations.DescribeOrganization",
39);