1import type * as identitystore from "@distilled.cloud/aws/identitystore";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Instance } from "./Instance.ts";
5
6/**
7 * Runtime binding for the `ListGroupMembershipsForMember` operation (IAM action
8 * `identitystore:ListGroupMembershipsForMember`), scoped to one {@link Instance}.
9 *
10 * Lists every group a user belongs to in the bound instance's identity store, one page per call (`NextToken` paginates). The instance's
11 * `IdentityStoreId` is injected from the binding. Provide the implementation with
12 * `Effect.provide(AWS.IdentityCenter.ListGroupMembershipsForMemberHttp)`.
13 * ### Querying Group Memberships
14 * **Example:** Enumerate a User's Groups
15 * ```typescript
16 * // init — bind the operation to the Identity Center instance
17 * const listGroupMembershipsForMember = yield* AWS.IdentityCenter.ListGroupMembershipsForMember(instance);
18 *
19 * // runtime
20 * const { GroupMemberships } = yield* listGroupMembershipsForMember({
21 * MemberId: { UserId: userId },
22 * });
23 * ```
24 *
25 * @binding
26 */
27export interface ListGroupMembershipsForMember extends Binding.Service<
28 ListGroupMembershipsForMember,
29 "AWS.IdentityCenter.ListGroupMembershipsForMember",
30 (
31 instance: Instance,
32 ) => Effect.Effect<
33 (
34 request: Omit<
35 identitystore.ListGroupMembershipsForMemberRequest,
36 "IdentityStoreId"
37 >,
38 ) => Effect.Effect<
39 identitystore.ListGroupMembershipsForMemberResponse,
40 identitystore.ListGroupMembershipsForMemberError
41 >
42 >
43> {}
44export const ListGroupMembershipsForMember =
45 Binding.Service<ListGroupMembershipsForMember>(
46 "AWS.IdentityCenter.ListGroupMembershipsForMember",
47 );