Skip to content

CreateGroupMembership

Source: src/AWS/IdentityCenter/CreateGroupMembership.ts

Runtime binding for the CreateGroupMembership operation (IAM action identitystore:CreateGroupMembership), scoped to one Instance.

Adds a user to a group in the bound instance’s identity store, returning the new MembershipId. The instance’s IdentityStoreId is injected from the binding. Provide the implementation with Effect.provide(AWS.IdentityCenter.CreateGroupMembershipHttp).

// init — bind the operation to the Identity Center instance
const createGroupMembership = yield* AWS.IdentityCenter.CreateGroupMembership(instance);
// runtime
const { MembershipId } = yield* createGroupMembership({
GroupId: groupId,
MemberId: { UserId: userId },
});