| 1 | import type * as identitystore from "@distilled.cloud/aws/identitystore"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Instance } from "./Instance.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `ListUsers` operation (IAM action |
| 8 | * `identitystore:ListUsers`), scoped to one {@link Instance}. |
| 9 | * |
| 10 | * Lists the users in the bound instance's identity store, one page per call (`NextToken` paginates); pass `Filters` to narrow by attribute. The instance's |
| 11 | * `IdentityStoreId` is injected from the binding. Provide the implementation with |
| 12 | * `Effect.provide(AWS.IdentityCenter.ListUsersHttp)`. |
| 13 | * ### Looking Up Users |
| 14 | * **Example:** Enumerate Users |
| 15 | * ```typescript |
| 16 | * // init — bind the operation to the Identity Center instance |
| 17 | * const listUsers = yield* AWS.IdentityCenter.ListUsers(instance); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { Users, NextToken } = yield* listUsers({ MaxResults: 50 }); |
| 21 | * console.log(Users?.map((user) => user.UserName)); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface ListUsers extends Binding.Service< |
| 27 | ListUsers, |
| 28 | "AWS.IdentityCenter.ListUsers", |
| 29 | ( |
| 30 | instance: Instance, |
| 31 | ) => Effect.Effect< |
| 32 | ( |
| 33 | request?: Omit<identitystore.ListUsersRequest, "IdentityStoreId">, |
| 34 | ) => Effect.Effect< |
| 35 | identitystore.ListUsersResponse, |
| 36 | identitystore.ListUsersError |
| 37 | > |
| 38 | > |
| 39 | > {} |
| 40 | export const ListUsers = Binding.Service<ListUsers>( |
| 41 | "AWS.IdentityCenter.ListUsers", |
| 42 | ); |