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