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:ListTargetsForPolicy`.
7 *
8 * Lists all roots, organizational units, and accounts that the specified policy is attached to.
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.ListTargetsForPolicyHttp)`.
12 * ### Policies & Effective Policy
13 * **Example:** List a Policy's Targets
14 * ```typescript
15 * // init — account-level binding, no resource argument
16 * const listTargetsForPolicy = yield* AWS.Organizations.ListTargetsForPolicy();
17 *
18 * // runtime
19 * const { Targets } = yield* listTargetsForPolicy({ PolicyId: policyId });
20 * ```
21 *
22 * @binding
23 */
24export interface ListTargetsForPolicy extends Binding.Service<
25 ListTargetsForPolicy,
26 "AWS.Organizations.ListTargetsForPolicy",
27 () => Effect.Effect<
28 (
29 request: organizations.ListTargetsForPolicyRequest,
30 ) => Effect.Effect<
31 organizations.ListTargetsForPolicyResponse,
32 organizations.ListTargetsForPolicyError
33 >
34 >
35> {}
36export const ListTargetsForPolicy = Binding.Service<ListTargetsForPolicy>(
37 "AWS.Organizations.ListTargetsForPolicy",
38);