IsMemberInGroups
Source:
src/AWS/IdentityCenter/IsMemberInGroups.ts
Runtime binding for the IsMemberInGroups operation (IAM action
identitystore:IsMemberInGroups), scoped to one Instance.
Checks whether a user belongs to any of up to 100 groups in one call — the fast authorization primitive for group-gated routes. The instance’s
IdentityStoreId is injected from the binding. Provide the implementation with
Effect.provide(AWS.IdentityCenter.IsMemberInGroupsHttp).
Querying Group Memberships
Section titled “Querying Group Memberships”// init — bind the operation to the Identity Center instanceconst isMemberInGroups = yield* AWS.IdentityCenter.IsMemberInGroups(instance);
// runtimeconst { Results } = yield* isMemberInGroups({ MemberId: { UserId: userId }, GroupIds: [adminGroupId],});const isAdmin = Results?.[0]?.MembershipExists === true;