| 1 | import type * as ram from "@distilled.cloud/aws/ram"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `ram:ListResources`. |
| 7 | * |
| 8 | * Lists the resources that you added to resource shares or that are shared with you. |
| 9 | * Account-level operation — the target shares, invitations, and permissions |
| 10 | * are chosen per request at runtime, so the binding takes no resource |
| 11 | * argument. Provide the implementation with |
| 12 | * `Effect.provide(AWS.RAM.ListResourcesHttp)`. |
| 13 | * ### Discovering Shares & Shared Resources |
| 14 | * **Example:** List the Resources Shared with You |
| 15 | * ```typescript |
| 16 | * // init — account-level binding, no resource argument |
| 17 | * const listResources = yield* AWS.RAM.ListResources(); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { resources } = yield* listResources({ |
| 21 | * resourceOwner: "OTHER-ACCOUNTS", |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface ListResources extends Binding.Service< |
| 28 | ListResources, |
| 29 | "AWS.RAM.ListResources", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request: ram.ListResourcesRequest, |
| 33 | ) => Effect.Effect<ram.ListResourcesResponse, ram.ListResourcesError> |
| 34 | > |
| 35 | > {} |
| 36 | export const ListResources = Binding.Service<ListResources>( |
| 37 | "AWS.RAM.ListResources", |
| 38 | ); |