The best way to control Claude Code, Codex and more from any computer or phone

main
ts 37 lines 1.38 KB
Raw
1 import type * as identitystore from "@distilled.cloud/aws/identitystore";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
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<identitystore.ListUsersResponse, identitystore.ListUsersError>
35 >
36 > {}
37 export const ListUsers = Binding.Service<ListUsers>("AWS.IdentityCenter.ListUsers");