| 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 `GetGroupMembershipId` operation (IAM action |
| 8 | * `identitystore:GetGroupMembershipId`), scoped to one {@link Instance}. |
| 9 | * |
| 10 | * Resolves the `MembershipId` linking a user to a group in the bound instance's identity store. The instance's |
| 11 | * `IdentityStoreId` is injected from the binding. Provide the implementation with |
| 12 | * `Effect.provide(AWS.IdentityCenter.GetGroupMembershipIdHttp)`. |
| 13 | * ### Querying Group Memberships |
| 14 | * **Example:** Resolve a MembershipId |
| 15 | * ```typescript |
| 16 | * // init — bind the operation to the Identity Center instance |
| 17 | * const getGroupMembershipId = yield* AWS.IdentityCenter.GetGroupMembershipId(instance); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { MembershipId } = yield* getGroupMembershipId({ |
| 21 | * GroupId: groupId, |
| 22 | * MemberId: { UserId: userId }, |
| 23 | * }); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface GetGroupMembershipId extends Binding.Service< |
| 29 | GetGroupMembershipId, |
| 30 | "AWS.IdentityCenter.GetGroupMembershipId", |
| 31 | ( |
| 32 | instance: Instance, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request: Omit< |
| 36 | identitystore.GetGroupMembershipIdRequest, |
| 37 | "IdentityStoreId" |
| 38 | >, |
| 39 | ) => Effect.Effect< |
| 40 | identitystore.GetGroupMembershipIdResponse, |
| 41 | identitystore.GetGroupMembershipIdError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | export const GetGroupMembershipId = Binding.Service<GetGroupMembershipId>( |
| 46 | "AWS.IdentityCenter.GetGroupMembershipId", |
| 47 | ); |