| 1 | import type * as organizations from "@distilled.cloud/aws/organizations"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `organizations:ListPoliciesForTarget`. |
| 7 | * |
| 8 | * Lists the policies of the specified type that are directly attached to the specified target root, OU, or account. |
| 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.ListPoliciesForTargetHttp)`. |
| 12 | * ### Policies & Effective Policy |
| 13 | * **Example:** List Policies Attached to a Target |
| 14 | * ```typescript |
| 15 | * // init — account-level binding, no resource argument |
| 16 | * const listPoliciesForTarget = yield* AWS.Organizations.ListPoliciesForTarget(); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const { Policies } = yield* listPoliciesForTarget({ |
| 20 | * TargetId: accountId, |
| 21 | * Filter: "SERVICE_CONTROL_POLICY", |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface ListPoliciesForTarget extends Binding.Service< |
| 28 | ListPoliciesForTarget, |
| 29 | "AWS.Organizations.ListPoliciesForTarget", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request: organizations.ListPoliciesForTargetRequest, |
| 33 | ) => Effect.Effect< |
| 34 | organizations.ListPoliciesForTargetResponse, |
| 35 | organizations.ListPoliciesForTargetError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const ListPoliciesForTarget = Binding.Service<ListPoliciesForTarget>( |
| 40 | "AWS.Organizations.ListPoliciesForTarget", |
| 41 | ); |