sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Organizations/ ListPolicies.ts

import type * as organizations from "@distilled.cloud/aws/organizations";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Runtime binding for `organizations:ListPolicies`.
 *
 * Lists all policies of the specified type (service control, tag, backup, AI-services opt-out, …) in the organization.
 * 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.ListPoliciesHttp)`.
 * ### Policies & Effective Policy
 * **Example:** List Service Control Policies
 * ```typescript
 * // init — account-level binding, no resource argument
 * const listPolicies = yield* AWS.Organizations.ListPolicies();
 *
 * // runtime
 * const { Policies } = yield* listPolicies({ Filter: "SERVICE_CONTROL_POLICY" });
 * ```
 *
 * @binding
 */
export interface ListPolicies extends Binding.Service<
  ListPolicies,
  "AWS.Organizations.ListPolicies",
  () => Effect.Effect<
    (
      request: organizations.ListPoliciesRequest,
    ) => Effect.Effect<organizations.ListPoliciesResponse, organizations.ListPoliciesError>
  >
> {}
export const ListPolicies = Binding.Service<ListPolicies>("AWS.Organizations.ListPolicies");